lsquic_ietf.h revision 9fc12041
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
79fc12041SDmitri Tikhonov/* [draft-ietf-quic-transport-25] Section 22.4 */
85392f7a3SLiteSpeed Techenum trans_error_code
95392f7a3SLiteSpeed Tech{
105392f7a3SLiteSpeed Tech    TEC_NO_ERROR                   =  0x0,
115392f7a3SLiteSpeed Tech    TEC_INTERNAL_ERROR             =  0x1,
125392f7a3SLiteSpeed Tech    TEC_SERVER_BUSY                =  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,
225392f7a3SLiteSpeed Tech    TEC_CRYPTO_BUFFER_EXCEEDED     =  0xD,
235392f7a3SLiteSpeed Tech};
245392f7a3SLiteSpeed Tech
255392f7a3SLiteSpeed Tech/* Must be at least two */
265392f7a3SLiteSpeed Tech#define MAX_IETF_CONN_DCIDS 8
275392f7a3SLiteSpeed Tech
289fc12041SDmitri Tikhonov/* [draft-ietf-quic-tls-25] Section 5.8 */
299fc12041SDmitri Tikhonov#define IETF_RETRY_KEY_BUF ((unsigned char *) \
309fc12041SDmitri Tikhonov        "\x4d\x32\xec\xdb\x2a\x21\x33\xc8\x41\xe4\x04\x3d\xf2\x7d\x44\x30")
319fc12041SDmitri Tikhonov#define IETF_RETRY_KEY_SZ 16
329fc12041SDmitri Tikhonov#define IETF_RETRY_NONCE_BUF ((unsigned char *) \
339fc12041SDmitri Tikhonov                        "\x4d\x16\x11\xd0\x55\x13\xa5\x52\xc5\x87\xd5\x75")
349fc12041SDmitri Tikhonov#define IETF_RETRY_NONCE_SZ 12
359fc12041SDmitri Tikhonov
365392f7a3SLiteSpeed Tech#endif
37