FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
quic.h File Reference
+ Include dependency graph for quic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  quic_ctx_
 
struct  quic_session_cache_
 
struct  quic_stream_data_
 
struct  quic_crypto_context_data_
 
struct  quic_worker_ctx_
 
struct  quic_rx_packet_ctx_
 
struct  quic_main_
 

Macros

#define QUIC_DEBUG   0
 
#define QUIC_TSTAMP_RESOLUTION   0.001 /* QUIC tick resolution (1ms) */
 
#define QUIC_TIMER_HANDLE_INVALID   ((u32) ~0)
 
#define QUIC_SESSION_INVALID   ((u32) ~0 - 1)
 
#define QUIC_MAX_PACKET_SIZE   1280
 
#define QUIC_INT_MAX   0x3FFFFFFFFFFFFFFF
 
#define QUIC_DEFAULT_FIFO_SIZE   (64 << 10)
 
#define QUIC_SEND_PACKET_VEC_SIZE   16
 
#define QUIC_IV_LEN   17
 
#define QUIC_MAX_COALESCED_PACKET   4
 
#define QUIC_RCV_MAX_PACKETS   16
 
#define QUIC_DEFAULT_CONN_TIMEOUT   (30 * 1000) /* 30 seconds */
 
#define QUICLY_QUIC_BIT   0x40
 
#define QUICLY_PACKET_TYPE_INITIAL   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0)
 
#define QUICLY_PACKET_TYPE_0RTT   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x10)
 
#define QUICLY_PACKET_TYPE_HANDSHAKE   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x20)
 
#define QUICLY_PACKET_TYPE_RETRY   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x30)
 
#define QUICLY_PACKET_TYPE_BITMASK   0xf0
 
#define QUIC_ERROR_FULL_FIFO   0xff10
 
#define QUIC_APP_ERROR_CLOSE_NOTIFY   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0)
 
#define QUIC_APP_ALLOCATION_ERROR   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x1)
 
#define QUIC_APP_ACCEPT_NOTIFY_ERROR   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x2)
 
#define QUIC_APP_CONNECT_NOTIFY_ERROR   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x3)
 
#define QUIC_DECRYPT_PACKET_OK   0
 
#define QUIC_DECRYPT_PACKET_NOTOFFLOADED   1
 
#define QUIC_DECRYPT_PACKET_ERROR   2
 
#define QUIC_DBG(_lvl, _fmt, _args...)
 
#define QUIC_ASSERT(truth)
 
#define QUIC_ERR(_fmt, _args...)
 
#define quic_error(n, s)   QUIC_ERROR_##n,
 

Typedefs

typedef enum quic_ctx_conn_state_ quic_ctx_conn_state_t
 
typedef enum quic_packet_type_ quic_packet_type_t
 
typedef enum quic_ctx_flags_ quic_ctx_flags_t
 
typedef enum quic_cc_type quic_cc_type_t
 
typedef struct quic_ctx_ quic_ctx_t
 
typedef struct quic_session_cache_ quic_session_cache_t
 
typedef struct quic_stream_data_ quic_stream_data_t
 
typedef struct quic_crypto_context_data_ quic_crypto_context_data_t
 
typedef struct quic_worker_ctx_ quic_worker_ctx_t
 
typedef struct quic_rx_packet_ctx_ quic_rx_packet_ctx_t
 
typedef struct quic_main_ quic_main_t
 

Enumerations

enum  quic_error_t { QUIC_N_ERROR }
 
enum  quic_ctx_conn_state_ {
  QUIC_CONN_STATE_OPENED, QUIC_CONN_STATE_HANDSHAKE, QUIC_CONN_STATE_READY, QUIC_CONN_STATE_PASSIVE_CLOSING,
  QUIC_CONN_STATE_PASSIVE_CLOSING_APP_CLOSED, QUIC_CONN_STATE_PASSIVE_CLOSING_QUIC_CLOSED, QUIC_CONN_STATE_ACTIVE_CLOSING
}
 
enum  quic_packet_type_ {
  QUIC_PACKET_TYPE_NONE, QUIC_PACKET_TYPE_RECEIVE, QUIC_PACKET_TYPE_MIGRATE, QUIC_PACKET_TYPE_ACCEPT,
  QUIC_PACKET_TYPE_RESET, QUIC_PACKET_TYPE_DROP
}
 
enum  quic_ctx_flags_ { QUIC_F_IS_STREAM = (1 << 0), QUIC_F_IS_LISTENER = (1 << 1) }
 
enum  quic_cc_type { QUIC_CC_RENO, QUIC_CC_CUBIC }
 

Functions

 STATIC_ASSERT (offsetof(quic_ctx_t, _qctx_end_marker)<=TRANSPORT_CONN_ID_LEN, "connection data must be less than TRANSPORT_CONN_ID_LEN bytes")
 
 STATIC_ASSERT (offsetof(quic_ctx_t, _sctx_end_marker)<=TRANSPORT_CONN_ID_LEN, "connection data must be less than TRANSPORT_CONN_ID_LEN bytes")
 

Variables

vlib_node_registration_t quic_input_node
 (constructor) VLIB_REGISTER_NODE (quic_input_node) More...
 

Macro Definition Documentation

◆ QUIC_APP_ACCEPT_NOTIFY_ERROR

#define QUIC_APP_ACCEPT_NOTIFY_ERROR   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x2)

Definition at line 67 of file quic.h.

◆ QUIC_APP_ALLOCATION_ERROR

#define QUIC_APP_ALLOCATION_ERROR   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x1)

Definition at line 66 of file quic.h.

◆ QUIC_APP_CONNECT_NOTIFY_ERROR

#define QUIC_APP_CONNECT_NOTIFY_ERROR   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0x3)

Definition at line 68 of file quic.h.

◆ QUIC_APP_ERROR_CLOSE_NOTIFY

#define QUIC_APP_ERROR_CLOSE_NOTIFY   QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(0)

Definition at line 65 of file quic.h.

◆ QUIC_ASSERT

#define QUIC_ASSERT (   truth)
Value:
do { \
if (PREDICT_FALSE (! (truth))) \
QUIC_ERR ("ASSERT(%s) failed", # truth); \
} while (0)

Definition at line 85 of file quic.h.

◆ QUIC_DBG

#define QUIC_DBG (   _lvl,
  _fmt,
  _args... 
)

Definition at line 79 of file quic.h.

◆ QUIC_DEBUG

#define QUIC_DEBUG   0

Definition at line 37 of file quic.h.

◆ QUIC_DECRYPT_PACKET_ERROR

#define QUIC_DECRYPT_PACKET_ERROR   2

Definition at line 72 of file quic.h.

◆ QUIC_DECRYPT_PACKET_NOTOFFLOADED

#define QUIC_DECRYPT_PACKET_NOTOFFLOADED   1

Definition at line 71 of file quic.h.

◆ QUIC_DECRYPT_PACKET_OK

#define QUIC_DECRYPT_PACKET_OK   0

Definition at line 70 of file quic.h.

◆ QUIC_DEFAULT_CONN_TIMEOUT

#define QUIC_DEFAULT_CONN_TIMEOUT   (30 * 1000) /* 30 seconds */

Definition at line 52 of file quic.h.

◆ QUIC_DEFAULT_FIFO_SIZE

#define QUIC_DEFAULT_FIFO_SIZE   (64 << 10)

Definition at line 44 of file quic.h.

◆ QUIC_ERR

#define QUIC_ERR (   _fmt,
  _args... 
)
Value:
do { \
clib_warning ("QUIC-ERR: " _fmt, ##_args); \
} while (0)

Definition at line 92 of file quic.h.

◆ quic_error

#define quic_error (   n,
 
)    QUIC_ERROR_##n,

Definition at line 103 of file quic.h.

◆ QUIC_ERROR_FULL_FIFO

#define QUIC_ERROR_FULL_FIFO   0xff10

Definition at line 64 of file quic.h.

◆ QUIC_INT_MAX

#define QUIC_INT_MAX   0x3FFFFFFFFFFFFFFF

Definition at line 43 of file quic.h.

◆ QUIC_IV_LEN

#define QUIC_IV_LEN   17

Definition at line 46 of file quic.h.

◆ QUIC_MAX_COALESCED_PACKET

#define QUIC_MAX_COALESCED_PACKET   4

Definition at line 48 of file quic.h.

◆ QUIC_MAX_PACKET_SIZE

#define QUIC_MAX_PACKET_SIZE   1280

Definition at line 41 of file quic.h.

◆ QUIC_RCV_MAX_PACKETS

#define QUIC_RCV_MAX_PACKETS   16

Definition at line 50 of file quic.h.

◆ QUIC_SEND_PACKET_VEC_SIZE

#define QUIC_SEND_PACKET_VEC_SIZE   16

Definition at line 45 of file quic.h.

◆ QUIC_SESSION_INVALID

#define QUIC_SESSION_INVALID   ((u32) ~0 - 1)

Definition at line 40 of file quic.h.

◆ QUIC_TIMER_HANDLE_INVALID

#define QUIC_TIMER_HANDLE_INVALID   ((u32) ~0)

Definition at line 39 of file quic.h.

◆ QUIC_TSTAMP_RESOLUTION

#define QUIC_TSTAMP_RESOLUTION   0.001 /* QUIC tick resolution (1ms) */

Definition at line 38 of file quic.h.

◆ QUICLY_PACKET_TYPE_0RTT

#define QUICLY_PACKET_TYPE_0RTT   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x10)

Definition at line 58 of file quic.h.

◆ QUICLY_PACKET_TYPE_BITMASK

#define QUICLY_PACKET_TYPE_BITMASK   0xf0

Definition at line 61 of file quic.h.

◆ QUICLY_PACKET_TYPE_HANDSHAKE

#define QUICLY_PACKET_TYPE_HANDSHAKE   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x20)

Definition at line 59 of file quic.h.

◆ QUICLY_PACKET_TYPE_INITIAL

#define QUICLY_PACKET_TYPE_INITIAL   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0)

Definition at line 57 of file quic.h.

◆ QUICLY_PACKET_TYPE_RETRY

#define QUICLY_PACKET_TYPE_RETRY   (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x30)

Definition at line 60 of file quic.h.

◆ QUICLY_QUIC_BIT

#define QUICLY_QUIC_BIT   0x40

Definition at line 55 of file quic.h.

Typedef Documentation

◆ quic_cc_type_t

◆ quic_crypto_context_data_t

◆ quic_ctx_conn_state_t

◆ quic_ctx_flags_t

◆ quic_ctx_t

typedef struct quic_ctx_ quic_ctx_t

◆ quic_main_t

typedef struct quic_main_ quic_main_t

◆ quic_packet_type_t

◆ quic_rx_packet_ctx_t

◆ quic_session_cache_t

◆ quic_stream_data_t

◆ quic_worker_ctx_t

Enumeration Type Documentation

◆ quic_cc_type

Enumerator
QUIC_CC_RENO 
QUIC_CC_CUBIC 

Definition at line 136 of file quic.h.

◆ quic_ctx_conn_state_

Enumerator
QUIC_CONN_STATE_OPENED 
QUIC_CONN_STATE_HANDSHAKE 
QUIC_CONN_STATE_READY 
QUIC_CONN_STATE_PASSIVE_CLOSING 
QUIC_CONN_STATE_PASSIVE_CLOSING_APP_CLOSED 
QUIC_CONN_STATE_PASSIVE_CLOSING_QUIC_CLOSED 
QUIC_CONN_STATE_ACTIVE_CLOSING 

Definition at line 109 of file quic.h.

◆ quic_ctx_flags_

Enumerator
QUIC_F_IS_STREAM 
QUIC_F_IS_LISTENER 

Definition at line 130 of file quic.h.

◆ quic_error_t

Enumerator
QUIC_N_ERROR 

Definition at line 101 of file quic.h.

◆ quic_packet_type_

Enumerator
QUIC_PACKET_TYPE_NONE 
QUIC_PACKET_TYPE_RECEIVE 
QUIC_PACKET_TYPE_MIGRATE 
QUIC_PACKET_TYPE_ACCEPT 
QUIC_PACKET_TYPE_RESET 
QUIC_PACKET_TYPE_DROP 

Definition at line 120 of file quic.h.

Function Documentation

◆ STATIC_ASSERT() [1/2]

STATIC_ASSERT ( offsetof(quic_ctx_t, _qctx_end_marker)<=  TRANSPORT_CONN_ID_LEN,
"connection data must be less than TRANSPORT_CONN_ID_LEN bytes"   
)

◆ STATIC_ASSERT() [2/2]

STATIC_ASSERT ( offsetof(quic_ctx_t, _sctx_end_marker)<=  TRANSPORT_CONN_ID_LEN,
"connection data must be less than TRANSPORT_CONN_ID_LEN bytes"   
)

Variable Documentation

◆ quic_input_node

vlib_node_registration_t quic_input_node

(constructor) VLIB_REGISTER_NODE (quic_input_node)

Definition at line 2996 of file quic.c.

PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition: clib.h:124