nettype.h¶
Protocol type definitions.
-
enum
gnrc_nettype_t
¶ - GNRC_NETTYPE_IOVEC
= -2
- Not so much protocol but data type that is passed to network devices using the netdev interface.
- GNRC_NETTYPE_NETIF
= -1
Protocol is as defined in gnrc_netif_hdr_t.
Not usable with Network protocol registry
- GNRC_NETTYPE_UNDEF
= 0
- Protocol is undefined.
- GNRC_NETTYPE_SIXLOWPAN
- Protocol is 6LoWPAN.
- GNRC_NETTYPE_IPV6
- Protocol is IPv6.
- GNRC_NETTYPE_ICMPV6
- Protocol is ICMPv6.
- GNRC_NETTYPE_UDP
- Protocol is UDP.
- GNRC_NETTYPE_TEST
- GNRC_NETTYPE_NUMOF
- maximum number of available protocols
- GNRC_NETTYPE_IOVEC
-
nettype.h::gnrc_nettype_t
gnrc_nettype_from_ethertype
(uint16_t type)¶ Translates an Ether Type number to Protocol type.
See also
Parameters
type: An Ether Type number Return values
- The corresponding Protocol type to
type
. - nettype.h::gnrc_nettype_t::GNRC_NETTYPE_UNDEF if
type
not translatable.
- The corresponding Protocol type to
-
uint16_t
gnrc_nettype_to_ethertype
(nettype.h::gnrc_nettype_t
type)¶ Translates Protocol type to an Ether Type number.
See also
Parameters
type: A protocol type Return values
- The corresponding Ether Type number to
type
. ethertype.h::ETHERTYPE_RESERVED
iftype
not translatable.
- The corresponding Ether Type number to
-
nettype.h::gnrc_nettype_t
gnrc_nettype_from_protnum
(uint8_t num)¶ Translates a Protocol Number to Protocol type.
Parameters
num: A Protocol Number Return values
- The corresponding Protocol type to
num
. - nettype.h::gnrc_nettype_t::GNRC_NETTYPE_UNDEF if
num
not translatable.
- The corresponding Protocol type to
-
uint8_t
gnrc_nettype_to_protnum
(nettype.h::gnrc_nettype_t
type)¶ Translates Protocol type to a Protocol Number.
Parameters
type: A protocol type Return values
- The corresponding Protocol Number to
type
. protnum.h::PROTNUM_RESERVED
iftype
not translatable.
- The corresponding Protocol Number to