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 pseudo-module e.g. to use GNRC_NETTYPE_IPV6
in your code, use
Files | |
file | nettype.h |
Protocol type definitions. | |
Enumerations | |
enum | gnrc_nettype_t { GNRC_NETTYPE_NETIF = -1, GNRC_NETTYPE_UNDEF = 0, GNRC_NETTYPE_SIXLOWPAN, GNRC_NETTYPE_GOMACH, GNRC_NETTYPE_LWMAC, GNRC_NETTYPE_CUSTOM, GNRC_NETTYPE_IPV6, GNRC_NETTYPE_IPV6_EXT, GNRC_NETTYPE_ICMPV6, GNRC_NETTYPE_TCP, GNRC_NETTYPE_UDP, GNRC_NETTYPE_CCN, GNRC_NETTYPE_CCN_CHUNK, GNRC_NETTYPE_NDN, GNRC_NETTYPE_LORAWAN, 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 Protocol type. More... | |
static uint16_t | gnrc_nettype_to_ethertype (gnrc_nettype_t type) |
Translates Protocol type to an Ether Type number. More... | |
static gnrc_nettype_t | gnrc_nettype_from_protnum (uint8_t num) |
Translates a Protocol Number to Protocol type. More... | |
static uint8_t | gnrc_nettype_to_protnum (gnrc_nettype_t type) |
Translates Protocol type to a Protocol Number. More... | |
enum gnrc_nettype_t |
Definition of protocol types in the network stack.
Enumerator | |
---|---|
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_SIXLOWPAN | Protocol is 6LoWPAN. |
GNRC_NETTYPE_GOMACH | Protocol is GoMacH. |
GNRC_NETTYPE_LWMAC | Protocol is lwMAC. |
GNRC_NETTYPE_CUSTOM | Custom ethertype. |
GNRC_NETTYPE_IPV6 | Protocol is IPv6. |
GNRC_NETTYPE_IPV6_EXT | Protocol is IPv6 extension header. |
GNRC_NETTYPE_ICMPV6 | Protocol is ICMPv6. |
GNRC_NETTYPE_TCP | Protocol is TCP. |
GNRC_NETTYPE_UDP | Protocol is UDP. |
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_LORAWAN | Protocol is LoRaWAN. |
GNRC_NETTYPE_NUMOF | maximum number of available protocols |
|
inlinestatic |
Translates an Ether Type number to Protocol type.
[in] | type | An Ether Type number |
type
. type
not translatable.
|
inlinestatic |
Translates a Protocol Number to Protocol type.
[in] | num | A Protocol Number |
num
. num
not translatable.
|
inlinestatic |
Translates Protocol type to an Ether Type number.
[in] | type | A protocol type |
type
. type
not translatable.
|
inlinestatic |
Translates Protocol type to a Protocol Number.
[in] | type | A protocol type |
type
. type
not translatable.