Skip to content
Snippets Groups Projects
Commit d0055660 authored by Cenk Gündoğan's avatar Cenk Gündoğan Committed by astralien3000
Browse files

gnrc: add nettype handling for NDN

parent 05d4c23c
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,10 @@ typedef enum { ...@@ -115,6 +115,10 @@ typedef enum {
chunk */ chunk */
#endif #endif
#ifdef MODULE_NDN_RIOT
GNRC_NETTYPE_NDN, /**< Protocol is NDN */
#endif
/** /**
* @{ * @{
* @name Testing * @name Testing
...@@ -147,9 +151,13 @@ static inline gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type) ...@@ -147,9 +151,13 @@ static inline gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type)
case ETHERTYPE_IPV6: case ETHERTYPE_IPV6:
return GNRC_NETTYPE_IPV6; return GNRC_NETTYPE_IPV6;
#endif #endif
#ifdef MODULE_CCN_LITE #if defined(MODULE_CCN_LITE) || defined(MODULE_NDN_RIOT)
case ETHERTYPE_NDN: case ETHERTYPE_NDN:
#if defined(MODULE_CCN_LITE)
return GNRC_NETTYPE_CCN; return GNRC_NETTYPE_CCN;
#elif defined(MODULE_NDN_RIOT)
return GNRC_NETTYPE_NDN;
#endif
#endif #endif
default: default:
return GNRC_NETTYPE_UNDEF; return GNRC_NETTYPE_UNDEF;
...@@ -177,6 +185,10 @@ static inline uint16_t gnrc_nettype_to_ethertype(gnrc_nettype_t type) ...@@ -177,6 +185,10 @@ static inline uint16_t gnrc_nettype_to_ethertype(gnrc_nettype_t type)
#ifdef MODULE_CCN_LITE #ifdef MODULE_CCN_LITE
case GNRC_NETTYPE_CCN: case GNRC_NETTYPE_CCN:
return ETHERTYPE_NDN; return ETHERTYPE_NDN;
#endif
#ifdef MODULE_NDN_RIOT
case GNRC_NETTYPE_NDN:
return ETHERTYPE_NDN;
#endif #endif
default: default:
return ETHERTYPE_UNKNOWN; return ETHERTYPE_UNKNOWN;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment