From 316a98ecd151dfba86a4a87e11c98cb2a0e94518 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 27 Apr 2017 12:56:11 +0200 Subject: isisd: implement draft-ietf-isis-ext-eth and support p2p over LAN on BSD Signed-off-by: Christian Franke --- isisd/isis_constants.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'isisd/isis_constants.h') diff --git a/isisd/isis_constants.h b/isisd/isis_constants.h index 17616d671b..ec0f6fb62c 100644 --- a/isisd/isis_constants.h +++ b/isisd/isis_constants.h @@ -171,4 +171,14 @@ #define ETH_ALEN 6 #endif +#define MAX_LLC_LEN 0x5ff +#define ETHERTYPE_EXT_LLC 0x8870 + +static inline uint16_t isis_ethertype(size_t len) +{ + if (len > MAX_LLC_LEN) + return ETHERTYPE_EXT_LLC; + return len; +} + #endif /* ISIS_CONSTANTS_H */ -- cgit v1.2.3