19 #include <quicly/constants.h> 24 u64 code = va_arg (*args,
u64);
28 s =
format (s,
"no error");
32 s =
format (s,
"full fifo");
35 s =
format (s,
"QUIC_APP_ERROR_CLOSE_NOTIFY");
38 s =
format (s,
"QUIC_APP_ALLOCATION_ERROR");
41 s =
format (s,
"QUIC_APP_ACCEPT_NOTIFY_ERROR");
44 s =
format (s,
"QUIC_APP_CONNECT_NOTIFY_ERROR");
47 case QUICLY_ERROR_PACKET_IGNORED:
48 s =
format (s,
"QUICLY_ERROR_PACKET_IGNORED");
50 case QUICLY_ERROR_SENDBUF_FULL:
51 s =
format (s,
"QUICLY_ERROR_SENDBUF_FULL");
53 case QUICLY_ERROR_FREE_CONNECTION:
54 s =
format (s,
"QUICLY_ERROR_FREE_CONNECTION");
56 case QUICLY_ERROR_RECEIVED_STATELESS_RESET:
57 s =
format (s,
"QUICLY_ERROR_RECEIVED_STATELESS_RESET");
59 case QUICLY_TRANSPORT_ERROR_NONE:
60 s =
format (s,
"QUICLY_TRANSPORT_ERROR_NONE");
62 case QUICLY_TRANSPORT_ERROR_INTERNAL:
63 s =
format (s,
"QUICLY_TRANSPORT_ERROR_INTERNAL");
65 case QUICLY_TRANSPORT_ERROR_SERVER_BUSY:
66 s =
format (s,
"QUICLY_TRANSPORT_ERROR_SERVER_BUSY");
68 case QUICLY_TRANSPORT_ERROR_FLOW_CONTROL:
69 s =
format (s,
"QUICLY_TRANSPORT_ERROR_FLOW_CONTROL");
71 case QUICLY_TRANSPORT_ERROR_STREAM_LIMIT:
72 s =
format (s,
"QUICLY_TRANSPORT_ERROR_STREAM_LIMIT");
74 case QUICLY_TRANSPORT_ERROR_STREAM_STATE:
75 s =
format (s,
"QUICLY_TRANSPORT_ERROR_STREAM_STATE");
77 case QUICLY_TRANSPORT_ERROR_FINAL_SIZE:
78 s =
format (s,
"QUICLY_TRANSPORT_ERROR_FINAL_SIZE");
80 case QUICLY_TRANSPORT_ERROR_FRAME_ENCODING:
81 s =
format (s,
"QUICLY_TRANSPORT_ERROR_FRAME_ENCODING");
83 case QUICLY_TRANSPORT_ERROR_TRANSPORT_PARAMETER:
84 s =
format (s,
"QUICLY_TRANSPORT_ERROR_TRANSPORT_PARAMETER");
86 case QUICLY_ERROR_NO_COMPATIBLE_VERSION:
87 s =
format (s,
"QUICLY_ERROR_NO_COMPATIBLE_VERSION");
89 case QUICLY_TRANSPORT_ERROR_PROTOCOL_VIOLATION:
90 s =
format (s,
"QUICLY_TRANSPORT_ERROR_PROTOCOL_VIOLATION");
92 case QUICLY_TRANSPORT_ERROR_CRYPTO_BUFFER_EXCEEDED:
93 s =
format (s,
"QUICLY_TRANSPORT_ERROR_CRYPTO_BUFFER_EXCEEDED");
96 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CLOSE_NOTIFY):
98 format (s,
"PTLS_ALERT_CLOSE_NOTIFY");
100 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_UNEXPECTED_MESSAGE):
102 format (s,
"PTLS_ALERT_UNEXPECTED_MESSAGE");
104 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_BAD_RECORD_MAC):
106 format (s,
"PTLS_ALERT_BAD_RECORD_MAC");
108 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_HANDSHAKE_FAILURE):
110 format (s,
"PTLS_ALERT_HANDSHAKE_FAILURE");
112 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_BAD_CERTIFICATE):
114 format (s,
"PTLS_ALERT_BAD_CERTIFICATE");
116 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_REVOKED):
118 format (s,
"PTLS_ALERT_CERTIFICATE_REVOKED");
120 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_EXPIRED):
122 format (s,
"PTLS_ALERT_CERTIFICATE_EXPIRED");
124 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_UNKNOWN):
126 format (s,
"PTLS_ALERT_CERTIFICATE_UNKNOWN");
128 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_ILLEGAL_PARAMETER):
130 format (s,
"PTLS_ALERT_ILLEGAL_PARAMETER");
132 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_UNKNOWN_CA):
134 format (s,
"PTLS_ALERT_UNKNOWN_CA");
136 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_DECODE_ERROR):
138 format (s,
"PTLS_ALERT_DECODE_ERROR");
140 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_DECRYPT_ERROR):
142 format (s,
"PTLS_ALERT_DECRYPT_ERROR");
144 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_PROTOCOL_VERSION):
146 format (s,
"PTLS_ALERT_PROTOCOL_VERSION");
148 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_INTERNAL_ERROR):
150 format (s,
"PTLS_ALERT_INTERNAL_ERROR");
152 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_USER_CANCELED):
154 format (s,
"PTLS_ALERT_USER_CANCELED");
156 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_MISSING_EXTENSION):
158 format (s,
"PTLS_ALERT_MISSING_EXTENSION");
160 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_UNRECOGNIZED_NAME):
162 format (s,
"PTLS_ALERT_UNRECOGNIZED_NAME");
164 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_REQUIRED):
166 format (s,
"PTLS_ALERT_CERTIFICATE_REQUIRED");
168 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_NO_APPLICATION_PROTOCOL):
170 format (s,
"PTLS_ALERT_NO_APPLICATION_PROTOCOL");
172 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_NO_MEMORY):
174 format (s,
"PTLS_ERROR_NO_MEMORY");
176 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_IN_PROGRESS):
178 format (s,
"PTLS_ERROR_IN_PROGRESS");
180 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_LIBRARY):
182 format (s,
"PTLS_ERROR_LIBRARY");
184 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCOMPATIBLE_KEY):
186 format (s,
"PTLS_ERROR_INCOMPATIBLE_KEY");
188 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_SESSION_NOT_FOUND):
190 format (s,
"PTLS_ERROR_SESSION_NOT_FOUND");
192 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_STATELESS_RETRY):
194 format (s,
"PTLS_ERROR_STATELESS_RETRY");
196 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_NOT_AVAILABLE):
198 format (s,
"PTLS_ERROR_NOT_AVAILABLE");
200 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_COMPRESSION_FAILURE):
202 format (s,
"PTLS_ERROR_COMPRESSION_FAILURE");
204 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_INCORRECT_ENCODING):
206 format (s,
"PTLS_ERROR_BER_INCORRECT_ENCODING");
208 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_MALFORMED_TYPE):
210 format (s,
"PTLS_ERROR_BER_MALFORMED_TYPE");
212 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_MALFORMED_LENGTH):
214 format (s,
"PTLS_ERROR_BER_MALFORMED_LENGTH");
216 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_EXCESSIVE_LENGTH):
218 format (s,
"PTLS_ERROR_BER_EXCESSIVE_LENGTH");
220 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_ELEMENT_TOO_SHORT):
222 format (s,
"PTLS_ERROR_BER_ELEMENT_TOO_SHORT");
224 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_UNEXPECTED_EOC):
226 format (s,
"PTLS_ERROR_BER_UNEXPECTED_EOC");
228 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_DER_INDEFINITE_LENGTH):
230 format (s,
"PTLS_ERROR_DER_INDEFINITE_LENGTH");
232 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_ASN1_SYNTAX):
234 format (s,
"PTLS_ERROR_INCORRECT_ASN1_SYNTAX");
236 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_KEY_VERSION):
238 format (s,
"PTLS_ERROR_INCORRECT_PEM_KEY_VERSION");
240 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_ECDSA_KEY_VERSION):
242 format (s,
"PTLS_ERROR_INCORRECT_PEM_ECDSA_KEY_VERSION");
244 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_ECDSA_CURVE):
246 format (s,
"PTLS_ERROR_INCORRECT_PEM_ECDSA_CURVE");
248 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_ECDSA_KEYSIZE):
250 format (s,
"PTLS_ERROR_INCORRECT_PEM_ECDSA_KEYSIZE");
252 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_ASN1_ECDSA_KEY_SYNTAX):
254 format (s,
"PTLS_ERROR_INCORRECT_ASN1_ECDSA_KEY_SYNTAX");
257 s =
format (s,
"unknown error 0x%lx", code);
#define QUIC_ERROR_FULL_FIFO
description fragment has unexpected format
#define QUIC_APP_ACCEPT_NOTIFY_ERROR
#define QUIC_APP_CONNECT_NOTIFY_ERROR
#define QUIC_APP_ALLOCATION_ERROR
u8 * quic_format_err(u8 *s, va_list *args)
#define QUIC_APP_ERROR_CLOSE_NOTIFY