FD.io VPP  v21.01.1
Vector Packet Processing
tls_picotls.h
Go to the documentation of this file.
1 #ifndef __included_tls_picotls_h__
2 #define __included_tls_picotls_h__
3 
4 #include <picotls.h>
5 #include <picotls/openssl.h>
6 #include <vnet/plugin/plugin.h>
7 #include <vnet/tls/tls.h>
8 #include <vpp/app/version.h>
9 
10 #define TLS_RX_LEN(x) ((x)->rx_content + (x)->rx_len)
11 #define TLS_RX_OFFSET(x) ((x)->rx_content + (x)->rx_offset)
12 #define TLS_RX_IS_LEFT(x) ((x)->rx_len != 0 && (x)->rx_len != (x)->rx_offset)
13 #define TLS_RX_LEFT_LEN(x) ((x)->rx_len - (x)->rx_offset)
14 
15 #define TLS_READ_OFFSET(x) ((x)->read_buffer.base + (x)->read_buffer_offset)
16 #define TLS_READ_IS_LEFT(x) ((x)->read_buffer.off != 0 && (x)->read_buffer.off != (x)->read_buffer_offset)
17 #define TLS_READ_LEFT_LEN(x) ((x)->read_buffer.off - (x)->read_buffer_offset)
18 
19 #define TLS_WRITE_OFFSET(x) ((x)->write_buffer.base + (x)->write_buffer_offset)
20 #define TLS_WRITE_IS_LEFT(x) ((x)->write_buffer.off != 0 && (x)->write_buffer.off != (x)->write_buffer_offset)
21 
22 
23 typedef struct tls_ctx_picotls_
24 {
27  ptls_t *tls;
29  int rx_offset;
30  int rx_len;
31  ptls_buffer_t read_buffer;
32  ptls_buffer_t write_buffer;
33  uint8_t *write_content;
37 
39 {
41  ptls_context_t *ptls_ctx;
43 
44 typedef struct picotls_main_
45 {
50 
51 #endif /* __included_quic_certs_h__ */
52 
53 /*
54  * fd.io coding-style-patch-verification: ON
55  *
56  * Local Variables:
57  * eval: (c-set-style "gnu")
58  * End:
59  */
struct picotls_main_ picotls_main_t
struct tls_ctx_picotls_ picotls_ctx_t
unsigned char u8
Definition: types.h:56
tls_ctx_t ctx
Definition: tls_picotls.h:25
picotls_listen_ctx_t * lctx_pool
Definition: tls_picotls.h:47
unsigned int u32
Definition: types.h:88
struct tls_listen_ctx_picotls_ picotls_listen_ctx_t
picotls_ctx_t *** ctx_pool
Definition: tls_picotls.h:46
Definition: tls.h:58
clib_rwlock_t crypto_keys_rw_lock
Definition: tls_picotls.h:48
ptls_context_t * ptls_ctx
Definition: tls_picotls.h:41
ptls_buffer_t write_buffer
Definition: tls_picotls.h:32
uint8_t * write_content
Definition: tls_picotls.h:33
ptls_buffer_t read_buffer
Definition: tls_picotls.h:31