gnrc_nettype: provide ethertype to nettype for 6LoEnc
This commit is contained in:
parent
941bcc142d
commit
45b95e86cd
@ -158,6 +158,10 @@ static inline gnrc_nettype_t gnrc_nettype_from_ethertype(uint16_t type)
|
|||||||
#elif defined(MODULE_NDN_RIOT)
|
#elif defined(MODULE_NDN_RIOT)
|
||||||
return GNRC_NETTYPE_NDN;
|
return GNRC_NETTYPE_NDN;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef MODULE_GNRC_SIXLOENC
|
||||||
|
case ETHERTYPE_6LOENC:
|
||||||
|
return GNRC_NETTYPE_SIXLOWPAN;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return GNRC_NETTYPE_UNDEF;
|
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)
|
static inline uint16_t gnrc_nettype_to_ethertype(gnrc_nettype_t type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
#ifdef MODULE_GNRC_SIXLOENC
|
||||||
|
case GNRC_NETTYPE_SIXLOWPAN:
|
||||||
|
return ETHERTYPE_6LOENC;
|
||||||
|
#endif
|
||||||
#ifdef MODULE_GNRC_IPV6
|
#ifdef MODULE_GNRC_IPV6
|
||||||
case GNRC_NETTYPE_IPV6:
|
case GNRC_NETTYPE_IPV6:
|
||||||
return ETHERTYPE_IPV6;
|
return ETHERTYPE_IPV6;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user