summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_local.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-27 07:55:46 -0800
committerDamjan Marion <dmarion@me.com>2019-03-01 11:51:53 +0000
commit2b81e3cba77e6427b47228318d55e40a859d02d1 (patch)
tree8034c15966f8fe40a87dbcddbbb67aa0864e9a7c /src/vnet/session/application_local.h
parent038243064ba0a6b587213ba56fffd9e3fddcf0ee (diff)
session: refactor local connects
- Switches local connects to cut-thru transport - Removes local sessions as a separate session type Change-Id: I997c6355d8c8e4f2110678f785b0f5d96bba47f7 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_local.h')
-rw-r--r--src/vnet/session/application_local.h55
1 files changed, 17 insertions, 38 deletions
diff --git a/src/vnet/session/application_local.h b/src/vnet/session/application_local.h
index d54b5ebdb6a..5d6e6c1ec7b 100644
--- a/src/vnet/session/application_local.h
+++ b/src/vnet/session/application_local.h
@@ -18,46 +18,25 @@
#define SRC_VNET_SESSION_APPLICATION_LOCAL_H_
#include <vnet/session/application.h>
+#include <vnet/session/transport.h>
-local_session_t *application_local_listen_session_alloc (application_t * app);
-void application_local_listener_session_endpoint (session_t * ll,
- session_endpoint_t * sep);
-
-local_session_t *app_worker_local_session_alloc (app_worker_t * app_wrk);
-void app_worker_local_session_free (app_worker_t * app_wrk,
- local_session_t * s);
-local_session_t *app_worker_get_local_session (app_worker_t * app_wrk,
- u32 session_index);
-local_session_t *app_worker_get_local_session_from_handle (session_handle_t
- handle);
-
-void app_worker_local_sessions_free (app_worker_t * app_wrk);
-int app_worker_local_session_cleanup (app_worker_t * client_wrk,
- app_worker_t * server_wrk,
- local_session_t * ls);
-
-int app_worker_local_session_connect_notify (local_session_t * ls);
-int app_worker_local_session_connect (app_worker_t * client,
- app_worker_t * server,
- session_t * ls, u32 opaque);
-int app_worker_local_session_disconnect (u32 app_or_wrk,
- local_session_t * ls);
-int app_worker_local_session_disconnect_w_index (u32 app_or_wrk,
- u32 ls_index);
-
-void app_worker_format_local_sessions (app_worker_t * app_wrk, int verbose);
-void app_worker_format_local_connects (app_worker_t * app, int verbose);
-
-void mq_send_local_session_disconnected_cb (u32 app_or_wrk,
- local_session_t * ls);
-
-always_inline u8
-application_local_session_listener_has_transport (local_session_t * ls)
+typedef struct ct_connection_
{
- transport_proto_t tp;
- tp = session_type_transport_proto (ls->listener_session_type);
- return (tp != TRANSPORT_PROTO_NONE);
-}
+ transport_connection_t connection;
+ u32 client_wrk;
+ u32 server_wrk;
+ u32 transport_listener_index;
+ transport_proto_t actual_tp;
+ u64 server_evt_q;
+ u64 client_evt_q;
+ u32 client_opaque;
+ u32 peer_index;
+ u64 segment_handle;
+} ct_connection_t;
+
+session_t *ct_session_get_peer (session_t * s);
+void ct_session_endpoint (session_t * ll, session_endpoint_t * sep);
+int ct_session_connect_notify (session_t * ls);
#endif /* SRC_VNET_SESSION_APPLICATION_LOCAL_H_ */