23 u64 code = va_arg (*args,
u64);
27 s =
format (s,
"no error");
31 s =
format (s,
"full fifo");
34 s =
format (s,
"QUIC_APP_ERROR_CLOSE_NOTIFY");
37 s =
format (s,
"QUIC_APP_ALLOCATION_ERROR");
40 s =
format (s,
"QUIC_APP_ACCEPT_NOTIFY_ERROR");
43 s =
format (s,
"QUIC_APP_CONNECT_NOTIFY_ERROR");
46 case QUICLY_ERROR_PACKET_IGNORED:
47 s =
format (s,
"QUICLY_ERROR_PACKET_IGNORED");
49 case QUICLY_ERROR_SENDBUF_FULL:
50 s =
format (s,
"QUICLY_ERROR_SENDBUF_FULL");
52 case QUICLY_ERROR_FREE_CONNECTION:
53 s =
format (s,
"QUICLY_ERROR_FREE_CONNECTION");
55 case QUICLY_ERROR_RECEIVED_STATELESS_RESET:
56 s =
format (s,
"QUICLY_ERROR_RECEIVED_STATELESS_RESET");
58 case QUICLY_TRANSPORT_ERROR_NONE:
59 s =
format (s,
"QUICLY_TRANSPORT_ERROR_NONE");
61 case QUICLY_TRANSPORT_ERROR_INTERNAL:
62 s =
format (s,
"QUICLY_TRANSPORT_ERROR_INTERNAL");
64 case QUICLY_TRANSPORT_ERROR_SERVER_BUSY:
65 s =
format (s,
"QUICLY_TRANSPORT_ERROR_SERVER_BUSY");
67 case QUICLY_TRANSPORT_ERROR_FLOW_CONTROL:
68 s =
format (s,
"QUICLY_TRANSPORT_ERROR_FLOW_CONTROL");
70 case QUICLY_TRANSPORT_ERROR_STREAM_LIMIT:
71 s =
format (s,
"QUICLY_TRANSPORT_ERROR_STREAM_LIMIT");
73 case QUICLY_TRANSPORT_ERROR_STREAM_STATE:
74 s =
format (s,
"QUICLY_TRANSPORT_ERROR_STREAM_STATE");
76 case QUICLY_TRANSPORT_ERROR_FINAL_OFFSET:
77 s =
format (s,
"QUICLY_TRANSPORT_ERROR_FINAL_OFFSET");
79 case QUICLY_TRANSPORT_ERROR_FRAME_ENCODING:
80 s =
format (s,
"QUICLY_TRANSPORT_ERROR_FRAME_ENCODING");
82 case QUICLY_TRANSPORT_ERROR_TRANSPORT_PARAMETER:
83 s =
format (s,
"QUICLY_TRANSPORT_ERROR_TRANSPORT_PARAMETER");
85 case QUICLY_TRANSPORT_ERROR_VERSION_NEGOTIATION:
86 s =
format (s,
"QUICLY_TRANSPORT_ERROR_VERSION_NEGOTIATION");
88 case QUICLY_TRANSPORT_ERROR_PROTOCOL_VIOLATION:
89 s =
format (s,
"QUICLY_TRANSPORT_ERROR_PROTOCOL_VIOLATION");
91 case QUICLY_TRANSPORT_ERROR_INVALID_MIGRATION:
92 s =
format (s,
"QUICLY_TRANSPORT_ERROR_INVALID_MIGRATION");
95 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CLOSE_NOTIFY):
97 format (s,
"PTLS_ALERT_CLOSE_NOTIFY");
99 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_UNEXPECTED_MESSAGE):
101 format (s,
"PTLS_ALERT_UNEXPECTED_MESSAGE");
103 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_BAD_RECORD_MAC):
105 format (s,
"PTLS_ALERT_BAD_RECORD_MAC");
107 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_HANDSHAKE_FAILURE):
109 format (s,
"PTLS_ALERT_HANDSHAKE_FAILURE");
111 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_BAD_CERTIFICATE):
113 format (s,
"PTLS_ALERT_BAD_CERTIFICATE");
115 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_REVOKED):
117 format (s,
"PTLS_ALERT_CERTIFICATE_REVOKED");
119 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_EXPIRED):
121 format (s,
"PTLS_ALERT_CERTIFICATE_EXPIRED");
123 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_UNKNOWN):
125 format (s,
"PTLS_ALERT_CERTIFICATE_UNKNOWN");
127 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_ILLEGAL_PARAMETER):
129 format (s,
"PTLS_ALERT_ILLEGAL_PARAMETER");
131 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_UNKNOWN_CA):
133 format (s,
"PTLS_ALERT_UNKNOWN_CA");
135 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_DECODE_ERROR):
137 format (s,
"PTLS_ALERT_DECODE_ERROR");
139 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_DECRYPT_ERROR):
141 format (s,
"PTLS_ALERT_DECRYPT_ERROR");
143 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_PROTOCOL_VERSION):
145 format (s,
"PTLS_ALERT_PROTOCOL_VERSION");
147 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_INTERNAL_ERROR):
149 format (s,
"PTLS_ALERT_INTERNAL_ERROR");
151 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_USER_CANCELED):
153 format (s,
"PTLS_ALERT_USER_CANCELED");
155 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_MISSING_EXTENSION):
157 format (s,
"PTLS_ALERT_MISSING_EXTENSION");
159 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_UNRECOGNIZED_NAME):
161 format (s,
"PTLS_ALERT_UNRECOGNIZED_NAME");
163 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_CERTIFICATE_REQUIRED):
165 format (s,
"PTLS_ALERT_CERTIFICATE_REQUIRED");
167 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ALERT_NO_APPLICATION_PROTOCOL):
169 format (s,
"PTLS_ALERT_NO_APPLICATION_PROTOCOL");
171 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_NO_MEMORY):
173 format (s,
"PTLS_ERROR_NO_MEMORY");
175 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_IN_PROGRESS):
177 format (s,
"PTLS_ERROR_IN_PROGRESS");
179 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_LIBRARY):
181 format (s,
"PTLS_ERROR_LIBRARY");
183 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCOMPATIBLE_KEY):
185 format (s,
"PTLS_ERROR_INCOMPATIBLE_KEY");
187 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_SESSION_NOT_FOUND):
189 format (s,
"PTLS_ERROR_SESSION_NOT_FOUND");
191 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_STATELESS_RETRY):
193 format (s,
"PTLS_ERROR_STATELESS_RETRY");
195 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_NOT_AVAILABLE):
197 format (s,
"PTLS_ERROR_NOT_AVAILABLE");
199 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_COMPRESSION_FAILURE):
201 format (s,
"PTLS_ERROR_COMPRESSION_FAILURE");
203 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_INCORRECT_ENCODING):
205 format (s,
"PTLS_ERROR_BER_INCORRECT_ENCODING");
207 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_MALFORMED_TYPE):
209 format (s,
"PTLS_ERROR_BER_MALFORMED_TYPE");
211 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_MALFORMED_LENGTH):
213 format (s,
"PTLS_ERROR_BER_MALFORMED_LENGTH");
215 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_EXCESSIVE_LENGTH):
217 format (s,
"PTLS_ERROR_BER_EXCESSIVE_LENGTH");
219 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_ELEMENT_TOO_SHORT):
221 format (s,
"PTLS_ERROR_BER_ELEMENT_TOO_SHORT");
223 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_BER_UNEXPECTED_EOC):
225 format (s,
"PTLS_ERROR_BER_UNEXPECTED_EOC");
227 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_DER_INDEFINITE_LENGTH):
229 format (s,
"PTLS_ERROR_DER_INDEFINITE_LENGTH");
231 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_ASN1_SYNTAX):
233 format (s,
"PTLS_ERROR_INCORRECT_ASN1_SYNTAX");
235 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_KEY_VERSION):
237 format (s,
"PTLS_ERROR_INCORRECT_PEM_KEY_VERSION");
239 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_ECDSA_KEY_VERSION):
241 format (s,
"PTLS_ERROR_INCORRECT_PEM_ECDSA_KEY_VERSION");
243 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_ECDSA_CURVE):
245 format (s,
"PTLS_ERROR_INCORRECT_PEM_ECDSA_CURVE");
247 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_PEM_ECDSA_KEYSIZE):
249 format (s,
"PTLS_ERROR_INCORRECT_PEM_ECDSA_KEYSIZE");
251 case QUICLY_TRANSPORT_ERROR_TLS_ALERT_BASE + PTLS_ERROR_TO_ALERT (PTLS_ERROR_INCORRECT_ASN1_ECDSA_KEY_SYNTAX):
253 format (s,
"PTLS_ERROR_INCORRECT_ASN1_ECDSA_KEY_SYNTAX");
256 s =
format (s,
"unknown error 0x%lx", code);
#define QUIC_ERROR_FULL_FIFO
#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