Loading...
Searching...
No Matches
Send queue for @ref net_gnrc_netif

Detailed Description

Files

file  pktq.h
 Send queue for Network interface API definitions
 
file  type.h
 Send queue for Network interface API type definitions
 

Data Structures

struct  gnrc_netif_pktq_t
 A packet queue for Network interface API with a de-queue timer. More...
 

Functions

int gnrc_netif_pktq_put (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
 Puts a packet into the packet send queue of a network interface.
 
unsigned gnrc_netif_pktq_usage (void)
 Returns the overall usage of the packet queue resources.
 
static gnrc_pktsnip_tgnrc_netif_pktq_get (gnrc_netif_t *netif)
 Gets a packet from the packet send queue of a network interface.
 
void gnrc_netif_pktq_sched_get (gnrc_netif_t *netif)
 Schedule a dequeue notification to network interface.
 
int gnrc_netif_pktq_push_back (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
 Pushes a packet back to the head of the packet send queue of a network interface.
 
static bool gnrc_netif_pktq_empty (gnrc_netif_t *netif)
 Check if a network interface's packet send queue is empty.
 

Function Documentation

◆ gnrc_netif_pktq_empty()

static bool gnrc_netif_pktq_empty ( gnrc_netif_t netif)
inlinestatic

Check if a network interface's packet send queue is empty.

Precondition
netif != NULL
Parameters
[in]netifA network interface. May not be NULL.
Returns
true, when the packet send queue of netif is empty
false, otherwise

Definition at line 128 of file pktq.h.

◆ gnrc_netif_pktq_get()

static gnrc_pktsnip_t * gnrc_netif_pktq_get ( gnrc_netif_t netif)
inlinestatic

Gets a packet from the packet send queue of a network interface.

Precondition
netif != NULL
Parameters
[in]netifA network interface. May not be NULL.
Returns
A packet on success
NULL when the queue is empty

Definition at line 66 of file pktq.h.

◆ gnrc_netif_pktq_push_back()

int gnrc_netif_pktq_push_back ( gnrc_netif_t netif,
gnrc_pktsnip_t pkt 
)

Pushes a packet back to the head of the packet send queue of a network interface.

Precondition
netif != NULL
pkt != NULL
Parameters
[in]netifA network interface. May not be NULL.
[in]pktA packet. May not be NULL.
Returns
0 on success
-1 when the pool of available gnrc_pktqueue_t entries (of size CONFIG_GNRC_NETIF_PKTQ_POOL_SIZE) is depleted

◆ gnrc_netif_pktq_put()

int gnrc_netif_pktq_put ( gnrc_netif_t netif,
gnrc_pktsnip_t pkt 
)

Puts a packet into the packet send queue of a network interface.

Precondition
netif != NULL
pkt != NULL
Parameters
[in]netifA network interface. May not be NULL.
[in]pktA packet. May not be NULL.
Returns
0 on success
-1 when the pool of available gnrc_pktqueue_t entries (of size CONFIG_GNRC_NETIF_PKTQ_POOL_SIZE) is depleted

◆ gnrc_netif_pktq_sched_get()

void gnrc_netif_pktq_sched_get ( gnrc_netif_t netif)

Schedule a dequeue notification to network interface.

The notification will be scheduled in CONFIG_GNRC_NETIF_PKTQ_TIMER_US microseconds.

Precondition
netif != NULL

The signaling message can be used to send the next message in gnrc_netif_pktq_t::queue.

Parameters
[in]netifA network interface. May not be NULL.

◆ gnrc_netif_pktq_usage()

unsigned gnrc_netif_pktq_usage ( void  )

Returns the overall usage of the packet queue resources.

Returns
Number of gnrc_pktqueue_t entries currently in use.