From d005566042a74b2cb77797c5ce9e79157b8abfae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= <mail@cgundogan.de>
Date: Thu, 6 Oct 2016 16:00:48 +0200
Subject: [PATCH] gnrc: add nettype handling for NDN

---
 sys/include/net/gnrc/nettype.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/sys/include/net/gnrc/nettype.h b/sys/include/net/gnrc/nettype.h
index b9dfe6c8c1..b50d69cc97 100644
--- a/sys/include/net/gnrc/nettype.h
+++ b/sys/include/net/gnrc/nettype.h
@@ -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;
-- 
GitLab