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_result )(const struct net_buf *buf, int result, void *user_ctx) |
| | The interface attempted to transmit a packet.
|
| 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_result
| void(* epacket_interface_cb::tx_result) (const struct net_buf *buf, int result, void *user_ctx) |
The interface attempted to transmit a packet.
- Parameters
-
| buf | The packet that was queued for transmission |
| result | The result of the transmission (0 == success, negative on error) |
| user_ctx | User context pointer |
◆ user_ctx
| void* epacket_interface_cb::user_ctx |
The documentation for this struct was generated from the following file: