session: move tls_alpn_proto_t to transport_types 45/43845/3
authorMatus Fabian <[email protected]>
Mon, 6 Oct 2025 17:03:14 +0000 (13:03 -0400)
committerFlorin Coras <[email protected]>
Tue, 7 Oct 2025 16:12:45 +0000 (16:12 +0000)
Type: refactor

Change-Id: I0a314ba5111f6c706296d4f949f8b107492e188a
Signed-off-by: Matus Fabian <[email protected]>
src/vnet/session/transport_types.h
src/vnet/tls/tls_types.h

index 6649d37..71e1975 100644 (file)
@@ -309,6 +309,47 @@ typedef enum tls_verify_cfg_
 #undef _
 } tls_verify_cfg_t;
 
+#define foreach_tls_alpn_protos                                               \
+  _ (NONE, "none")                                                            \
+  _ (HTTP_1_1, "http/1.1")                                                    \
+  _ (HTTP_2, "h2")                                                            \
+  _ (HTTP_3, "h3")                                                            \
+  _ (IMAP, "imap")                                                            \
+  _ (POP3, "pop3")                                                            \
+  _ (SMB2, "smb")                                                             \
+  _ (TURN, "stun.turn")                                                       \
+  _ (STUN, "stun.nat-discovery")                                              \
+  _ (WEBRTC, "webrtc")                                                        \
+  _ (CWEBRTC, "c-webrtc")                                                     \
+  _ (FTP, "ftp")                                                              \
+  _ (MANAGE_SIEVE, "managesieve")                                             \
+  _ (COAP_TLS, "coap")                                                        \
+  _ (COAP_DSTL, "co")                                                         \
+  _ (XMPP_CLIENT, "xmpp-client")                                              \
+  _ (XMPP_SERVER, "xmpp-server")                                              \
+  _ (ACME_TLS_1, "acme-tls/1")                                                \
+  _ (MQTT, "mqtt")                                                            \
+  _ (DNS_OVER_TLS, "dot")                                                     \
+  _ (NTSKE_1, "ntske/1")                                                      \
+  _ (SUN_RPC, "sunrpc")                                                       \
+  _ (IRC, "irc")                                                              \
+  _ (NNTP, "nntp")                                                            \
+  _ (NNSP, "nnsp")                                                            \
+  _ (DOQ, "doq")                                                              \
+  _ (SIP_2, "sip/2")                                                          \
+  _ (TDS_8_0, "tds/8.0")                                                      \
+  _ (DICOM, "dicom")                                                          \
+  _ (POSTGRESQL, "postgresql")                                                \
+  _ (RADIUS_1_0, "radius/1.0")                                                \
+  _ (RADIUS_1_1, "radius/1.1")
+
+typedef enum tls_alpn_proto_
+{
+#define _(sym, str) TLS_ALPN_PROTO_##sym,
+  foreach_tls_alpn_protos
+#undef _
+} __clib_packed tls_alpn_proto_t;
+
 typedef struct transport_endpt_crypto_cfg_
 {
   u32 ckpair_index;   /**< index of ck pair in application crypto layer */
index deb7923..bf201b1 100644 (file)
@@ -7,47 +7,6 @@
 
 #include <vppinfra/types.h>
 
-#define foreach_tls_alpn_protos                                               \
-  _ (NONE, "none")                                                            \
-  _ (HTTP_1_1, "http/1.1")                                                    \
-  _ (HTTP_2, "h2")                                                            \
-  _ (HTTP_3, "h3")                                                            \
-  _ (IMAP, "imap")                                                            \
-  _ (POP3, "pop3")                                                            \
-  _ (SMB2, "smb")                                                             \
-  _ (TURN, "stun.turn")                                                       \
-  _ (STUN, "stun.nat-discovery")                                              \
-  _ (WEBRTC, "webrtc")                                                        \
-  _ (CWEBRTC, "c-webrtc")                                                     \
-  _ (FTP, "ftp")                                                              \
-  _ (MANAGE_SIEVE, "managesieve")                                             \
-  _ (COAP_TLS, "coap")                                                        \
-  _ (COAP_DSTL, "co")                                                         \
-  _ (XMPP_CLIENT, "xmpp-client")                                              \
-  _ (XMPP_SERVER, "xmpp-server")                                              \
-  _ (ACME_TLS_1, "acme-tls/1")                                                \
-  _ (MQTT, "mqtt")                                                            \
-  _ (DNS_OVER_TLS, "dot")                                                     \
-  _ (NTSKE_1, "ntske/1")                                                      \
-  _ (SUN_RPC, "sunrpc")                                                       \
-  _ (IRC, "irc")                                                              \
-  _ (NNTP, "nntp")                                                            \
-  _ (NNSP, "nnsp")                                                            \
-  _ (DOQ, "doq")                                                              \
-  _ (SIP_2, "sip/2")                                                          \
-  _ (TDS_8_0, "tds/8.0")                                                      \
-  _ (DICOM, "dicom")                                                          \
-  _ (POSTGRESQL, "postgresql")                                                \
-  _ (RADIUS_1_0, "radius/1.0")                                                \
-  _ (RADIUS_1_1, "radius/1.1")
-
-typedef enum tls_alpn_proto_
-{
-#define _(sym, str) TLS_ALPN_PROTO_##sym,
-  foreach_tls_alpn_protos
-#undef _
-} __clib_packed tls_alpn_proto_t;
-
 typedef struct tls_alpn_proto_id_
 {
   u8 len;