[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240823201557.1794985-4-tom@herbertland.com>
Date: Fri, 23 Aug 2024 13:15:47 -0700
From: Tom Herbert <tom@...bertland.com>
To: davem@...emloft.net,
kuba@...nel.org,
edumazet@...gle.com,
netdev@...r.kernel.org,
felipe@...anda.io,
willemdebruijn.kernel@...il.com,
pablo@...filter.org,
laforge@...monks.org,
xeb@...l.ru
Cc: Tom Herbert <tom@...bertland.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: [PATCH net-next v4 03/13] udp_encaps: Add new UDP_ENCAP constants
Add constants for various UDP encapsulations that are supported
Reviewed-by: Willem de Bruijn <willemb@...gle.com>
Signed-off-by: Tom Herbert <tom@...bertland.com>
---
include/uapi/linux/udp.h | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h
index 1a0fe8b151fb..bf15c4ded3e8 100644
--- a/include/uapi/linux/udp.h
+++ b/include/uapi/linux/udp.h
@@ -35,7 +35,12 @@ struct udphdr {
#define UDP_SEGMENT 103 /* Set GSO segmentation size */
#define UDP_GRO 104 /* This socket can receive UDP GRO packets */
-/* UDP encapsulation types */
+/* UDP encapsulation types
+ *
+ * Note that these are defined in UAPI since we may need to use them externally,
+ * for instance by eBPF
+ */
+#define UDP_ENCAP_NONE 0
#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* unused draft-ietf-ipsec-nat-t-ike-00/01 */
#define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */
#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
@@ -43,5 +48,17 @@ struct udphdr {
#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */
#define UDP_ENCAP_RXRPC 6
#define TCP_ENCAP_ESPINTCP 7 /* Yikes, this is really xfrm encap types. */
+#define UDP_ENCAP_TIPC 8
+#define UDP_ENCAP_FOU 9
+#define UDP_ENCAP_GUE 10
+#define UDP_ENCAP_SCTP 11
+#define UDP_ENCAP_RXE 12
+#define UDP_ENCAP_PFCP 13
+#define UDP_ENCAP_WIREGUARD 14
+#define UDP_ENCAP_BAREUDP 15
+#define UDP_ENCAP_VXLAN 16
+#define UDP_ENCAP_VXLAN_GPE 17
+#define UDP_ENCAP_GENEVE 18
+#define UDP_ENCAP_AMT 19
#endif /* _UAPI_LINUX_UDP_H */
--
2.34.1
Powered by blists - more mailing lists