Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
Network L2 structure. More...
#include <net_l2.h>
Data Fields | |
enum net_verdict(* | recv )(struct net_if *iface, struct net_pkt *pkt) |
This function is used by net core to get iface's L2 layer parsing what's relevant to itself. | |
int(* | send )(struct net_if *iface, struct net_pkt *pkt) |
This function is used by net core to push a packet to lower layer (interface's L2), which in turn might work on the packet relevantly. | |
int(* | enable )(struct net_if *iface, bool state) |
This function is used to enable/disable traffic over a network interface. | |
enum net_l2_flags(* | get_flags )(struct net_if *iface) |
Return L2 flags for the network interface. | |
Network L2 structure.
Used to provide an interface to lower network stack.
This function is used to enable/disable traffic over a network interface.
The function returns <0 if error and >=0 if no error.
enum net_l2_flags(* net_l2::get_flags) (struct net_if *iface) |
Return L2 flags for the network interface.
enum net_verdict(* net_l2::recv) (struct net_if *iface, struct net_pkt *pkt) |
This function is used by net core to get iface's L2 layer parsing what's relevant to itself.
This function is used by net core to push a packet to lower layer (interface's L2), which in turn might work on the packet relevantly.
(adding proper header etc...) Returns a negative error code, or the number of bytes sent otherwise.