1
0
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:
Oleg Hahm 2015-11-15 17:07:40 +01:00
parent 3fddead681
commit 796cb58a8a
2 changed files with 9 additions and 0 deletions

View File

@ -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) */

View File

@ -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;