lsquic_ietf.h revision 4051ae3a
17d09751dSDmitri Tikhonov/* Copyright (c) 2017 - 2020 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 7fb73393fSDmitri Tikhonov/* [draft-ietf-quic-transport-28] 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, 245392f7a3SLiteSpeed Tech}; 255392f7a3SLiteSpeed Tech 265392f7a3SLiteSpeed Tech/* Must be at least two */ 275392f7a3SLiteSpeed Tech#define MAX_IETF_CONN_DCIDS 8 285392f7a3SLiteSpeed Tech 299fc12041SDmitri Tikhonov/* [draft-ietf-quic-tls-25] Section 5.8 */ 309fc12041SDmitri Tikhonov#define IETF_RETRY_KEY_SZ 16 319fc12041SDmitri Tikhonov#define IETF_RETRY_NONCE_SZ 12 329fc12041SDmitri Tikhonov 334051ae3aSDmitri Tikhonov#define N_IETF_RETRY_VERSIONS 2 344051ae3aSDmitri Tikhonovextern const unsigned char *const lsquic_retry_key_buf[N_IETF_RETRY_VERSIONS]; 354051ae3aSDmitri Tikhonovextern const unsigned char *const lsquic_retry_nonce_buf[N_IETF_RETRY_VERSIONS]; 364051ae3aSDmitri Tikhonov#define lsquic_version_2_retryver(ver_) ((ver_) > LSQVER_ID28) 374051ae3aSDmitri Tikhonov 385392f7a3SLiteSpeed Tech#endif 39