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