FD.io VPP
v21.10.1-2-g0a485f517
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 TLSP_MIN_ENQ_SPACE (1 << 16)
20
21
typedef
struct
tls_ctx_picotls_
22
{
23
tls_ctx_t
ctx
;
24
u32
ptls_ctx_idx
;
25
ptls_t *
tls
;
26
u8
*
rx_content
;
27
int
rx_offset
;
28
int
rx_len
;
29
ptls_buffer_t
read_buffer
;
30
int
read_buffer_offset
;
31
}
picotls_ctx_t
;
32
33
typedef
struct
tls_listen_ctx_picotls_
34
{
35
u32
ptls_lctx_index
;
36
ptls_context_t *
ptls_ctx
;
37
}
picotls_listen_ctx_t
;
38
39
typedef
struct
picotls_main_
40
{
41
picotls_ctx_t
***
ctx_pool
;
42
picotls_listen_ctx_t
*
lctx_pool
;
43
u8
**
tx_bufs
;
44
u8
**
rx_bufs
;
45
ptls_context_t *
client_ptls_ctx
;
46
clib_rwlock_t
crypto_keys_rw_lock
;
47
}
picotls_main_t
;
48
49
#endif
/* __included_quic_certs_h__ */
50
51
/*
52
* fd.io coding-style-patch-verification: ON
53
*
54
* Local Variables:
55
* eval: (c-set-style "gnu")
56
* End:
57
*/
picotls_listen_ctx_t
struct tls_listen_ctx_picotls_ picotls_listen_ctx_t
tls_ctx_picotls_::read_buffer_offset
int read_buffer_offset
Definition:
tls_picotls.h:30
tls_ctx_picotls_::rx_content
u8 * rx_content
Definition:
tls_picotls.h:26
tls_listen_ctx_picotls_::ptls_ctx
ptls_context_t * ptls_ctx
Definition:
tls_picotls.h:36
picotls_ctx_t
struct tls_ctx_picotls_ picotls_ctx_t
picotls_main_::tx_bufs
u8 ** tx_bufs
Definition:
tls_picotls.h:43
picotls_main_::client_ptls_ctx
ptls_context_t * client_ptls_ctx
Definition:
tls_picotls.h:45
tls_ctx_picotls_::tls
ptls_t * tls
Definition:
tls_picotls.h:25
tls_ctx_picotls_::read_buffer
ptls_buffer_t read_buffer
Definition:
tls_picotls.h:29
tls_ctx_
Definition:
tls.h:59
tls_ctx_picotls_::ctx
tls_ctx_t ctx
Definition:
tls_picotls.h:23
picotls_main_::crypto_keys_rw_lock
clib_rwlock_t crypto_keys_rw_lock
Definition:
tls_picotls.h:46
clib_rw_lock_
Definition:
lock.h:139
tls_ctx_picotls_
Definition:
tls_picotls.h:21
plugin.h
tls_listen_ctx_picotls_::ptls_lctx_index
u32 ptls_lctx_index
Definition:
tls_picotls.h:35
picotls_main_::rx_bufs
u8 ** rx_bufs
Definition:
tls_picotls.h:44
tls_ctx_picotls_::rx_len
int rx_len
Definition:
tls_picotls.h:28
u32
unsigned int u32
Definition:
types.h:88
picotls_main_t
struct picotls_main_ picotls_main_t
tls_listen_ctx_picotls_
Definition:
tls_picotls.h:33
tls_ctx_picotls_::rx_offset
int rx_offset
Definition:
tls_picotls.h:27
picotls_main_::ctx_pool
picotls_ctx_t *** ctx_pool
Definition:
tls_picotls.h:41
tls.h
picotls_main_::lctx_pool
picotls_listen_ctx_t * lctx_pool
Definition:
tls_picotls.h:42
u8
unsigned char u8
Definition:
types.h:56
picotls_main_
Definition:
tls_picotls.h:39
tls_ctx_picotls_::ptls_ctx_idx
u32 ptls_ctx_idx
Definition:
tls_picotls.h:24
src
plugins
tlspicotls
tls_picotls.h
Generated on Sat Jan 8 2022 10:35:53 for FD.io VPP by
1.8.17