lsquic_hq.h revision bc520ef7
17d09751dSDmitri Tikhonov/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */ 25392f7a3SLiteSpeed Tech/* 3bc520ef7SDmitri Tikhonov * lsquic_hq.h -- HTTP/3 (originally "HTTP over QUIC" or HQ) types 45392f7a3SLiteSpeed Tech */ 55392f7a3SLiteSpeed Tech 65392f7a3SLiteSpeed Tech#ifndef LSQUIC_HQ_H 75392f7a3SLiteSpeed Tech#define LSQUIC_HQ_H 1 85392f7a3SLiteSpeed Tech 9bc520ef7SDmitri Tikhonov/* [draft-ietf-quic-http-27] Section 11.2.1 */ 105392f7a3SLiteSpeed Techenum hq_frame_type 115392f7a3SLiteSpeed Tech{ 125392f7a3SLiteSpeed Tech HQFT_DATA = 0, 135392f7a3SLiteSpeed Tech HQFT_HEADERS = 1, 145392f7a3SLiteSpeed Tech HQFT_CANCEL_PUSH = 3, 155392f7a3SLiteSpeed Tech HQFT_SETTINGS = 4, 165392f7a3SLiteSpeed Tech HQFT_PUSH_PROMISE = 5, 175392f7a3SLiteSpeed Tech HQFT_GOAWAY = 7, 185392f7a3SLiteSpeed Tech HQFT_MAX_PUSH_ID = 0xD, 195392f7a3SLiteSpeed Tech /* This frame is made up and its type is never written to stream. 205392f7a3SLiteSpeed Tech * Nevertheless, just to be on the safe side, give it a value as 215392f7a3SLiteSpeed Tech * described in [draft-ietf-quic-http-20] Section 4.2.10. 225392f7a3SLiteSpeed Tech */ 235392f7a3SLiteSpeed Tech HQFT_PUSH_PREAMBLE = 0x1F * 3 + 0x21, 245392f7a3SLiteSpeed Tech}; 255392f7a3SLiteSpeed Tech 265392f7a3SLiteSpeed Tech 275392f7a3SLiteSpeed Techenum hq_setting_id 285392f7a3SLiteSpeed Tech{ 295392f7a3SLiteSpeed Tech HQSID_QPACK_MAX_TABLE_CAPACITY = 1, 305392f7a3SLiteSpeed Tech HQSID_MAX_HEADER_LIST_SIZE = 6, 315392f7a3SLiteSpeed Tech HQSID_QPACK_BLOCKED_STREAMS = 7, 325392f7a3SLiteSpeed Tech}; 335392f7a3SLiteSpeed Tech 345392f7a3SLiteSpeed Tech/* As of 12/18/2018: */ 355392f7a3SLiteSpeed Tech#define HQ_DF_QPACK_MAX_TABLE_CAPACITY 0 365392f7a3SLiteSpeed Tech#define HQ_DF_MAX_HEADER_LIST_SIZE 0 375392f7a3SLiteSpeed Tech#define HQ_DF_QPACK_BLOCKED_STREAMS 0 385392f7a3SLiteSpeed Tech 395392f7a3SLiteSpeed Tech 405392f7a3SLiteSpeed Tech/* [draft-ietf-quic-http-19] Section 10.6, 415392f7a3SLiteSpeed Tech * [draft-ietf-quic-qpack-07] Section 8.2 425392f7a3SLiteSpeed Tech */ 435392f7a3SLiteSpeed Techenum hq_uni_stream_type 445392f7a3SLiteSpeed Tech{ 455392f7a3SLiteSpeed Tech HQUST_CONTROL = 0, 465392f7a3SLiteSpeed Tech HQUST_PUSH = 1, 475392f7a3SLiteSpeed Tech HQUST_QPACK_ENC = 2, 485392f7a3SLiteSpeed Tech HQUST_QPACK_DEC = 3, 495392f7a3SLiteSpeed Tech}; 505392f7a3SLiteSpeed Tech 515392f7a3SLiteSpeed Tech 5292f6e17bSDmitri Tikhonov/* [draft-ietf-quic-http-23] Section 8.1 and 535392f7a3SLiteSpeed Tech * [draft-ietf-quic-qpack-08], Section 8.3 545392f7a3SLiteSpeed Tech */ 555392f7a3SLiteSpeed Techenum http_error_code 565392f7a3SLiteSpeed Tech{ 5792f6e17bSDmitri Tikhonov HEC_NO_ERROR = 0x100, 5892f6e17bSDmitri Tikhonov HEC_GENERAL_PROTOCOL_ERROR = 0x101, 5992f6e17bSDmitri Tikhonov HEC_INTERNAL_ERROR = 0x102, 6092f6e17bSDmitri Tikhonov HEC_STREAM_CREATION_ERROR = 0x103, 6192f6e17bSDmitri Tikhonov HEC_CLOSED_CRITICAL_STREAM = 0x104, 6292f6e17bSDmitri Tikhonov HEC_FRAME_UNEXPECTED = 0x105, 6392f6e17bSDmitri Tikhonov HEC_FRAME_ERROR = 0x106, 6492f6e17bSDmitri Tikhonov HEC_EXCESSIVE_LOAD = 0x107, 6592f6e17bSDmitri Tikhonov HEC_ID_ERROR = 0x108, 6692f6e17bSDmitri Tikhonov HEC_SETTINGS_ERROR = 0x109, 6792f6e17bSDmitri Tikhonov HEC_MISSING_SETTINGS = 0x10A, 6892f6e17bSDmitri Tikhonov HEC_REQUEST_REJECTED = 0x10B, 6992f6e17bSDmitri Tikhonov HEC_REQUEST_CANCELLED = 0x10C, 7092f6e17bSDmitri Tikhonov HEC_REQUEST_INCOMPLETE = 0x10D, 7192f6e17bSDmitri Tikhonov HEC_CONNECT_ERROR = 0x10F, 7292f6e17bSDmitri Tikhonov HEC_VERSION_FALLBACK = 0x110, 735392f7a3SLiteSpeed Tech HEC_QPACK_DECOMPRESSION_FAILED = 0x200, 745392f7a3SLiteSpeed Tech HEC_QPACK_ENCODER_STREAM_ERROR = 0x201, 755392f7a3SLiteSpeed Tech HEC_QPACK_DECODER_STREAM_ERROR = 0x202, 765392f7a3SLiteSpeed Tech}; 775392f7a3SLiteSpeed Tech 785392f7a3SLiteSpeed Tech 795392f7a3SLiteSpeed Tech#endif 80