From 45b95e86cd6a1c668a48466dab8ef28e6e75d2f8 Mon Sep 17 00:00:00 2001
From: Martine Lenders <mail@martine-lenders.eu>
Date: Thu, 6 Dec 2018 21:47:11 +0100
Subject: [PATCH] gnrc_nettype: provide ethertype to nettype for 6LoEnc

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

diff --git a/sys/include/net/gnrc/nettype.h b/sys/include/net/gnrc/nettype.h
index b50d69cc97..70b58aafaf 100644
--- a/sys/include/net/gnrc/nettype.h
+++ b/sys/include/net/gnrc/nettype.h
@@ -158,6 +158,10 @@ static inline gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type)
 #elif defined(MODULE_NDN_RIOT)
             return GNRC_NETTYPE_NDN;
 #endif
+#endif
+#ifdef MODULE_GNRC_SIXLOENC
+        case ETHERTYPE_6LOENC:
+            return GNRC_NETTYPE_SIXLOWPAN;
 #endif
         default:
             return GNRC_NETTYPE_UNDEF;
@@ -178,6 +182,10 @@ static inline gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type)
 static inline uint16_t gnrc_nettype_to_ethertype(gnrc_nettype_t type)
 {
     switch (type) {
+#ifdef MODULE_GNRC_SIXLOENC
+        case GNRC_NETTYPE_SIXLOWPAN:
+            return ETHERTYPE_6LOENC;
+#endif
 #ifdef MODULE_GNRC_IPV6
         case GNRC_NETTYPE_IPV6:
             return ETHERTYPE_IPV6;
-- 
GitLab