From 371ca50a74a9c4f1b74c4c1b65c6fdec610fcfc3 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 21 Feb 2018 12:07:41 -0800 Subject: session: first approximation implementation of tls It consists of two main parts. First, add an application transport type whereby applications can offer transport to other applications. For instance, a tls app can offer transport services to other applications. And second, a tls transport app that leverages the mbedtls library for tls protocol implementation. Change-Id: I616996c6e6539a9e2368fab8a1ac874d7c5d9838 Signed-off-by: Florin Coras --- src/vnet/session/session_node.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/vnet/session/session_node.c') diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 796056e7088..9cd0ef18415 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -389,6 +389,20 @@ session_tx_fifo_dequeue_and_snd (vlib_main_t * vm, vlib_node_runtime_t * node, n_tx_pkts, 0); } +int +session_tx_fifo_dequeue_internal (vlib_main_t * vm, + vlib_node_runtime_t * node, + session_manager_main_t * smm, + session_fifo_event_t * e0, + stream_session_t * s0, u32 thread_index, + int *n_tx_pkts) +{ + application_t *app; + app = application_get (s0->opaque); + svm_fifo_unset_event (s0->server_tx_fifo); + return app->cb_fns.builtin_app_tx_callback (s0); +} + always_inline stream_session_t * session_event_get_session (session_fifo_event_t * e, u8 thread_index) { @@ -505,7 +519,7 @@ session_node_lookup_fifo_event (svm_fifo_t * f, session_fifo_event_t * e) clib_memcpy (e, headp, q->elsize); found = session_node_cmp_event (e, f); if (found) - break; + return 1; if (++index == q->maxsize) index = 0; } @@ -657,7 +671,7 @@ skip_dequeue: continue; svm_fifo_unset_event (s0->server_rx_fifo); app = application_get (s0->app_index); - app->cb_fns.builtin_server_rx_callback (s0); + app->cb_fns.builtin_app_rx_callback (s0); break; case FIFO_EVENT_RPC: fp = e0->rpc_args.fp; -- cgit 1.2.3-korg