summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-04-21 09:05:56 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-04-22 16:07:11 +0000
commita54b62d77794dee48510e7c128d3ab2fc90934b3 (patch)
tree019fb22c41ccf585c6a99bb778dc291f672abdc1 /src/vcl/vcl_private.c
parentc7e7819ad5c152168a5f1a217c3b72043fd48797 (diff)
vcl session: refactor passing of crypto context
Pass tls/quic crypto context using extended config instead of bloating conect/listen messages. Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0bc637ae310e6c31ef1e16847501dcb81453ee94
Diffstat (limited to 'src/vcl/vcl_private.c')
-rw-r--r--src/vcl/vcl_private.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index 721416b045a..464061cfb5a 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -316,6 +316,21 @@ vcl_session_write_ready (vcl_session_t * s)
}
int
+vcl_session_alloc_ext_cfg (vcl_session_t *s,
+ transport_endpt_ext_cfg_type_t type)
+{
+ if (s->ext_config)
+ return -1;
+
+ s->ext_config = clib_mem_alloc (sizeof (transport_endpt_ext_cfg_t));
+ clib_memset (s->ext_config, 0, sizeof (*s->ext_config));
+ s->ext_config->len = sizeof (*s->ext_config);
+ s->ext_config->type = type;
+
+ return 0;
+}
+
+int
vcl_segment_attach (u64 segment_handle, char *name, ssvm_segment_type_t type,
int fd)
{