session: use transport endpoint cfg for listen 80/35280/2
authorFlorin Coras <fcoras@cisco.com>
Thu, 10 Feb 2022 19:57:06 +0000 (11:57 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 10 Feb 2022 21:17:16 +0000 (21:17 +0000)
Makes it similar to connects.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I38c328670054e1a9ba4dc4ea8fe7519a5a09e8be

src/plugins/http/http.c
src/plugins/quic/quic.c
src/plugins/srtp/srtp.c
src/vnet/session/application_local.c
src/vnet/session/session.c
src/vnet/session/transport.c
src/vnet/session/transport.h
src/vnet/tcp/tcp.c
src/vnet/tls/tls.c
src/vnet/udp/udp.c

index 657a0b5..668aab0 100644 (file)
@@ -734,7 +734,7 @@ http_transport_connect (transport_endpoint_cfg_t *tep)
 }
 
 static u32
-http_start_listen (u32 app_listener_index, transport_endpoint_t *tep)
+http_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
 {
   vnet_listen_args_t _args = {}, *args = &_args;
   session_t *tc_listener, *app_listener;
index 499eb8b..a0bacb6 100644 (file)
@@ -1441,7 +1441,8 @@ quic_proto_on_close (u32 ctx_index, u32 thread_index)
 }
 
 static u32
-quic_start_listen (u32 quic_listen_session_index, transport_endpoint_t * tep)
+quic_start_listen (u32 quic_listen_session_index,
+                  transport_endpoint_cfg_t *tep)
 {
   vnet_listen_args_t _bargs, *args = &_bargs;
   transport_endpt_crypto_cfg_t *ccfg;
index cc4b59d..715e2c9 100644 (file)
@@ -706,7 +706,7 @@ srtp_disconnect (u32 ctx_handle, u32 thread_index)
 }
 
 static u32
-srtp_start_listen (u32 app_listener_index, transport_endpoint_t *tep)
+srtp_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
 {
   vnet_listen_args_t _bargs, *args = &_bargs;
   session_handle_t udp_al_handle;
index 83def8e..8590d04 100644 (file)
@@ -820,7 +820,7 @@ ct_connect (app_worker_t * client_wrk, session_t * ll,
 }
 
 static u32
-ct_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
+ct_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
 {
   session_endpoint_cfg_t *sep;
   ct_connection_t *ct;
index 42f24d2..108fa36 100644 (file)
@@ -1468,12 +1468,12 @@ session_open (session_endpoint_cfg_t *rmt, session_handle_t *rsh)
 int
 session_listen (session_t * ls, session_endpoint_cfg_t * sep)
 {
-  transport_endpoint_t *tep;
+  transport_endpoint_cfg_t *tep;
   int tc_index;
   u32 s_index;
 
   /* Transport bind/listen */
-  tep = session_endpoint_to_transport (sep);
+  tep = session_endpoint_to_transport_cfg (sep);
   s_index = ls->session_index;
   tc_index = transport_start_listen (session_get_transport_proto (ls),
                                     s_index, tep);
index 92df365..540d6a6 100644 (file)
@@ -341,7 +341,7 @@ transport_reset (transport_proto_t tp, u32 conn_index, u8 thread_index)
 
 u32
 transport_start_listen (transport_proto_t tp, u32 session_index,
-                       transport_endpoint_t * tep)
+                       transport_endpoint_cfg_t *tep)
 {
   return tp_vfts[tp].start_listen (session_index, tep);
 }
index 02ab540..633bb1e 100644 (file)
@@ -72,7 +72,7 @@ typedef struct _transport_proto_vft
   /*
    * Setup
    */
-  u32 (*start_listen) (u32 session_index, transport_endpoint_t * lcl);
+  u32 (*start_listen) (u32 session_index, transport_endpoint_cfg_t *lcl);
   u32 (*stop_listen) (u32 conn_index);
   int (*connect) (transport_endpoint_cfg_t * rmt);
   void (*half_close) (u32 conn_index, u32 thread_index);
@@ -140,7 +140,7 @@ void transport_half_close (transport_proto_t tp, u32 conn_index,
 void transport_close (transport_proto_t tp, u32 conn_index, u8 thread_index);
 void transport_reset (transport_proto_t tp, u32 conn_index, u8 thread_index);
 u32 transport_start_listen (transport_proto_t tp, u32 session_index,
-                           transport_endpoint_t * tep);
+                           transport_endpoint_cfg_t *tep);
 u32 transport_stop_listen (transport_proto_t tp, u32 conn_index);
 void transport_cleanup (transport_proto_t tp, u32 conn_index,
                        u8 thread_index);
index ffe5c89..d97fafa 100644 (file)
@@ -112,7 +112,7 @@ tcp_cc_algo_new_type (const tcp_cc_algorithm_t * vft)
 }
 
 static u32
-tcp_connection_bind (u32 session_index, transport_endpoint_t * lcl)
+tcp_connection_bind (u32 session_index, transport_endpoint_cfg_t *lcl)
 {
   tcp_main_t *tm = &tcp_main;
   tcp_connection_t *listener;
@@ -147,7 +147,7 @@ tcp_connection_bind (u32 session_index, transport_endpoint_t * lcl)
 }
 
 static u32
-tcp_session_bind (u32 session_index, transport_endpoint_t * tep)
+tcp_session_bind (u32 session_index, transport_endpoint_cfg_t *tep)
 {
   return tcp_connection_bind (session_index, tep);
 }
index 0184917..e201d47 100644 (file)
@@ -773,7 +773,7 @@ tls_disconnect (u32 ctx_handle, u32 thread_index)
 }
 
 u32
-tls_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
+tls_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
 {
   vnet_listen_args_t _bargs, *args = &_bargs;
   transport_endpt_crypto_cfg_t *ccfg;
index 5f73e39..98164b1 100644 (file)
@@ -165,7 +165,7 @@ udp_default_mtu (udp_main_t * um, u8 is_ip4)
 }
 
 static u32
-udp_session_bind (u32 session_index, transport_endpoint_t * lcl)
+udp_session_bind (u32 session_index, transport_endpoint_cfg_t *lcl)
 {
   udp_main_t *um = vnet_get_udp_main ();
   vlib_main_t *vm = vlib_get_main ();