1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef _UAPI_MPLS_H 7 #define _UAPI_MPLS_H 8 #include <linux/types.h> 9 #include <asm/byteorder.h> 10 struct mpls_label { 11 __be32 entry; 12 }; 13 #define MPLS_LS_LABEL_MASK 0xFFFFF000 14 #define MPLS_LS_LABEL_SHIFT 12 15 #define MPLS_LS_TC_MASK 0x00000E00 16 #define MPLS_LS_TC_SHIFT 9 17 #define MPLS_LS_S_MASK 0x00000100 18 #define MPLS_LS_S_SHIFT 8 19 #define MPLS_LS_TTL_MASK 0x000000FF 20 #define MPLS_LS_TTL_SHIFT 0 21 #define MPLS_LABEL_IPV4NULL 0 22 #define MPLS_LABEL_RTALERT 1 23 #define MPLS_LABEL_IPV6NULL 2 24 #define MPLS_LABEL_IMPLNULL 3 25 #define MPLS_LABEL_ENTROPY 7 26 #define MPLS_LABEL_GAL 13 27 #define MPLS_LABEL_OAMALERT 14 28 #define MPLS_LABEL_EXTENSION 15 29 #define MPLS_LABEL_FIRST_UNRESERVED 16 30 enum { 31 MPLS_STATS_UNSPEC, 32 MPLS_STATS_LINK, 33 __MPLS_STATS_MAX, 34 }; 35 #define MPLS_STATS_MAX (__MPLS_STATS_MAX - 1) 36 struct mpls_link_stats { 37 __u64 rx_packets; 38 __u64 tx_packets; 39 __u64 rx_bytes; 40 __u64 tx_bytes; 41 __u64 rx_errors; 42 __u64 tx_errors; 43 __u64 rx_dropped; 44 __u64 tx_dropped; 45 __u64 rx_noroute; 46 }; 47 #endif 48