1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _UAPI_LWTUNNEL_H_ 2 #ifndef _UAPI_LWTUNNEL_H_ 3 #define _UAPI_LWTUNNEL_H_ 3 #define _UAPI_LWTUNNEL_H_ 4 4 5 #include <linux/types.h> 5 #include <linux/types.h> 6 6 7 enum lwtunnel_encap_types { 7 enum lwtunnel_encap_types { 8 LWTUNNEL_ENCAP_NONE, 8 LWTUNNEL_ENCAP_NONE, 9 LWTUNNEL_ENCAP_MPLS, 9 LWTUNNEL_ENCAP_MPLS, 10 LWTUNNEL_ENCAP_IP, 10 LWTUNNEL_ENCAP_IP, 11 LWTUNNEL_ENCAP_ILA, 11 LWTUNNEL_ENCAP_ILA, 12 LWTUNNEL_ENCAP_IP6, 12 LWTUNNEL_ENCAP_IP6, 13 LWTUNNEL_ENCAP_SEG6, 13 LWTUNNEL_ENCAP_SEG6, 14 LWTUNNEL_ENCAP_BPF, 14 LWTUNNEL_ENCAP_BPF, 15 LWTUNNEL_ENCAP_SEG6_LOCAL, 15 LWTUNNEL_ENCAP_SEG6_LOCAL, 16 LWTUNNEL_ENCAP_RPL, 16 LWTUNNEL_ENCAP_RPL, 17 LWTUNNEL_ENCAP_IOAM6, << 18 LWTUNNEL_ENCAP_XFRM, << 19 __LWTUNNEL_ENCAP_MAX, 17 __LWTUNNEL_ENCAP_MAX, 20 }; 18 }; 21 19 22 #define LWTUNNEL_ENCAP_MAX (__LWTUNNEL_ENCAP_M 20 #define LWTUNNEL_ENCAP_MAX (__LWTUNNEL_ENCAP_MAX - 1) 23 21 24 enum lwtunnel_ip_t { 22 enum lwtunnel_ip_t { 25 LWTUNNEL_IP_UNSPEC, 23 LWTUNNEL_IP_UNSPEC, 26 LWTUNNEL_IP_ID, 24 LWTUNNEL_IP_ID, 27 LWTUNNEL_IP_DST, 25 LWTUNNEL_IP_DST, 28 LWTUNNEL_IP_SRC, 26 LWTUNNEL_IP_SRC, 29 LWTUNNEL_IP_TTL, 27 LWTUNNEL_IP_TTL, 30 LWTUNNEL_IP_TOS, 28 LWTUNNEL_IP_TOS, 31 LWTUNNEL_IP_FLAGS, 29 LWTUNNEL_IP_FLAGS, 32 LWTUNNEL_IP_PAD, 30 LWTUNNEL_IP_PAD, 33 LWTUNNEL_IP_OPTS, 31 LWTUNNEL_IP_OPTS, 34 __LWTUNNEL_IP_MAX, 32 __LWTUNNEL_IP_MAX, 35 }; 33 }; 36 34 37 #define LWTUNNEL_IP_MAX (__LWTUNNEL_IP_MAX - 1 35 #define LWTUNNEL_IP_MAX (__LWTUNNEL_IP_MAX - 1) 38 36 39 enum lwtunnel_ip6_t { 37 enum lwtunnel_ip6_t { 40 LWTUNNEL_IP6_UNSPEC, 38 LWTUNNEL_IP6_UNSPEC, 41 LWTUNNEL_IP6_ID, 39 LWTUNNEL_IP6_ID, 42 LWTUNNEL_IP6_DST, 40 LWTUNNEL_IP6_DST, 43 LWTUNNEL_IP6_SRC, 41 LWTUNNEL_IP6_SRC, 44 LWTUNNEL_IP6_HOPLIMIT, 42 LWTUNNEL_IP6_HOPLIMIT, 45 LWTUNNEL_IP6_TC, 43 LWTUNNEL_IP6_TC, 46 LWTUNNEL_IP6_FLAGS, 44 LWTUNNEL_IP6_FLAGS, 47 LWTUNNEL_IP6_PAD, 45 LWTUNNEL_IP6_PAD, 48 LWTUNNEL_IP6_OPTS, 46 LWTUNNEL_IP6_OPTS, 49 __LWTUNNEL_IP6_MAX, 47 __LWTUNNEL_IP6_MAX, 50 }; 48 }; 51 49 52 #define LWTUNNEL_IP6_MAX (__LWTUNNEL_IP6_MAX - 50 #define LWTUNNEL_IP6_MAX (__LWTUNNEL_IP6_MAX - 1) 53 51 54 enum { 52 enum { 55 LWTUNNEL_IP_OPTS_UNSPEC, 53 LWTUNNEL_IP_OPTS_UNSPEC, 56 LWTUNNEL_IP_OPTS_GENEVE, 54 LWTUNNEL_IP_OPTS_GENEVE, 57 LWTUNNEL_IP_OPTS_VXLAN, 55 LWTUNNEL_IP_OPTS_VXLAN, 58 LWTUNNEL_IP_OPTS_ERSPAN, 56 LWTUNNEL_IP_OPTS_ERSPAN, 59 __LWTUNNEL_IP_OPTS_MAX, 57 __LWTUNNEL_IP_OPTS_MAX, 60 }; 58 }; 61 59 62 #define LWTUNNEL_IP_OPTS_MAX (__LWTUNNEL_IP_OP 60 #define LWTUNNEL_IP_OPTS_MAX (__LWTUNNEL_IP_OPTS_MAX - 1) 63 61 64 enum { 62 enum { 65 LWTUNNEL_IP_OPT_GENEVE_UNSPEC, 63 LWTUNNEL_IP_OPT_GENEVE_UNSPEC, 66 LWTUNNEL_IP_OPT_GENEVE_CLASS, 64 LWTUNNEL_IP_OPT_GENEVE_CLASS, 67 LWTUNNEL_IP_OPT_GENEVE_TYPE, 65 LWTUNNEL_IP_OPT_GENEVE_TYPE, 68 LWTUNNEL_IP_OPT_GENEVE_DATA, 66 LWTUNNEL_IP_OPT_GENEVE_DATA, 69 __LWTUNNEL_IP_OPT_GENEVE_MAX, 67 __LWTUNNEL_IP_OPT_GENEVE_MAX, 70 }; 68 }; 71 69 72 #define LWTUNNEL_IP_OPT_GENEVE_MAX (__LWTUNNEL 70 #define LWTUNNEL_IP_OPT_GENEVE_MAX (__LWTUNNEL_IP_OPT_GENEVE_MAX - 1) 73 71 74 enum { 72 enum { 75 LWTUNNEL_IP_OPT_VXLAN_UNSPEC, 73 LWTUNNEL_IP_OPT_VXLAN_UNSPEC, 76 LWTUNNEL_IP_OPT_VXLAN_GBP, 74 LWTUNNEL_IP_OPT_VXLAN_GBP, 77 __LWTUNNEL_IP_OPT_VXLAN_MAX, 75 __LWTUNNEL_IP_OPT_VXLAN_MAX, 78 }; 76 }; 79 77 80 #define LWTUNNEL_IP_OPT_VXLAN_MAX (__LWTUNNEL_ 78 #define LWTUNNEL_IP_OPT_VXLAN_MAX (__LWTUNNEL_IP_OPT_VXLAN_MAX - 1) 81 79 82 enum { 80 enum { 83 LWTUNNEL_IP_OPT_ERSPAN_UNSPEC, 81 LWTUNNEL_IP_OPT_ERSPAN_UNSPEC, 84 LWTUNNEL_IP_OPT_ERSPAN_VER, 82 LWTUNNEL_IP_OPT_ERSPAN_VER, 85 LWTUNNEL_IP_OPT_ERSPAN_INDEX, 83 LWTUNNEL_IP_OPT_ERSPAN_INDEX, 86 LWTUNNEL_IP_OPT_ERSPAN_DIR, 84 LWTUNNEL_IP_OPT_ERSPAN_DIR, 87 LWTUNNEL_IP_OPT_ERSPAN_HWID, 85 LWTUNNEL_IP_OPT_ERSPAN_HWID, 88 __LWTUNNEL_IP_OPT_ERSPAN_MAX, 86 __LWTUNNEL_IP_OPT_ERSPAN_MAX, 89 }; 87 }; 90 88 91 #define LWTUNNEL_IP_OPT_ERSPAN_MAX (__LWTUNNEL 89 #define LWTUNNEL_IP_OPT_ERSPAN_MAX (__LWTUNNEL_IP_OPT_ERSPAN_MAX - 1) 92 90 93 enum { 91 enum { 94 LWT_BPF_PROG_UNSPEC, 92 LWT_BPF_PROG_UNSPEC, 95 LWT_BPF_PROG_FD, 93 LWT_BPF_PROG_FD, 96 LWT_BPF_PROG_NAME, 94 LWT_BPF_PROG_NAME, 97 __LWT_BPF_PROG_MAX, 95 __LWT_BPF_PROG_MAX, 98 }; 96 }; 99 97 100 #define LWT_BPF_PROG_MAX (__LWT_BPF_PROG_MAX - 98 #define LWT_BPF_PROG_MAX (__LWT_BPF_PROG_MAX - 1) 101 99 102 enum { 100 enum { 103 LWT_BPF_UNSPEC, 101 LWT_BPF_UNSPEC, 104 LWT_BPF_IN, 102 LWT_BPF_IN, 105 LWT_BPF_OUT, 103 LWT_BPF_OUT, 106 LWT_BPF_XMIT, 104 LWT_BPF_XMIT, 107 LWT_BPF_XMIT_HEADROOM, 105 LWT_BPF_XMIT_HEADROOM, 108 __LWT_BPF_MAX, 106 __LWT_BPF_MAX, 109 }; 107 }; 110 108 111 #define LWT_BPF_MAX (__LWT_BPF_MAX - 1) 109 #define LWT_BPF_MAX (__LWT_BPF_MAX - 1) 112 110 113 #define LWT_BPF_MAX_HEADROOM 256 111 #define LWT_BPF_MAX_HEADROOM 256 114 << 115 enum { << 116 LWT_XFRM_UNSPEC, << 117 LWT_XFRM_IF_ID, << 118 LWT_XFRM_LINK, << 119 __LWT_XFRM_MAX, << 120 }; << 121 << 122 #define LWT_XFRM_MAX (__LWT_XFRM_MAX - 1) << 123 112 124 #endif /* _UAPI_LWTUNNEL_H_ */ 113 #endif /* _UAPI_LWTUNNEL_H_ */ 125 114
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.