summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.h
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/vnet/session/application_interface.h
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/vnet/session/application_interface.h')
-rw-r--r--src/vnet/session/application_interface.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index be6c74c6529..ba148e287ad 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -314,8 +314,6 @@ typedef struct session_listen_msg_
u8 proto;
u8 is_ip4;
ip46_address_t ip;
- u32 ckpair_index;
- u8 crypto_engine;
u8 flags;
uword ext_config;
} __clib_packed session_listen_msg_t;
@@ -399,18 +397,7 @@ typedef struct session_connect_msg_
u32 ckpair_index;
u8 crypto_engine;
u8 flags;
- union
- {
- struct
- {
- u8 hostname[16];
- u8 hostname_len;
- } __clib_packed;
- struct
- {
- uword ext_config;
- } __clib_packed;
- };
+ uword ext_config;
} __clib_packed session_connect_msg_t;
STATIC_ASSERT (sizeof (session_connect_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
@@ -870,6 +857,20 @@ typedef struct app_sapi_msg_
};
} __clib_packed app_sapi_msg_t;
+static inline void
+session_endpoint_alloc_ext_cfg (session_endpoint_cfg_t *sep_ext,
+ transport_endpt_ext_cfg_type_t type)
+{
+ transport_endpt_ext_cfg_t *cfg;
+ u32 cfg_size;
+
+ cfg_size = sizeof (transport_endpt_ext_cfg_t);
+ cfg = clib_mem_alloc (cfg_size);
+ clib_memset (cfg, 0, cfg_size);
+ cfg->type = type;
+ sep_ext->ext_cfg = cfg;
+}
+
#endif /* __included_uri_h__ */
/*