Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
epacket_interface_cb Struct Reference

ePacket interface callback structure. More...

#include <interface.h>

Data Fields

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
 

Detailed Description

ePacket interface callback structure.

Field Documentation

◆ 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_payloadCurrent maximum payload size (0 == disconnected)
user_ctxUser 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
bufThe packet that was received
decryptedTrue if packet contents have been decrypted successfully
user_ctxUser context pointer
Return values
trueContinue default processing the packet
falseDon'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
bufThe packet that failed to transmit
reasonThe error code from the interface
user_ctxUser context pointer

◆ user_ctx

void* epacket_interface_cb::user_ctx

The documentation for this struct was generated from the following file: