ePacket interface callback structure.
More...
#include <interface.h>
|
void(* | interface_state )(uint16_t current_max_payload, void *user_ctx) |
| The interface connection state has changed.
|
|
void(* | tx_failure )(const struct net_buf *buf, int reason, void *user_ctx) |
| A packet failed to transmit on the interface.
|
|
bool(* | packet_received )(struct net_buf *buf, bool decrypted, void *user_ctx) |
| A packet was received on the interface.
|
|
void * | user_ctx |
|
sys_snode_t | node |
|
ePacket interface callback structure.
◆ interface_state
void(* epacket_interface_cb::interface_state) (uint16_t current_max_payload, void *user_ctx) |
The interface connection state has changed.
- Parameters
-
current_max_payload | Current maximum payload size (0 == disconnected) |
user_ctx | User context pointer |
◆ node
sys_snode_t epacket_interface_cb::node |
◆ packet_received
bool(* epacket_interface_cb::packet_received) (struct net_buf *buf, bool decrypted, void *user_ctx) |
A packet was received on the interface.
- Note
- Buffer contents must not be modified from this context if the function returns true.
-
This context must never free the provided buffer.
- Parameters
-
buf | The packet that was received |
decrypted | True if packet contents have been decrypted successfully |
user_ctx | User context pointer |
- Return values
-
true | Continue default processing the packet |
false | Don't run the default interface packet handler |
◆ tx_failure
void(* epacket_interface_cb::tx_failure) (const struct net_buf *buf, int reason, void *user_ctx) |
A packet failed to transmit on the interface.
- Parameters
-
buf | The packet that failed to transmit |
reason | The error code from the interface |
user_ctx | User context pointer |
◆ user_ctx
void* epacket_interface_cb::user_ctx |
The documentation for this struct was generated from the following file: