summaryrefslogtreecommitdiffstats
path: root/src/vnet/tls
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/tls
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/tls')
-rw-r--r--src/vnet/tls/tls.c8
-rw-r--r--src/vnet/tls/tls.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index ed12378862d..e36a88476ee 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Cisco and/or its affiliates.
+ * Copyright (c) 2018-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -586,7 +586,7 @@ tls_disconnect (u32 ctx_handle, u32 thread_index)
u32
tls_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
{
- vnet_bind_args_t _bargs, *args = &_bargs;
+ vnet_listen_args_t _bargs, *args = &_bargs;
app_worker_t *app_wrk;
tls_main_t *tm = &tls_main;
session_handle_t tls_handle;
@@ -612,7 +612,7 @@ tls_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
clib_memset (args, 0, sizeof (*args));
args->app_index = tm->app_index;
args->sep_ext = *sep;
- if (vnet_bind (args))
+ if (vnet_listen (args))
return -1;
tls_handle = args->handle;
@@ -648,7 +648,7 @@ tls_stop_listen (u32 lctx_index)
.app_index = tls_main.app_index,
.wrk_map_index = 0 /* default wrk */
};
- if (vnet_unbind (&a))
+ if (vnet_unlisten (&a))
clib_warning ("unbind returned");
engine_type = lctx->tls_ctx_engine;
diff --git a/src/vnet/tls/tls.h b/src/vnet/tls/tls.h
index b9b0e0baa83..83daa426bf1 100644
--- a/src/vnet/tls/tls.h
+++ b/src/vnet/tls/tls.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 Cisco and/or its affiliates.
+ * Copyright (c) 2018-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -15,6 +15,7 @@
#include <vnet/session/application_interface.h>
+#include <vnet/session/session.h>
#include <vppinfra/lock.h>
#ifndef SRC_VNET_TLS_TLS_H_