FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
mpls_types.h
Go to the documentation of this file.
1 #ifndef __MPLS_TYPES_H__
2 #define __MPLS_TYPES_H__
3 
4 #define MPLS_IETF_MIN_LABEL 0x00000
5 #define MPLS_IETF_MAX_LABEL 0xfffff
6 
7 #define MPLS_IETF_MIN_RESERVED_LABEL 0x00000
8 #define MPLS_IETF_MAX_RESERVED_LABEL 0x0000f
9 
10 #define MPLS_IETF_MIN_UNRES_LABEL 0x00010
11 #define MPLS_IETF_MAX_UNRES_LABEL 0xfffff
12 
13 #define MPLS_IETF_IPV4_EXPLICIT_NULL_LABEL 0x00000
14 #define MPLS_IETF_ROUTER_ALERT_LABEL 0x00001
15 #define MPLS_IETF_IPV6_EXPLICIT_NULL_LABEL 0x00002
16 #define MPLS_IETF_IMPLICIT_NULL_LABEL 0x00003
17 #define MPLS_IETF_ELI_LABEL 0x00007
18 #define MPLS_IETF_GAL_LABEL 0x0000D
19 
20 #define MPLS_IETF_IPV4_EXPLICIT_NULL_STRING "ip4-explicit-null"
21 #define MPLS_IETF_IPV4_EXPLICIT_NULL_BRIEF_STRING "e-nul"
22 #define MPLS_IETF_IMPLICIT_NULL_STRING "implicit-null"
23 #define MPLS_IETF_IMPLICIT_NULL_BRIEF_STRING "i-nul"
24 #define MPLS_IETF_ROUTER_ALERT_STRING "router-alert"
25 #define MPLS_IETF_ROUTER_ALERT_BRIEF_STRING "r-alt"
26 #define MPLS_IETF_IPV6_EXPLICIT_NULL_STRING "ipv6-explicit-null"
27 #define MPLS_IETF_IPV6_EXPLICIT_NULL_BRIEF_STRING "v6enl"
28 #define MPLS_IETF_ELI_STRING "entropy-label-indicator"
29 #define MPLS_IETF_ELI_BRIEF_STRING "eli"
30 #define MPLS_IETF_GAL_STRING "gal"
31 #define MPLS_IETF_GAL_BRIEF_STRING "gal"
32 
33 #define MPLS_LABEL_INVALID (MPLS_IETF_MAX_LABEL+1)
34 
35 #define MPLS_LABEL_IS_REAL(_lbl) \
36  (((_lbl) > MPLS_IETF_MIN_UNRES_LABEL) && \
37  ((_lbl) <= MPLS_IETF_MAX_UNRES_LABEL))
38 
39 #endif