Loading...
Searching...
No Matches
socket_zep.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
50
56
57#include "net/netdev.h"
59#include "net/ieee802154/radio.h"
60#include "net/zep.h"
61#include "ztimer.h"
62
63#ifdef __cplusplus
64extern "C" {
65#endif
66
70typedef struct {
71 char *local_addr;
72 char *local_port;
76
86
122
130
137
145
146#ifdef __cplusplus
147}
148#endif
149
Definitions for netdev common IEEE 802.15.4 code.
Definitions low-level network driver interface.
struct ieee802154_dev ieee802154_dev_t
Forward declaration of the IEEE802.15.4 device descriptor.
Definition radio.h:407
ieee802154_filter_mode_t
Frame Filter mode.
Definition radio.h:347
zepdev_state_t
ZEP device RX state.
Definition socket_zep.h:80
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.
@ ZEPDEV_STATE_TX
ZEP is currently sending a frame.
Definition socket_zep.h:84
@ ZEPDEV_STATE_RX_ON
ZEP is able to receive frames.
Definition socket_zep.h:82
@ ZEPDEV_STATE_RX_RECV
unprocessed frame is in RX buffer, rx stopped
Definition socket_zep.h:83
@ ZEPDEV_STATE_IDLE
ZEP is not doing anything, not receiving frames.
Definition socket_zep.h:81
#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
ZEP device initialization parameters.
Definition socket_zep.h:70
char * remote_addr
remote address string
Definition socket_zep.h:73
char * remote_port
local address string
Definition socket_zep.h:74
char * local_port
local address string
Definition socket_zep.h:72
char * local_addr
local address string
Definition socket_zep.h:71
ZEP device state.
Definition socket_zep.h:90
ieee802154_filter_mode_t filter_mode
frame filter mode
Definition socket_zep.h:118
uint8_t rcv_len
bytes received
Definition socket_zep.h:107
uint32_t seq
ZEP sequence number.
Definition socket_zep.h:97
const socket_zep_params_t * params
command line parameters
Definition socket_zep.h:94
uint8_t snd_buf[sizeof(zep_v2_data_hdr_t)+IEEE802154_FRAME_LEN_MAX]
Send buffer.
Definition socket_zep.h:105
int sock_fd
socket fd
Definition socket_zep.h:96
zepdev_state_t state
device state machine
Definition socket_zep.h:119
uint8_t addr_long[IEEE802154_LONG_ADDRESS_LEN]
Long address of the virtual radio.
Definition socket_zep.h:117
ztimer_t ack_timer
timer to send delayed ACK
Definition socket_zep.h:95
uint16_t chan
virtual radio channel
Definition socket_zep.h:109
bool send_hello
send HELLO packet on connect
Definition socket_zep.h:120
uint8_t addr_short[IEEE802154_SHORT_ADDRESS_LEN]
Short address of the virtual radio.
Definition socket_zep.h:113
uint16_t pan_id
PAN ID of the ZEP network.
Definition socket_zep.h:108
uint8_t rcv_buf[sizeof(zep_v2_data_hdr_t)+IEEE802154_FRAME_LEN_MAX]
Receive buffer.
Definition socket_zep.h:101
uint8_t snd_len
bytes to send
Definition socket_zep.h:106
ZEPv2 header definition (type == Data)
Definition zep.h:76
ztimer structure
Definition ztimer.h:319
Definitions for the ZigBee Encapsulation Protocol.
ztimer API