2 +++ b/include/uapi/linux/mpls.h
7 +#include <linux/types.h>
8 +#include <asm/byteorder.h>
10 +/* Reference: RFC 5462, RFC 3032
13 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
14 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15 + * | Label | TC |S| TTL |
16 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
18 + * Label: Label Value, 20 bits
19 + * TC: Traffic Class field, 3 bits
20 + * S: Bottom of Stack, 1 bit
21 + * TTL: Time to Live, 8 bits
28 +#define MPLS_LS_LABEL_MASK 0xFFFFF000
29 +#define MPLS_LS_LABEL_SHIFT 12
30 +#define MPLS_LS_TC_MASK 0x00000E00
31 +#define MPLS_LS_TC_SHIFT 9
32 +#define MPLS_LS_S_MASK 0x00000100
33 +#define MPLS_LS_S_SHIFT 8
34 +#define MPLS_LS_TTL_MASK 0x000000FF
35 +#define MPLS_LS_TTL_SHIFT 0
37 +#endif /* _UAPI_MPLS_H */