lsquic_ietf.h revision 082507cd
106b2a236SDmitri Tikhonov/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */ 25392f7a3SLiteSpeed Tech#ifndef LSQUIC_IETF_H 35392f7a3SLiteSpeed Tech#define LSQUIC_IETF_H 1 45392f7a3SLiteSpeed Tech 55392f7a3SLiteSpeed Tech/* Things specific to the IETF version of QUIC that do not fit anywhere else */ 65392f7a3SLiteSpeed Tech 726e8f082SDmitri Tikhonov/* [draft-ietf-quic-transport-33] Section 20 */ 85392f7a3SLiteSpeed Techenum trans_error_code 95392f7a3SLiteSpeed Tech{ 105392f7a3SLiteSpeed Tech TEC_NO_ERROR = 0x0, 115392f7a3SLiteSpeed Tech TEC_INTERNAL_ERROR = 0x1, 124051ae3aSDmitri Tikhonov TEC_CONNECTION_REFUSED = 0x2, 135392f7a3SLiteSpeed Tech TEC_FLOW_CONTROL_ERROR = 0x3, 145392f7a3SLiteSpeed Tech TEC_STREAM_LIMIT_ERROR = 0x4, 155392f7a3SLiteSpeed Tech TEC_STREAM_STATE_ERROR = 0x5, 165392f7a3SLiteSpeed Tech TEC_FINAL_SIZE_ERROR = 0x6, 175392f7a3SLiteSpeed Tech TEC_FRAME_ENCODING_ERROR = 0x7, 185392f7a3SLiteSpeed Tech TEC_TRANSPORT_PARAMETER_ERROR = 0x8, 199fc12041SDmitri Tikhonov TEC_CONNECTION_ID_LIMIT_ERROR = 0x9, 205392f7a3SLiteSpeed Tech TEC_PROTOCOL_VIOLATION = 0xA, 219fc12041SDmitri Tikhonov TEC_INVALID_TOKEN = 0xB, 22fb73393fSDmitri Tikhonov TEC_APPLICATION_ERROR = 0xC, 235392f7a3SLiteSpeed Tech TEC_CRYPTO_BUFFER_EXCEEDED = 0xD, 24b62ec17fSDmitri Tikhonov TEC_KEY_UPDATE_ERROR = 0xE, 25b62ec17fSDmitri Tikhonov TEC_AEAD_LIMIT_REACHED = 0xF, 2626e8f082SDmitri Tikhonov TEC_NO_VIABLE_PATH = 0x10, 275392f7a3SLiteSpeed Tech}; 285392f7a3SLiteSpeed Tech 295392f7a3SLiteSpeed Tech/* Must be at least two */ 305392f7a3SLiteSpeed Tech#define MAX_IETF_CONN_DCIDS 8 315392f7a3SLiteSpeed Tech 329fc12041SDmitri Tikhonov/* [draft-ietf-quic-tls-25] Section 5.8 */ 339fc12041SDmitri Tikhonov#define IETF_RETRY_KEY_SZ 16 349fc12041SDmitri Tikhonov#define IETF_RETRY_NONCE_SZ 12 359fc12041SDmitri Tikhonov 3626e8f082SDmitri Tikhonov#define N_IETF_RETRY_VERSIONS 3 374051ae3aSDmitri Tikhonovextern const unsigned char *const lsquic_retry_key_buf[N_IETF_RETRY_VERSIONS]; 384051ae3aSDmitri Tikhonovextern const unsigned char *const lsquic_retry_nonce_buf[N_IETF_RETRY_VERSIONS]; 3926e8f082SDmitri Tikhonov#define lsquic_version_2_retryver(ver_) ( \ 4026e8f082SDmitri Tikhonov (ver_) <= LSQVER_ID27 ? 0 : \ 41082507cdSGeorge Wang (ver_) < LSQVER_I001 ? 1 : \ 4226e8f082SDmitri Tikhonov 2) 434051ae3aSDmitri Tikhonov 445392f7a3SLiteSpeed Tech#endif 45