quic: Implement crypto contexts
[vpp.git] / src / vnet / session / application_interface.h
index 5c26060..a40aa9d 100644 (file)
@@ -176,6 +176,15 @@ typedef struct _vnet_app_add_cert_key_pair_args_
   u32 index;
 } vnet_app_add_cert_key_pair_args_t;
 
+typedef struct crypto_ctx_
+{
+  u32 ctx_index;               /**< index in crypto context pool */
+  u32 n_subscribers;           /**< refcount of sessions using said context */
+  u32 ckpair_index;            /**< certificate & key */
+  u8 crypto_engine;
+  void *data;                  /**< protocol specific data */
+} crypto_context_t;
+
 /* Application attach options */
 typedef enum
 {
@@ -353,6 +362,7 @@ typedef struct session_accepted_msg_
   u64 segment_handle;
   uword vpp_event_queue_address;
   transport_endpoint_t rmt;
+  u8 flags;
 } __clib_packed session_accepted_msg_t;
 
 typedef struct session_accepted_reply_msg_
@@ -378,6 +388,7 @@ typedef struct session_connect_msg_
   u64 parent_handle;
   u32 ckpair_index;
   u8 crypto_engine;
+  u8 flags;
 } __clib_packed session_connect_msg_t;
 
 STATIC_ASSERT (sizeof (session_connect_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,