X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Ftlspicotls%2Ftls_picotls.h;h=d24d7e2f17213f4ae7da947829f52ef91fd03153;hb=aed42948510a94922566fa1a4bfb6eec281e5dee;hp=b8e802eb55168d638c9835e61c1950071d977b32;hpb=619179cfcdb087acb0864d273c4fbd3b7396974c;p=vpp.git diff --git a/src/plugins/tlspicotls/tls_picotls.h b/src/plugins/tlspicotls/tls_picotls.h index b8e802eb551..d24d7e2f172 100644 --- a/src/plugins/tlspicotls/tls_picotls.h +++ b/src/plugins/tlspicotls/tls_picotls.h @@ -9,9 +9,14 @@ #define TLS_RX_LEN(x) ((x)->rx_content + (x)->rx_len) #define TLS_RX_OFFSET(x) ((x)->rx_content + (x)->rx_offset) -#define TLS_RX_IS_LEFT(x) ((x)->rx_len != (x)->rx_offset) +#define TLS_RX_IS_LEFT(x) ((x)->rx_len != 0 && (x)->rx_len != (x)->rx_offset) #define TLS_RX_LEFT_LEN(x) ((x)->rx_len - (x)->rx_offset) +#define TLS_READ_OFFSET(x) ((x)->read_buffer.base + (x)->read_buffer_offset) +#define TLS_READ_IS_LEFT(x) ((x)->read_buffer.off != 0 && (x)->read_buffer.off != (x)->read_buffer_offset) +#define TLS_READ_LEFT_LEN(x) ((x)->read_buffer.off - (x)->read_buffer_offset) + +#define TLSP_MIN_ENQ_SPACE (1 << 16) typedef struct tls_ctx_picotls_ { @@ -21,6 +26,8 @@ typedef struct tls_ctx_picotls_ u8 *rx_content; int rx_offset; int rx_len; + ptls_buffer_t read_buffer; + int read_buffer_offset; } picotls_ctx_t; typedef struct tls_listen_ctx_picotls_ @@ -33,6 +40,10 @@ typedef struct picotls_main_ { picotls_ctx_t ***ctx_pool; picotls_listen_ctx_t *lctx_pool; + u8 **tx_bufs; + u8 **rx_bufs; + ptls_context_t *client_ptls_ctx; + clib_rwlock_t crypto_keys_rw_lock; } picotls_main_t; #endif /* __included_quic_certs_h__ */