mac/internal.h File Reference

Definitions of internal functions of GNRC_MAC module. More...

#include <stdint.h>
#include "net/ieee802154.h"
#include "net/gnrc/mac/types.h"
+ Include dependency graph for mac/internal.h:

Go to the source code of this file.

Functions

bool gnrc_mac_queue_tx_packet (gnrc_mac_tx_t *tx, uint32_t priority, gnrc_pktsnip_t *pkt)
 Queues the packet into the related transmission packet queue in netdev_t::tx. More...
 
bool gnrc_mac_queue_rx_packet (gnrc_mac_rx_t *rx, uint32_t priority, gnrc_pktsnip_t *pkt)
 Queues the packet into the reception packet queue in netdev_t::rx. More...
 
void gnrc_mac_dispatch (gnrc_mac_rx_t *rx)
 Dispatch all the packets stored in netdev_t::rx:dispatch_buffer to upper layer. More...
 

Function Documentation

◆ gnrc_mac_dispatch()

void gnrc_mac_dispatch ( gnrc_mac_rx_t rx)
Parameters
[in,out]rxgnrc_mac reception management object

◆ gnrc_mac_queue_rx_packet()

bool gnrc_mac_queue_rx_packet ( gnrc_mac_rx_t rx,
uint32_t  priority,
gnrc_pktsnip_t pkt 
)
Parameters
[in,out]rxgnrc_mac reception management object
[in]prioritythe priority of pkt
[in]pktgnrc packet that will be queued
Returns
true if queued successfully, otherwise false.

◆ gnrc_mac_queue_tx_packet()

bool gnrc_mac_queue_tx_packet ( gnrc_mac_tx_t tx,
uint32_t  priority,
gnrc_pktsnip_t pkt 
)

Note that, in case the gnrc_mac_tx_neighbor_t structure is in used (indicated by GNRC_MAC_NEIGHBOR_COUNT != 0), this function queues the packet to the queue associated to the pkt's destination neighbor, including a broadcast-neighbor (neighbor id is 0 in netdev_t::tx::neighbors) which specifically stores broadcasting packets. On the other hand, if gnrc_mac_tx_neighbor_t structure is not in used (indicated by GNRC_MAC_NEIGHBOR_COUNT == 0), this function queues the packet into the single priority TX queue defined in in netdev_t::tx.

Parameters
[in,out]txgnrc_mac transmission management object
[in]prioritythe priority of pkt
[in]pktgnrc packet that will be queued
Returns
true if queued successfully, otherwise false.