summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-02-21 12:07:41 -0800
committerDave Barach <openvpp@barachs.net>2018-03-02 12:54:31 +0000
commit371ca50a74a9c4f1b74c4c1b65c6fdec610fcfc3 (patch)
tree947e800faa7846223bdf8fb73429c657ddaf5805 /src/vnet/session/session_node.c
parent9e6356962a0cbb84f7ea9056b954d65aaa231a61 (diff)
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 <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c18
1 files changed, 16 insertions, 2 deletions
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;