Go to the documentation of this file.
204 #ifdef MODULE_L2FILTER
219 NETDEV_TYPE_ETHERNET,
220 NETDEV_TYPE_IEEE802154,
306 #ifdef MODULE_NETDEV_LAYER
309 #ifdef MODULE_L2FILTER
312 #ifdef MODULE_NETDEV_REGISTER
328 #ifdef MODULE_NETDEV_REGISTER
451 void *value,
size_t max_len);
477 const void *value,
size_t value_len);
491 void *value,
size_t max_len)
511 const void *value,
size_t value_len)
@ NETDEV_EVENT_FHSS_CHANGE_CHANNEL
channel changed
Structure to hold driver interface -> function mapping.
int(* send)(netdev_t *dev, const iolist_t *iolist)
Send frame.
netopt_t
Global list of configuration options available throughout the network stack, e.g.
const struct netdev_driver * driver
ptr to that driver's interface.
netdev_event_cb_t event_callback
callback for device events
#define ENOTSUP
Not supported (may be the same value as [EOPNOTSUPP]).
void(* isr)(netdev_t *dev)
a driver's user-space ISR handler
static int netdev_get_notsup(netdev_t *dev, netopt_t opt, void *value, size_t max_len)
Convenience function for declaring get() as not supported in general.
Common macros and compiler attributes/pragmas configuration.
netdev_event_t
Possible event types that are send from the device driver to the upper layer.
Definition of global configuration options.
int(* set)(netdev_t *dev, netopt_t opt, const void *value, size_t value_len)
Set an option value for a given network device.
@ NETDEV_EVENT_TX_NOACK
ACK requested but not received.
int16_t rssi
RSSI of a received frame in dBm.
@ NETDEV_ANY
Will match any device type.
int(* recv)(netdev_t *dev, void *buf, size_t len, void *info)
Drop a received frame, OR get the length of a received frame, OR get a received frame.
netdev_type_t
Driver types for netdev.
@ NETDEV_EVENT_TX_TIMEOUT
timeout when sending
static void netdev_register(struct netdev *dev, netdev_type_t type, uint8_t index)
Register a device with netdev.
iolist scatter / gather IO
@ NETDEV_EVENT_LINK_DOWN
link gone
@ NETDEV_EVENT_CAD_DONE
channel activity detection done
struct netdev_driver netdev_driver_t
Structure to hold driver interface -> function mapping.
void(* netdev_event_cb_t)(netdev_t *dev, netdev_event_t event)
Event callback for signaling event to upper layers.
@ NETDEV_EVENT_RX_COMPLETE
finished receiving a frame
void * context
ptr to network stack context
@ NETDEV_EVENT_RX_STARTED
started to receive a frame
iolist structure definition
static void netdev_trigger_event_isr(netdev_t *netdev)
Informs netdev there was an interrupt request from the network device.
@ NETDEV_EVENT_TX_STARTED
started to transfer a frame
Structure to hold driver state.
uint8_t lqi
LQI of a received frame.
@ NETDEV_EVENT_RX_TIMEOUT
timeout when receiving
@ NETDEV_EVENT_TX_MEDIUM_BUSY
couldn't transfer frame
@ NETDEV_EVENT_ISR
driver needs it's ISR handled
@ NETDEV_EVENT_CRC_ERROR
wrong CRC
int(* init)(netdev_t *dev)
the driver's initialization function
@ NETDEV_EVENT_LINK_UP
link established
static int netdev_set_notsup(netdev_t *dev, netopt_t opt, const void *value, size_t value_len)
Convenience function for declaring set() as not supported in general.
#define CONFIG_L2FILTER_LISTSIZE
Number of slots in each filter list (filter entries per device)
Received frame status information for most radios.
Link layer address filter interface definition.
@ NETDEV_EVENT_TX_COMPLETE
transfer frame complete
int(* get)(netdev_t *dev, netopt_t opt, void *value, size_t max_len)
Get an option value from a given network device.
@ NETDEV_EVENT_TX_COMPLETE_DATA_PENDING
transfer frame complete and data pending flag