From 02b31292dfa1a962dca1c8fb6805b3301ce82b7f Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 15 May 2015 22:14:09 +0200 Subject: [PATCH 1/2] ng_ethertype: add unknown ethertype Wireshark uses `0x0000` to disect a protocol. This PR introduces `NG_ETHERTYPE_UNKNOWN` == `0xffff` so we can use it experimentally (since it is not disected by Wireshark). --- sys/include/net/ng_ethertype.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/include/net/ng_ethertype.h b/sys/include/net/ng_ethertype.h index e46405e1e..3f026fc84 100644 --- a/sys/include/net/ng_ethertype.h +++ b/sys/include/net/ng_ethertype.h @@ -35,6 +35,7 @@ extern "C" { #define NG_ETHERTYPE_IPV4 (0x0800) /**< Internet protocol version 4 */ #define NG_ETHERTYPE_ARP (0x0806) /**< Address resolution protocol */ #define NG_ETHERTYPE_IPV6 (0x86dd) /**< Internet protocol version 6 */ +#define NG_ETHERTYPE_UNKNOWN (0xffff) /**< Reserved (no protocol specified) */ #ifdef __cplusplus } From 2f9054cb70fd806c689a3fc7e663112a2da47470 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 15 May 2015 22:17:02 +0200 Subject: [PATCH 2/2] ng_nettype: adapt for new ethertype --- sys/include/net/ng_nettype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/include/net/ng_nettype.h b/sys/include/net/ng_nettype.h index ab2629787..b0bf679b2 100644 --- a/sys/include/net/ng_nettype.h +++ b/sys/include/net/ng_nettype.h @@ -130,7 +130,7 @@ static inline uint16_t ng_nettype_to_ethertype(ng_nettype_t type) return NG_ETHERTYPE_IPV6; #endif default: - return NG_ETHERTYPE_RESERVED; + return NG_ETHERTYPE_UNKNOWN; } }