comparison src/event/ngx_event_quic_transport.h @ 7942:97adb87f149b quic

Get rid of hardcoded numbers used for quic handshake errors.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 23 Jun 2020 11:57:00 +0300
parents 769d8bdeffb0
children e0f92f68e018
comparison
equal deleted inserted replaced
7941:df29219988bc 7942:97adb87f149b
73 #define NGX_QUIC_FT_CONNECTION_CLOSE 0x1C 73 #define NGX_QUIC_FT_CONNECTION_CLOSE 0x1C
74 #define NGX_QUIC_FT_CONNECTION_CLOSE2 0x1D 74 #define NGX_QUIC_FT_CONNECTION_CLOSE2 0x1D
75 #define NGX_QUIC_FT_HANDSHAKE_DONE 0x1E 75 #define NGX_QUIC_FT_HANDSHAKE_DONE 0x1E
76 76
77 /* 22.4. QUIC Transport Error Codes Registry */ 77 /* 22.4. QUIC Transport Error Codes Registry */
78 /* Keep in sync with ngx_quic_errors[] */
78 #define NGX_QUIC_ERR_NO_ERROR 0x00 79 #define NGX_QUIC_ERR_NO_ERROR 0x00
79 #define NGX_QUIC_ERR_INTERNAL_ERROR 0x01 80 #define NGX_QUIC_ERR_INTERNAL_ERROR 0x01
80 #define NGX_QUIC_ERR_CONNECTION_REFUSED 0x02 81 #define NGX_QUIC_ERR_CONNECTION_REFUSED 0x02
81 #define NGX_QUIC_ERR_FLOW_CONTROL_ERROR 0x03 82 #define NGX_QUIC_ERR_FLOW_CONTROL_ERROR 0x03
82 #define NGX_QUIC_ERR_STREAM_LIMIT_ERROR 0x04 83 #define NGX_QUIC_ERR_STREAM_LIMIT_ERROR 0x04
88 #define NGX_QUIC_ERR_PROTOCOL_VIOLATION 0x0A 89 #define NGX_QUIC_ERR_PROTOCOL_VIOLATION 0x0A
89 #define NGX_QUIC_ERR_INVALID_TOKEN 0x0B 90 #define NGX_QUIC_ERR_INVALID_TOKEN 0x0B
90 #define NGX_QUIC_ERR_APPLICATION_ERROR 0x0C 91 #define NGX_QUIC_ERR_APPLICATION_ERROR 0x0C
91 #define NGX_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D 92 #define NGX_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D
92 #define NGX_QUIC_ERR_KEY_UPDATE_ERROR 0x0E 93 #define NGX_QUIC_ERR_KEY_UPDATE_ERROR 0x0E
93 /* 0xF is not defined */ 94
94 #define NGX_QUIC_ERR_CRYPTO_ERROR 0x10 95 #define NGX_QUIC_ERR_LAST 0x0F
95 96 #define NGX_QUIC_ERR_CRYPTO_ERROR 0x100
96 #define NGX_QUIC_ERR_LAST NGX_QUIC_ERR_CRYPTO_ERROR 97
98 #define NGX_QUIC_ERR_CRYPTO(e) (NGX_QUIC_ERR_CRYPTO_ERROR + (e))
99
97 100
98 /* Transport parameters */ 101 /* Transport parameters */
99 #define NGX_QUIC_TP_ORIGINAL_DCID 0x00 102 #define NGX_QUIC_TP_ORIGINAL_DCID 0x00
100 #define NGX_QUIC_TP_MAX_IDLE_TIMEOUT 0x01 103 #define NGX_QUIC_TP_MAX_IDLE_TIMEOUT 0x01
101 #define NGX_QUIC_TP_STATELESS_RESET_TOKEN 0x02 104 #define NGX_QUIC_TP_STATELESS_RESET_TOKEN 0x02