Protocol type definitions and helper functions. More...
Protocol type definitions and helper functions.
The protocol types are used with the GNRC communication interface, the Network interface API, the Network protocol registry, and the Packet to identify network protocols throughout the network stack.
To include a nettype into your build, use the corresponding module of the same name in lower-case, e.g., to use GNRC_NETTYPE_IPV6 in your code, use:
Modules | |
gnrc_nettype_ccn | |
Enables GNRC_NETTYPE_CCN and GNRC_NETTYPE_CCN_CHUNK. | |
gnrc_nettype_gomac | |
Enables GNRC_NETTYPE_GOMACH. | |
gnrc_nettype_icmpv6 | |
Enables GNRC_NETTYPE_ICMPV6. | |
gnrc_nettype_ipv6 | |
Enables GNRC_NETTYPE_IPV6. | |
gnrc_nettype_ipv6_ext | |
Enables GNRC_NETTYPE_IPV6_EXT. | |
gnrc_nettype_lorawan | |
Enables GNRC_NETTYPE_LORAWAN. | |
gnrc_nettype_lwmac | |
Enables GNRC_NETTYPE_LWMAC. | |
gnrc_nettype_ndn | |
Enables GNRC_NETTYPE_NDN. | |
gnrc_nettype_sixlowpan | |
Enables GNRC_NETTYPE_SIXLOWPAN. | |
gnrc_nettype_tcp | |
Enables GNRC_NETTYPE_TCP. | |
gnrc_nettype_udp | |
Enables GNRC_NETTYPE_UDP. | |
Files | |
file | nettype.h |
Protocol type definitions. | |
Enumerations | |
enum | gnrc_nettype_t { GNRC_NETTYPE_TX_SYNC = -3 , GNRC_NETTYPE_NETIF = -1 , GNRC_NETTYPE_UNDEF = 0 , GNRC_NETTYPE_GOMACH , GNRC_NETTYPE_LWMAC , GNRC_NETTYPE_CUSTOM , GNRC_NETTYPE_SIXLOWPAN , GNRC_NETTYPE_IPV6 , GNRC_NETTYPE_IPV6_EXT , GNRC_NETTYPE_ICMPV6 , GNRC_NETTYPE_CCN , GNRC_NETTYPE_CCN_CHUNK , GNRC_NETTYPE_NDN , GNRC_NETTYPE_TCP , GNRC_NETTYPE_UDP , GNRC_NETTYPE_TEST , GNRC_NETTYPE_NUMOF } |
Definition of protocol types in the network stack. More... | |
Functions | |
static gnrc_nettype_t | gnrc_nettype_from_ethertype (uint16_t type) |
Translates an Ether Type number to gnrc_nettype_t. | |
static uint16_t | gnrc_nettype_to_ethertype (gnrc_nettype_t type) |
Translates gnrc_nettype_t to an Ether Type number. | |
static gnrc_nettype_t | gnrc_nettype_from_protnum (uint8_t num) |
Translates a Protocol Number to gnrc_nettype_t. | |
static uint8_t | gnrc_nettype_to_protnum (gnrc_nettype_t type) |
Translates gnrc_nettype_t to a Protocol Number. | |
enum gnrc_nettype_t |
Definition of protocol types in the network stack.
Enumerator | |
---|---|
GNRC_NETTYPE_TX_SYNC | TX synchronization data for passing up error data or auxiliary data. |
GNRC_NETTYPE_NETIF | Protocol is as defined in gnrc_netif_hdr_t. Not usable with Network protocol registry |
GNRC_NETTYPE_UNDEF | Protocol is undefined. |
GNRC_NETTYPE_GOMACH | Protocol is GoMacH.
|
GNRC_NETTYPE_LWMAC | Protocol is lwMAC.
|
GNRC_NETTYPE_CUSTOM | Custom ethertype. |
GNRC_NETTYPE_SIXLOWPAN | Protocol is 6LoWPAN. |
GNRC_NETTYPE_IPV6 | Protocol is IPv6. |
GNRC_NETTYPE_IPV6_EXT | Protocol is IPv6 extension header. |
GNRC_NETTYPE_ICMPV6 | Protocol is ICMPv6. |
GNRC_NETTYPE_CCN | Protocol is CCN. |
GNRC_NETTYPE_CCN_CHUNK | Protocol is CCN, packet contains a content chunk. |
GNRC_NETTYPE_NDN | Protocol is NDN. |
GNRC_NETTYPE_TCP | Protocol is TCP. |
GNRC_NETTYPE_UDP | Protocol is UDP. |
GNRC_NETTYPE_TEST | Usable with test vectors. |
GNRC_NETTYPE_NUMOF | maximum number of available protocols |
|
inlinestatic |
Translates an Ether Type number to gnrc_nettype_t.
[in] | type | An Ether Type number |
type
. type
not translatable.
|
inlinestatic |
Translates a Protocol Number to gnrc_nettype_t.
[in] | num | A Protocol Number |
num
. num
not translatable.
|
inlinestatic |
Translates gnrc_nettype_t to an Ether Type number.
[in] | type | A protocol type |
type
. type
not translatable.
|
inlinestatic |
Translates gnrc_nettype_t to a Protocol Number.
[in] | type | A protocol type |
type
. type
not translatable.