summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-05 20:55:11 -0800
committerDamjan Marion <dmarion@me.com>2019-02-09 16:17:32 +0000
commitc9940fc20bf248ba10dad10108415219f0f8360f (patch)
treebf18da0d4a869dece31e2dd0f0daa1ce922b3c10 /src/vnet/session/session.h
parent6164e97e0f2fddadea90fd24cd0ea4e629ba9b26 (diff)
session: refactor listen logic
Make app-listener the handle for app listens. Consequently transport and local listen sessions are now associated to the app-listener. Change-Id: I9397a26d42cccb100970b6b4794c15bac2e11465 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r--src/vnet/session/session.h105
1 files changed, 1 insertions, 104 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index c622e4eb74a..7722f4f03e3 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -23,58 +23,6 @@
#define SESSION_PROXY_LISTENER_INDEX ((u8)~0 - 1)
-typedef enum
-{
- FIFO_EVENT_APP_RX,
- SESSION_IO_EVT_CT_RX,
- FIFO_EVENT_APP_TX,
- SESSION_IO_EVT_CT_TX,
- SESSION_IO_EVT_TX_FLUSH,
- FIFO_EVENT_DISCONNECT,
- FIFO_EVENT_BUILTIN_RX,
- FIFO_EVENT_BUILTIN_TX,
- FIFO_EVENT_RPC,
- SESSION_CTRL_EVT_BOUND,
- SESSION_CTRL_EVT_ACCEPTED,
- SESSION_CTRL_EVT_ACCEPTED_REPLY,
- SESSION_CTRL_EVT_CONNECTED,
- SESSION_CTRL_EVT_CONNECTED_REPLY,
- SESSION_CTRL_EVT_DISCONNECTED,
- SESSION_CTRL_EVT_DISCONNECTED_REPLY,
- SESSION_CTRL_EVT_RESET,
- SESSION_CTRL_EVT_RESET_REPLY,
- SESSION_CTRL_EVT_REQ_WORKER_UPDATE,
- SESSION_CTRL_EVT_WORKER_UPDATE,
- SESSION_CTRL_EVT_WORKER_UPDATE_REPLY,
-} session_evt_type_t;
-
-static inline const char *
-fifo_event_type_str (session_evt_type_t et)
-{
- switch (et)
- {
- case FIFO_EVENT_APP_RX:
- return "FIFO_EVENT_APP_RX";
- case FIFO_EVENT_APP_TX:
- return "FIFO_EVENT_APP_TX";
- case FIFO_EVENT_DISCONNECT:
- return "FIFO_EVENT_DISCONNECT";
- case FIFO_EVENT_BUILTIN_RX:
- return "FIFO_EVENT_BUILTIN_RX";
- case FIFO_EVENT_RPC:
- return "FIFO_EVENT_RPC";
- default:
- return "UNKNOWN FIFO EVENT";
- }
-}
-
-typedef enum
-{
- SESSION_MQ_IO_EVT_RING,
- SESSION_MQ_CTRL_EVT_RING,
- SESSION_MQ_N_RINGS
-} session_mq_rings_e;
-
#define foreach_session_input_error \
_(NO_SESSION, "No session drops") \
_(NO_LISTENER, "No listener for dst port drops") \
@@ -95,57 +43,6 @@ typedef enum
SESSION_N_ERROR,
} session_error_t;
-typedef struct
-{
- void *fp;
- void *arg;
-} session_rpc_args_t;
-
-/* *INDENT-OFF* */
-typedef struct
-{
- u8 event_type;
- u8 postponed;
- union
- {
- svm_fifo_t *fifo;
- session_handle_t session_handle;
- session_rpc_args_t rpc_args;
- struct
- {
- u8 data[0];
- };
- };
-} __clib_packed session_event_t;
-/* *INDENT-ON* */
-
-#define SESSION_MSG_NULL { }
-
-typedef struct session_dgram_pre_hdr_
-{
- u32 data_length;
- u32 data_offset;
-} session_dgram_pre_hdr_t;
-
-/* *INDENT-OFF* */
-typedef CLIB_PACKED (struct session_dgram_header_
-{
- u32 data_length;
- u32 data_offset;
- ip46_address_t rmt_ip;
- ip46_address_t lcl_ip;
- u16 rmt_port;
- u16 lcl_port;
- u8 is_ip4;
-}) session_dgram_hdr_t;
-/* *INDENT-ON* */
-
-#define SESSION_CONN_ID_LEN 37
-#define SESSION_CONN_HDR_LEN 45
-
-STATIC_ASSERT (sizeof (session_dgram_hdr_t) == (SESSION_CONN_ID_LEN + 8),
- "session conn id wrong length");
-
typedef struct session_tx_context_
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -493,7 +390,7 @@ void session_transport_closing_notify (transport_connection_t * tc);
void session_transport_delete_notify (transport_connection_t * tc);
void session_transport_closed_notify (transport_connection_t * tc);
void session_transport_reset_notify (transport_connection_t * tc);
-int stream_session_accept (transport_connection_t * tc, u32 listener_index,
+int session_stream_accept (transport_connection_t * tc, u32 listener_index,
u8 notify);
u32 session_tx_fifo_max_dequeue (transport_connection_t * tc);
void session_register_transport (transport_proto_t transport_proto,