diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2017-04-27 12:56:11 +0200 | 
|---|---|---|
| committer | Christian Franke <chris@opensourcerouting.org> | 2017-04-28 12:03:23 +0200 | 
| commit | 316a98ecd151dfba86a4a87e11c98cb2a0e94518 (patch) | |
| tree | dbbf666c211c4458f4313fbfd5043befff46be69 /isisd/isis_constants.h | |
| parent | 1b49e4f0ba4073821701cb339bde94055d3b5786 (diff) | |
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.h | 10 | 
1 files changed, 10 insertions, 0 deletions
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 */  | 
