|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __included_quic_h__
17 #define __included_quic_h__
38 #define QUIC_TSTAMP_RESOLUTION 0.001
39 #define QUIC_TIMER_HANDLE_INVALID ((u32) ~0)
40 #define QUIC_SESSION_INVALID ((u32) ~0 - 1)
41 #define QUIC_MAX_PACKET_SIZE 1280
43 #define QUIC_INT_MAX 0x3FFFFFFFFFFFFFFF
44 #define QUIC_DEFAULT_FIFO_SIZE (64 << 10)
45 #define QUIC_SEND_PACKET_VEC_SIZE 16
46 #define QUIC_IV_LEN 17
48 #define QUIC_MAX_COALESCED_PACKET 4
50 #define QUIC_RCV_MAX_PACKETS 16
52 #define QUIC_DEFAULT_CONN_TIMEOUT (30 * 1000)
55 #define QUICLY_QUIC_BIT 0x40
57 #define QUICLY_PACKET_TYPE_INITIAL (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0)
58 #define QUICLY_PACKET_TYPE_0RTT (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x10)
59 #define QUICLY_PACKET_TYPE_HANDSHAKE (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x20)
60 #define QUICLY_PACKET_TYPE_RETRY (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x30)
61 #define QUICLY_PACKET_TYPE_BITMASK 0xf0
64 #define QUIC_ERROR_FULL_FIFO 0xff10
65 #define QUIC_APP_ERROR_CLOSE_NOTIFY QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0)
66 #define QUIC_APP_ALLOCATION_ERROR QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x1)
67 #define QUIC_APP_ACCEPT_NOTIFY_ERROR QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x2)
68 #define QUIC_APP_CONNECT_NOTIFY_ERROR QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x3)
70 #define QUIC_DECRYPT_PACKET_OK 0
71 #define QUIC_DECRYPT_PACKET_NOTOFFLOADED 1
72 #define QUIC_DECRYPT_PACKET_ERROR 2
75 #define QUIC_DBG(_lvl, _fmt, _args...) \
76 if (_lvl <= QUIC_DEBUG) \
77 clib_warning (_fmt, ##_args)
79 #define QUIC_DBG(_lvl, _fmt, _args...)
82 #if CLIB_ASSERT_ENABLE
83 #define QUIC_ASSERT(truth) ASSERT (truth)
85 #define QUIC_ASSERT(truth) \
87 if (PREDICT_FALSE (! (truth))) \
88 QUIC_ERR ("ASSERT(%s) failed", # truth); \
92 #define QUIC_ERR(_fmt, _args...) \
94 clib_warning ("QUIC-ERR: " _fmt, ##_args); \
103 #define quic_error(n,s) QUIC_ERROR_##n,
190 "connection data must be less than TRANSPORT_CONN_ID_LEN bytes");
193 "connection data must be less than TRANSPORT_CONN_ID_LEN bytes");
@ QUIC_CONN_STATE_PASSIVE_CLOSING_APP_CLOSED
session_handle_t udp_session_handle
tw_timer_wheel_1t_3w_1024sl_ov_t timer_wheel
worker timer wheel
transport_connection_t connection
enum quic_cc_type quic_cc_type_t
crypto_context_t * crypto_ctx_pool
per thread pool of crypto contexes
quicly_context_t quicly_ctx
int64_t time_now
worker time
#define QUIC_MAX_PACKET_SIZE
@ QUIC_CONN_STATE_PASSIVE_CLOSING_QUIC_CLOSED
quic_session_cache_t session_cache
u32 app_rx_data_len
bytes received, to be read by external app
enum quic_ctx_conn_state_ quic_ctx_conn_state_t
struct quic_ctx_::@771 ingress_keys
clib_rwlock_t crypto_keys_quic_rw_lock
struct _transport_connection transport_connection_t
STATIC_ASSERT(offsetof(quic_ctx_t, _qctx_end_marker)<=TRANSPORT_CONN_ID_LEN, "connection data must be less than TRANSPORT_CONN_ID_LEN bytes")
@ QUIC_PACKET_TYPE_ACCEPT
@ QUIC_PACKET_TYPE_RECEIVE
struct quic_worker_ctx_ quic_worker_ctx_t
quic_worker_ctx_t * wrk_ctx
enum quic_ctx_flags_ quic_ctx_flags_t
ptls_cipher_suite_t *** quic_ciphers
available ciphers by crypto engine
ptls_handshake_properties_t hs_properties
struct quic_stream_data_ quic_stream_data_t
struct quic_crypto_context_data_ quic_crypto_context_data_t
enum quic_packet_type_ quic_packet_type_t
u32 app_tx_data_len
bytes sent
quicly_cid_plaintext_t next_cid
clib_bihash_24_8_t crypto_context_hash
per thread [params:crypto_ctx_index] hash
struct quic_main_ quic_main_t
u64 max_packets_per_key
number of packets that can be sent without a key update
u8 data[QUIC_MAX_PACKET_SIZE]
quicly_conn_t * conn
QUIC ctx case.
quicly_decoded_packet_t packet
struct _vlib_node_registration vlib_node_registration_t
@ QUIC_PACKET_TYPE_MIGRATE
quicly_stream_t * stream
STREAM ctx case.
vlib_node_registration_t quic_input_node
(constructor) VLIB_REGISTER_NODE (quic_input_node)
ptls_encrypt_ticket_t super
u8 default_crypto_engine
Used if you do connect with CRYPTO_ENGINE_NONE (0)
char cid_key[QUIC_IV_LEN]
@ QUIC_CONN_STATE_HANDSHAKE
@ QUIC_CONN_STATE_PASSIVE_CLOSING
struct quic_ctx_ quic_ctx_t
uword * available_crypto_engines
Bitmap for registered engines.
f64 tstamp_ticks_per_clock
@ QUIC_CONN_STATE_ACTIVE_CLOSING
struct quic_rx_packet_ctx_ quic_rx_packet_ctx_t
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
u32 quic_connection_ctx_id
ptls_aead_context_t * aead_ctx
struct quic_session_cache_ quic_session_cache_t
ptls_cipher_context_t * hp_ctx
#define TRANSPORT_CONN_ID_LEN
clib_bihash_16_8_t connection_hash
quic connection id -> conn handle