20 #ifndef SRC_VNET_TLS_TLS_H_ 21 #define SRC_VNET_TLS_TLS_H_ 24 #define TLS_DEBUG_LEVEL_CLIENT 0 25 #define TLS_DEBUG_LEVEL_SERVER 0 27 #define TLS_CHUNK_SIZE (1 << 14) 28 #define TLS_CA_CERT_PATH "/etc/ssl/certs/ca-certificates.crt" 31 #define TLS_DBG(_lvl, _fmt, _args...) \ 32 if (_lvl <= TLS_DEBUG) \ 33 clib_warning (_fmt, ##_args) 35 #define TLS_DBG(_fmt, _args...) 50 STATIC_ASSERT (
sizeof (tls_ctx_id_t) <= 42,
"ctx id must be less than 42");
59 #define parent_app_index c_tls_ctx_id.parent_app_index 60 #define app_session_handle c_tls_ctx_id.app_session_handle 61 #define tls_session_handle c_tls_ctx_id.tls_session_handle 62 #define listener_ctx_index c_tls_ctx_id.listener_ctx_index 63 #define tcp_is_ip4 c_tls_ctx_id.tcp_is_ip4 64 #define tls_ctx_engine c_tls_ctx_id.tls_engine_id 65 #define tls_ctx_handle c_c_index 68 #define parent_app_api_context c_s_index 92 u32 (*ctx_alloc) (void);
113 tls_engine_type_t type);
enum tls_engine_type_ tls_engine_type_t
struct _transport_connection transport_connection_t
clib_rwlock_t half_open_rwlock
struct tls_main_ tls_main_t
int tls_notify_app_accept(tls_ctx_t *ctx)
struct tls_engine_vft_ tls_engine_vft_t
#define listener_ctx_index
struct _svm_fifo svm_fifo_t
void tls_notify_app_enqueue(tls_ctx_t *ctx, stream_session_t *app_session)
struct _stream_session_t stream_session_t
int tls_add_vpp_q_evt(svm_fifo_t *f, u8 evt_type)
tls_ctx_id_t c_tls_ctx_id
int tls_notify_app_connected(tls_ctx_t *ctx, u8 is_failed)
struct tls_ctx_ tls_ctx_t
void tls_register_engine(const tls_engine_vft_t *vft, tls_engine_type_t type)
transport_connection_t connection
#define app_session_handle
tls_main_t * vnet_tls_get_main(void)
tls_ctx_t * half_open_ctx_pool
typedef CLIB_PACKED(struct tls_cxt_id_{u32 parent_app_index;session_handle_t app_session_handle;session_handle_t tls_session_handle;u32 listener_ctx_index;u8 tcp_is_ip4;u8 tls_engine_id;}) tls_ctx_id_t
#define tls_session_handle
tls_ctx_t * listener_ctx_pool
STATIC_ASSERT(sizeof(tls_ctx_id_t)<=42,"ctx id must be less than 42")