summaryrefslogtreecommitdiffstats
path: root/isisd/isis_constants.h
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-04-27 12:56:11 +0200
committerChristian Franke <chris@opensourcerouting.org>2017-04-28 12:03:23 +0200
commit316a98ecd151dfba86a4a87e11c98cb2a0e94518 (patch)
treedbbf666c211c4458f4313fbfd5043befff46be69 /isisd/isis_constants.h
parentisisd: do some cleanup on the spf implementation (diff)
downloadfrr-316a98ecd151dfba86a4a87e11c98cb2a0e94518.tar.xz
frr-316a98ecd151dfba86a4a87e11c98cb2a0e94518.zip
isisd: implement draft-ietf-isis-ext-eth and support p2p over LAN on BSD
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_constants.h')
-rw-r--r--isisd/isis_constants.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/isisd/isis_constants.h b/isisd/isis_constants.h
index 17616d671..ec0f6fb62 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 */