The friendly Operating System for the Internet of Things
mac/internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Daniel Krebs
3  * 2016 INRIA
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
21 #ifndef GNRC_MAC_INTERNAL_H
22 #define GNRC_MAC_INTERNAL_H
23 
24 #include <stdint.h>
25 #include <net/ieee802154.h>
26 #include <net/gnrc/mac/types.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #if (GNRC_MAC_TX_QUEUE_SIZE != 0) || defined(DOXYGEN)
33 
50 bool gnrc_mac_queue_tx_packet(gnrc_mac_tx_t* tx, uint32_t priority, gnrc_pktsnip_t* pkt);
51 #endif /* (GNRC_MAC_TX_QUEUE_SIZE != 0) || defined(DOXYGEN) */
52 
53 #if (GNRC_MAC_RX_QUEUE_SIZE != 0) || defined(DOXYGEN)
54 
63 bool gnrc_mac_queue_rx_packet(gnrc_mac_rx_t* rx, uint32_t priority, gnrc_pktsnip_t* pkt);
64 #endif /* (GNRC_MAC_RX_QUEUE_SIZE != 0) || defined(DOXYGEN) */
65 
66 #if (GNRC_MAC_DISPATCH_BUFFER_SIZE != 0) || defined(DOXYGEN)
67 
73 #endif /* (GNRC_MAC_DISPATCH_BUFFER_SIZE != 0) || defined(DOXYGEN) */
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* GNRC_MAC_INTERNAL_H */
80 
Internal data types used by GNRC_MAC.
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.
IEEE 802.15.4 header definitions.
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.
MAC internal type for storing reception state parameters and state machines.
Definition: types.h:59
void gnrc_mac_dispatch(gnrc_mac_rx_t *rx)
Dispatch all the packets stored in netdev_t::rx:dispatch_buffer to upper layer.
Type to represent parts (either headers or payload) of a packet, called snips.
MAC internal type for storing transmission state parameters and state machines.
Definition: types.h:142