lsquic_ietf.h revision b62ec17f
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 7b62ec17fSDmitri Tikhonov/* [draft-ietf-quic-transport-31] 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, 265392f7a3SLiteSpeed Tech}; 275392f7a3SLiteSpeed Tech 285392f7a3SLiteSpeed Tech/* Must be at least two */ 295392f7a3SLiteSpeed Tech#define MAX_IETF_CONN_DCIDS 8 305392f7a3SLiteSpeed Tech 319fc12041SDmitri Tikhonov/* [draft-ietf-quic-tls-25] Section 5.8 */ 329fc12041SDmitri Tikhonov#define IETF_RETRY_KEY_SZ 16 339fc12041SDmitri Tikhonov#define IETF_RETRY_NONCE_SZ 12 349fc12041SDmitri Tikhonov 354051ae3aSDmitri Tikhonov#define N_IETF_RETRY_VERSIONS 2 364051ae3aSDmitri Tikhonovextern const unsigned char *const lsquic_retry_key_buf[N_IETF_RETRY_VERSIONS]; 374051ae3aSDmitri Tikhonovextern const unsigned char *const lsquic_retry_nonce_buf[N_IETF_RETRY_VERSIONS]; 384051ae3aSDmitri Tikhonov#define lsquic_version_2_retryver(ver_) ((ver_) > LSQVER_ID28) 394051ae3aSDmitri Tikhonov 405392f7a3SLiteSpeed Tech#endif 41