gnrc: add nettype handling for NDN
This commit is contained in:
parent
05d4c23c4a
commit
d005566042
@ -115,6 +115,10 @@ typedef enum {
|
||||
chunk */
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_NDN_RIOT
|
||||
GNRC_NETTYPE_NDN, /**< Protocol is NDN */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @{
|
||||
* @name Testing
|
||||
@ -147,9 +151,13 @@ static inline gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type)
|
||||
case ETHERTYPE_IPV6:
|
||||
return GNRC_NETTYPE_IPV6;
|
||||
#endif
|
||||
#ifdef MODULE_CCN_LITE
|
||||
#if defined(MODULE_CCN_LITE) || defined(MODULE_NDN_RIOT)
|
||||
case ETHERTYPE_NDN:
|
||||
#if defined(MODULE_CCN_LITE)
|
||||
return GNRC_NETTYPE_CCN;
|
||||
#elif defined(MODULE_NDN_RIOT)
|
||||
return GNRC_NETTYPE_NDN;
|
||||
#endif
|
||||
#endif
|
||||
default:
|
||||
return GNRC_NETTYPE_UNDEF;
|
||||
@ -177,6 +185,10 @@ static inline uint16_t gnrc_nettype_to_ethertype(gnrc_nettype_t type)
|
||||
#ifdef MODULE_CCN_LITE
|
||||
case GNRC_NETTYPE_CCN:
|
||||
return ETHERTYPE_NDN;
|
||||
#endif
|
||||
#ifdef MODULE_NDN_RIOT
|
||||
case GNRC_NETTYPE_NDN:
|
||||
return ETHERTYPE_NDN;
|
||||
#endif
|
||||
default:
|
||||
return ETHERTYPE_UNKNOWN;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user