gnrc_nettype: provide ethertype to nettype for 6LoEnc

This commit is contained in:
Martine Lenders 2018-12-06 21:47:11 +01:00
parent 941bcc142d
commit 45b95e86cd

View File

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