Loading...
Searching...
No Matches
socket_zep.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
56#ifndef SOCKET_ZEP_H
57#define SOCKET_ZEP_H
58
59#include "net/netdev.h"
61#include "net/ieee802154/radio.h"
62#include "net/zep.h"
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
71typedef struct {
72 char *local_addr;
73 char *local_port;
77
81typedef struct {
86 int sock_fd;
87 uint32_t seq;
91 uint8_t rcv_buf[sizeof(zep_v2_data_hdr_t) + IEEE802154_FRAME_LEN_MAX];
95 uint8_t snd_buf[sizeof(zep_v2_data_hdr_t) + IEEE802154_FRAME_LEN_MAX];
96 uint8_t snd_len;
97 uint16_t pan_id;
98 uint16_t chan;
102 uint8_t addr_short[IEEE802154_SHORT_ADDRESS_LEN];
106 uint8_t addr_long[IEEE802154_LONG_ADDRESS_LEN];
108 bool rx;
111
119
126
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif /* SOCKET_ZEP_H */
Definitions for netdev common IEEE 802.15.4 code.
Definitions low-level network driver interface.
ieee802154_filter_mode_t
Frame Filter mode.
Definition radio.h:341
void socket_zep_cleanup(socket_zep_t *dev)
Cleanup socket resources.
void socket_zep_setup(socket_zep_t *dev, const socket_zep_params_t *params)
Setup socket_zep_t structure.
void socket_zep_hal_setup(socket_zep_t *dev, ieee802154_dev_t *hal)
Setup socket ZEP in order to be used with the IEEE 802.15.4 Radio HAL.
#define IEEE802154_FRAME_LEN_MAX
maximum 802.15.4 frame length
Definition ieee802154.h:98
#define IEEE802154_SHORT_ADDRESS_LEN
IEEE 802.15.4 address lengths.
Definition ieee802154.h:44
#define IEEE802154_LONG_ADDRESS_LEN
long address (EUI-64)
Definition ieee802154.h:45
the IEEE802.15.4 device descriptor
Definition radio.h:415
ZEP device initialization parameters.
Definition socket_zep.h:71
char * remote_addr
remote address string
Definition socket_zep.h:74
char * remote_port
local address string
Definition socket_zep.h:75
char * local_port
local address string
Definition socket_zep.h:73
char * local_addr
local address string
Definition socket_zep.h:72
ZEP device state.
Definition socket_zep.h:81
ieee802154_filter_mode_t filter_mode
frame filter mode
Definition socket_zep.h:107
uint32_t seq
ZEP sequence number.
Definition socket_zep.h:87
const socket_zep_params_t * params
command line parameters
Definition socket_zep.h:85
int sock_fd
socket fd
Definition socket_zep.h:86
uint16_t chan
virtual radio channel
Definition socket_zep.h:98
bool rx
whether the radio is listening for packets
Definition socket_zep.h:108
bool send_hello
send HELLO packet on connect
Definition socket_zep.h:109
uint16_t pan_id
PAN ID of the ZEP network.
Definition socket_zep.h:97
uint8_t snd_len
bytes to send
Definition socket_zep.h:96
ZEPv2 header definition (type == Data)
Definition zep.h:76
Definitions for the ZigBee Encapsulation Protocol.