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
nettype.h::gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type)

Translates an Ether Type number to Protocol type.

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.
uint16_t gnrc_nettype_to_ethertype(nettype.h::gnrc_nettype_t type)

Translates Protocol type to an Ether Type number.

Parameters

type:A protocol type

Return values

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.
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