mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net: added NDN ethertype
This commit is contained in:
parent
3fddead681
commit
796cb58a8a
@ -34,6 +34,7 @@ extern "C" {
|
||||
#define ETHERTYPE_RESERVED (0x0000) /**< Reserved */
|
||||
#define ETHERTYPE_IPV4 (0x0800) /**< Internet protocol version 4 */
|
||||
#define ETHERTYPE_ARP (0x0806) /**< Address resolution protocol */
|
||||
#define ETHERTYPE_NDN (0x0801) /**< Parc CCNX */
|
||||
#define ETHERTYPE_IPV6 (0x86dd) /**< Internet protocol version 6 */
|
||||
#define ETHERTYPE_UNKNOWN (0xffff) /**< Reserved (no protocol specified) */
|
||||
|
||||
|
@ -118,6 +118,10 @@ static inline gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type)
|
||||
#ifdef MODULE_GNRC_IPV6
|
||||
case ETHERTYPE_IPV6:
|
||||
return GNRC_NETTYPE_IPV6;
|
||||
#endif
|
||||
#ifdef MODULE_CCN_LITE
|
||||
case ETHERTYPE_NDN:
|
||||
return GNRC_NETTYPE_CCN;
|
||||
#endif
|
||||
default:
|
||||
return GNRC_NETTYPE_UNDEF;
|
||||
@ -141,6 +145,10 @@ static inline uint16_t gnrc_nettype_to_ethertype(gnrc_nettype_t type)
|
||||
#ifdef MODULE_GNRC_IPV6
|
||||
case GNRC_NETTYPE_IPV6:
|
||||
return ETHERTYPE_IPV6;
|
||||
#endif
|
||||
#ifdef MODULE_CCN_LITE
|
||||
case GNRC_NETTYPE_CCN:
|
||||
return ETHERTYPE_NDN;
|
||||
#endif
|
||||
default:
|
||||
return ETHERTYPE_UNKNOWN;
|
||||
|
Loading…
Reference in New Issue
Block a user