Coverage Report

Created: 2026-08-31 07:20

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/h2o/fuzz/quicly_mock.c
Line
Count
Source
1
/*
2
 * Copyright (c) 2021 Fastly, Inc.
3
 *
4
 * Permission is hereby granted, free of charge, to any person obtaining a copy
5
 * of this software and associated documentation files (the "Software"), to
6
 * deal in the Software without restriction, including without limitation the
7
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8
 * sell copies of the Software, and to permit persons to whom the Software is
9
 * furnished to do so, subject to the following conditions:
10
 *
11
 * The above copyright notice and this permission notice shall be included in
12
 * all copies or substantial portions of the Software.
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20
 * IN THE SOFTWARE.
21
 */
22
23
#include <assert.h>
24
#include "khash.h"
25
#include "quicly.h"
26
#include "quicly/sendstate.h"
27
#include "quicly/recvstate.h"
28
#include "quicly_mock.h"
29
30
KHASH_MAP_INIT_INT64(quicly_stream_t, quicly_stream_t *)
31
32
mquicly_context_t mquicly_context;
33
34
struct st_quicly_conn_t {
35
    struct _st_quicly_conn_public_t super;
36
    khash_t(quicly_stream_t) * streams;
37
    struct {
38
        quicly_address_t local, remote;
39
    } address;
40
    struct {
41
        quicly_error_t err;
42
        uint64_t frame_type;
43
        char *reason_phrase;
44
        int is_remote;
45
    } connection_close;
46
};
47
48
struct st_quicly_send_context_t {
49
};
50
51
static quicly_conn_t *create_connection(quicly_context_t *ctx, int is_client, struct sockaddr *remote_addr,
52
                                        struct sockaddr *local_addr)
53
5.80k
{
54
5.80k
    quicly_conn_t *conn = calloc(1, sizeof(*conn));
55
5.80k
    assert(conn != NULL);
56
5.80k
    conn->super.ctx = ctx;
57
5.80k
    if (is_client) {
58
0
        conn->super.local.bidi.next_stream_id = 0;
59
0
        conn->super.local.uni.next_stream_id = 2;
60
0
        conn->super.remote.bidi.next_stream_id = 1;
61
0
        conn->super.remote.uni.next_stream_id = 3;
62
5.80k
    } else {
63
5.80k
        conn->super.local.bidi.next_stream_id = 1;
64
5.80k
        conn->super.local.uni.next_stream_id = 3;
65
5.80k
        conn->super.remote.bidi.next_stream_id = 0;
66
5.80k
        conn->super.remote.uni.next_stream_id = 2;
67
5.80k
    }
68
5.80k
    conn->streams = kh_init(quicly_stream_t);
69
70
5.80k
    conn->address.local.sa = *local_addr;
71
5.80k
    conn->address.remote.sa = *remote_addr;
72
73
5.80k
    memset(&conn->connection_close, 0, sizeof(conn->connection_close));
74
75
5.80k
    return conn;
76
5.80k
}
77
78
quicly_error_t quicly_accept(quicly_conn_t **conn, quicly_context_t *ctx, struct sockaddr *dest_addr, struct sockaddr *src_addr,
79
                             quicly_decoded_packet_t *packet, quicly_address_token_plaintext_t *address_token,
80
                             const quicly_cid_plaintext_t *new_cid, ptls_handshake_properties_t *handshake_properties,
81
                             void *appdata)
82
5.80k
{
83
5.80k
    *conn = create_connection(ctx, 0, src_addr, dest_addr);
84
5.80k
    (*conn)->super.state = QUICLY_STATE_CONNECTED;
85
5.80k
    return 0;
86
5.80k
}
87
88
int quicly_stream_sync_sendbuf(quicly_stream_t *stream, int activate)
89
20.9k
{
90
20.9k
    int ret;
91
92
20.9k
    if (activate) {
93
20.9k
        if ((ret = quicly_sendstate_activate(&stream->sendstate)) != 0)
94
0
            return ret;
95
20.9k
    }
96
97
20.9k
    quicly_stream_scheduler_t *scheduler = stream->conn->super.ctx->stream_scheduler;
98
20.9k
    scheduler->update_state(scheduler, stream);
99
20.9k
    return 0;
100
20.9k
}
101
102
void quicly_stream_sync_recvbuf(quicly_stream_t *stream, size_t shift_amount)
103
1.71k
{
104
1.71k
    stream->recvstate.data_off += shift_amount;
105
1.71k
}
106
107
int quicly_stream_can_send(quicly_stream_t *stream, int at_stream_level)
108
41.6k
{
109
    /* return if there is nothing to be sent */
110
41.6k
    if (stream->sendstate.pending.num_ranges == 0)
111
20.3k
        return 0;
112
21.2k
    return 1;
113
41.6k
}
114
115
ptls_t *quicly_get_tls(quicly_conn_t *conn)
116
381
{
117
    /* TODO: is this okay */
118
381
    return NULL;
119
381
}
120
121
int quicly_is_blocked(quicly_conn_t *conn)
122
41.0k
{
123
41.0k
    return 0;
124
41.0k
}
125
126
struct sockaddr *quicly_get_sockname(quicly_conn_t *conn)
127
0
{
128
0
    return &conn->address.local.sa;
129
0
}
130
131
struct sockaddr *quicly_get_peername(quicly_conn_t *conn)
132
381
{
133
381
    return &conn->address.remote.sa;
134
381
}
135
136
void quicly_request_stop(quicly_stream_t *stream, quicly_error_t err)
137
1.71k
{
138
1.71k
    stream->_send_aux.stop_sending.sender_state = QUICLY_SENDER_STATE_SEND;
139
1.71k
}
140
141
void quicly_reset_stream(quicly_stream_t *stream, quicly_error_t err)
142
890
{
143
    /* dispose sendbuf state */
144
890
    quicly_sendstate_reset(&stream->sendstate);
145
146
890
    stream->_send_aux.reset_stream.sender_state = QUICLY_SENDER_STATE_SEND;
147
148
    /* inline expansion of resched_stream_data() */
149
    /* TODO: consider streams_blocked? */
150
890
    quicly_stream_scheduler_t *scheduler = stream->conn->super.ctx->stream_scheduler;
151
890
    scheduler->update_state(scheduler, stream);
152
890
}
153
154
socklen_t quicly_get_socklen(struct sockaddr *sa)
155
381
{
156
381
    switch (sa->sa_family) {
157
381
    case AF_INET:
158
381
        return sizeof(struct sockaddr_in);
159
0
    case AF_INET6:
160
0
        return sizeof(struct sockaddr_in6);
161
0
    default:
162
0
        assert(!"unexpected socket type");
163
0
        return 0;
164
381
    }
165
381
}
166
167
size_t quicly_decode_packet(quicly_context_t *ctx, quicly_decoded_packet_t *packet, const uint8_t *datagram, size_t datagram_size,
168
                            size_t *off)
169
0
{
170
0
    assert(0 && "unimplemented");
171
0
    return 0;
172
0
}
173
174
quicly_error_t quicly_send_stream(quicly_stream_t *stream, quicly_send_context_t *s)
175
19.8k
{
176
    /* quicly_send -> scheduler->do_send -> quicly_send_stream -> on_send_emit */
177
19.8k
    uint8_t buff[1024];
178
19.8k
    uint64_t off = stream->sendstate.pending.ranges[0].start, end_off;
179
19.8k
    size_t capacity = sizeof(buff);
180
19.8k
    int wrote_all = 0, is_fin;
181
19.8k
    quicly_error_t ret;
182
183
19.8k
    if (!quicly_sendstate_is_open(&stream->sendstate) && off == stream->sendstate.final_size) {
184
        /* special case for emitting FIN only */
185
338
        end_off = off;
186
338
        wrote_all = 1;
187
338
        is_fin = 1;
188
338
        goto UpdateState;
189
338
    }
190
19.4k
    { /* cap the capacity to the current range */
191
19.4k
        uint64_t range_capacity = stream->sendstate.pending.ranges[0].end - off;
192
19.4k
        if (!quicly_sendstate_is_open(&stream->sendstate) && off + range_capacity > stream->sendstate.final_size) {
193
828
            assert(range_capacity > 1); /* see the special case above */
194
828
            range_capacity -= 1;
195
828
        }
196
19.4k
        if (capacity > range_capacity)
197
828
            capacity = range_capacity;
198
19.4k
    }
199
0
    size_t len = capacity;
200
19.4k
    size_t emit_off = (size_t)(off - stream->sendstate.acked.ranges[0].end);
201
19.4k
    stream->callbacks->on_send_emit(stream, emit_off, buff, &len, &wrote_all);
202
203
19.4k
    end_off = off + len;
204
205
    /* determine if the frame incorporates FIN */
206
19.4k
    if (!quicly_sendstate_is_open(&stream->sendstate) && end_off == stream->sendstate.final_size) {
207
828
        is_fin = 1;
208
18.6k
    } else {
209
18.6k
        is_fin = 0;
210
18.6k
    }
211
212
19.8k
UpdateState:
213
    /* notify the fuzzing driver of stream send event */
214
19.8k
    if (mquicly_context.on_stream_send != NULL) {
215
19.8k
        mquicly_context.on_stream_send->cb(mquicly_context.on_stream_send, stream->conn, stream, buff, off, len, is_fin);
216
19.8k
    }
217
19.8k
    if (stream->sendstate.size_inflight < end_off) {
218
19.4k
        stream->sendstate.size_inflight = end_off;
219
19.4k
    }
220
19.8k
    if ((ret = quicly_ranges_subtract(&stream->sendstate.pending, off, end_off + is_fin)) != 0)
221
0
        return ret;
222
19.8k
    if (wrote_all) {
223
19.8k
        if ((ret = quicly_ranges_subtract(&stream->sendstate.pending, stream->sendstate.size_inflight, UINT64_MAX)) != 0)
224
0
            return ret;
225
19.8k
    }
226
227
19.8k
    return 0;
228
19.8k
}
229
230
quicly_error_t quicly_get_close_reason(quicly_conn_t *conn, uint64_t *frame_type, const char **reason_phrase, int *is_remote)
231
0
{
232
0
    assert(conn->super.state >= QUICLY_STATE_CLOSING);
233
0
    if (frame_type != NULL)
234
0
        *frame_type = conn->connection_close.frame_type;
235
0
    if (reason_phrase != NULL)
236
0
        *reason_phrase = conn->connection_close.reason_phrase;
237
0
    if (is_remote != NULL)
238
0
        *is_remote = conn->connection_close.is_remote;
239
0
    return conn->connection_close.err;
240
0
}
241
242
static quicly_stream_t *open_stream(quicly_conn_t *conn, quicly_stream_id_t stream_id)
243
23.2k
{
244
23.2k
    quicly_stream_t *stream;
245
246
23.2k
    if ((stream = calloc(1, sizeof(*stream))) == NULL)
247
0
        return NULL;
248
23.2k
    stream->conn = conn;
249
23.2k
    stream->stream_id = stream_id;
250
23.2k
    stream->callbacks = NULL;
251
23.2k
    stream->data = NULL;
252
253
23.2k
    int r;
254
23.2k
    khiter_t iter = kh_put(quicly_stream_t, conn->streams, stream_id, &r);
255
23.2k
    assert(iter != kh_end(conn->streams));
256
23.2k
    kh_val(conn->streams, iter) = stream;
257
258
23.2k
    int is_client = quicly_is_client(stream->conn);
259
260
23.2k
    if (quicly_stream_has_send_side(is_client, stream->stream_id)) {
261
23.2k
        quicly_sendstate_init(&stream->sendstate);
262
23.2k
    } else {
263
0
        quicly_sendstate_init_closed(&stream->sendstate);
264
0
    }
265
23.2k
    if (quicly_stream_has_receive_side(is_client, stream->stream_id)) {
266
5.80k
        quicly_recvstate_init(&stream->recvstate);
267
17.4k
    } else {
268
17.4k
        quicly_recvstate_init_closed(&stream->recvstate);
269
17.4k
    }
270
271
23.2k
    return stream;
272
23.2k
}
273
274
static struct st_quicly_conn_streamgroup_state_t *get_streamgroup_state(quicly_conn_t *conn, quicly_stream_id_t stream_id)
275
29.0k
{
276
29.0k
    if (quicly_is_client(conn) == quicly_stream_is_client_initiated(stream_id)) {
277
17.4k
        return quicly_stream_is_unidirectional(stream_id) ? &conn->super.local.uni : &conn->super.local.bidi;
278
17.4k
    } else {
279
11.6k
        return quicly_stream_is_unidirectional(stream_id) ? &conn->super.remote.uni : &conn->super.remote.bidi;
280
11.6k
    }
281
29.0k
}
282
283
int mquicly_open_stream(quicly_conn_t *conn, quicly_stream_t **stream, int is_remote_initiated, int unidirectional)
284
23.2k
{
285
23.2k
    struct st_quicly_conn_streamgroup_state_t *group;
286
287
23.2k
    if (is_remote_initiated) {
288
5.80k
        group = unidirectional ? &conn->super.remote.uni : &conn->super.remote.bidi;
289
17.4k
    } else {
290
17.4k
        group = unidirectional ? &conn->super.local.uni : &conn->super.local.bidi;
291
17.4k
    }
292
293
23.2k
    *stream = open_stream(conn, group->next_stream_id);
294
23.2k
    group->next_stream_id += 4;
295
23.2k
    group->num_streams++;
296
297
23.2k
    conn->super.ctx->stream_open->cb(conn->super.ctx->stream_open, *stream);
298
299
23.2k
    return 0;
300
23.2k
}
301
302
static void destroy_stream(quicly_stream_t *stream, int err)
303
23.2k
{
304
23.2k
    quicly_conn_t *conn = stream->conn;
305
306
23.2k
    if (stream->callbacks != NULL)
307
23.2k
        stream->callbacks->on_destroy(stream, err);
308
309
23.2k
    khiter_t iter = kh_get(quicly_stream_t, conn->streams, stream->stream_id);
310
23.2k
    assert(iter != kh_end(conn->streams));
311
23.2k
    kh_del(quicly_stream_t, conn->streams, iter);
312
313
23.2k
    struct st_quicly_conn_streamgroup_state_t *group = get_streamgroup_state(conn, stream->stream_id);
314
23.2k
    --group->num_streams;
315
316
23.2k
    quicly_sendstate_dispose(&stream->sendstate);
317
23.2k
    quicly_recvstate_dispose(&stream->recvstate);
318
319
23.2k
    free(stream);
320
23.2k
}
321
322
static void destroy_all_streams(quicly_conn_t *conn, int err)
323
7.85k
{
324
7.85k
    quicly_stream_t *stream;
325
7.85k
    kh_foreach_value(conn->streams, stream, { destroy_stream(stream, err); });
326
7.85k
    assert(quicly_num_streams(conn) == 0);
327
7.85k
}
328
329
void mquicly_closed(quicly_conn_t *conn, quicly_error_t err, uint64_t frame_type, ptls_iovec_t reason_phrase, int is_remote)
330
2.05k
{
331
    /* TODO: invoke conn->super.ctx->closed->cb() but h2o does not use it so far */
332
2.05k
    assert(conn->super.ctx->closed == NULL);
333
334
2.05k
    conn->connection_close.err = err;
335
2.05k
    conn->connection_close.frame_type = frame_type;
336
2.05k
    conn->connection_close.reason_phrase = malloc(reason_phrase.len + 1);
337
2.05k
    memcpy(conn->connection_close.reason_phrase, reason_phrase.base, reason_phrase.len);
338
2.05k
    conn->connection_close.reason_phrase[reason_phrase.len] = '\0';
339
2.05k
    conn->connection_close.is_remote = is_remote;
340
341
2.05k
    conn->super.state = is_remote ? QUICLY_STATE_DRAINING : QUICLY_STATE_CLOSING;
342
2.05k
    destroy_all_streams(conn, err);
343
2.05k
}
344
345
quicly_error_t quicly_open_stream(quicly_conn_t *conn, quicly_stream_t **stream, int unidirectional)
346
17.4k
{
347
17.4k
    return mquicly_open_stream(conn, stream, 0, unidirectional);
348
17.4k
}
349
350
quicly_error_t quicly_get_or_open_stream(quicly_conn_t *conn, uint64_t stream_id, quicly_stream_t **stream)
351
0
{
352
    /* conn->super.ctx->stream_open->cb */
353
0
    assert(0 && "unimplemented");
354
0
    return 0;
355
0
}
356
357
int quicly_is_destination(quicly_conn_t *conn, struct sockaddr *dest_addr, struct sockaddr *src_addr,
358
                          quicly_decoded_packet_t *decoded)
359
0
{
360
0
    assert(0 && "unimplemented");
361
0
    return 0;
362
0
}
363
364
uint32_t quicly_num_streams_by_group(quicly_conn_t *conn, int uni, int locally_initiated)
365
5.80k
{
366
5.80k
    int server_initiated = quicly_is_client(conn) != locally_initiated;
367
5.80k
    struct st_quicly_conn_streamgroup_state_t *state = get_streamgroup_state(conn, uni * 2 + server_initiated);
368
5.80k
    return state->num_streams;
369
5.80k
}
370
371
quicly_error_t quicly_get_delivery_rate(quicly_conn_t *conn, quicly_rate_t *delivery_rate)
372
0
{
373
    /* Do nothing */
374
0
    *delivery_rate = (quicly_rate_t){};
375
0
    return 0;
376
0
}
377
378
quicly_error_t quicly_get_stats(quicly_conn_t *conn, quicly_stats_t *stats)
379
5.80k
{
380
    /* Do nothing */
381
5.80k
    memset(stats, 0, sizeof(*stats));
382
5.80k
    return 0;
383
5.80k
}
384
385
void quicly_stream_noop_on_destroy(quicly_stream_t *stream, quicly_error_t err)
386
0
{
387
0
}
388
389
void quicly_stream_noop_on_send_shift(quicly_stream_t *stream, size_t delta)
390
0
{
391
0
}
392
393
void quicly_stream_noop_on_send_emit(quicly_stream_t *stream, size_t off, void *dst, size_t *len, int *wrote_all)
394
0
{
395
0
}
396
397
void quicly_stream_noop_on_send_stop(quicly_stream_t *stream, quicly_error_t err)
398
0
{
399
0
}
400
401
void quicly_stream_noop_on_receive(quicly_stream_t *stream, size_t off, const void *src, size_t len)
402
0
{
403
0
}
404
405
void quicly_stream_noop_on_receive_reset(quicly_stream_t *stream, quicly_error_t err)
406
0
{
407
0
}
408
409
const quicly_stream_callbacks_t quicly_stream_noop_callbacks = {
410
    quicly_stream_noop_on_destroy,   quicly_stream_noop_on_send_shift, quicly_stream_noop_on_send_emit,
411
    quicly_stream_noop_on_send_stop, quicly_stream_noop_on_receive,    quicly_stream_noop_on_receive_reset};
412
413
size_t quicly_send_version_negotiation(quicly_context_t *ctx, ptls_iovec_t dest_cid, ptls_iovec_t src_cid, const uint32_t *versions,
414
                                       void *payload)
415
0
{
416
0
    assert(0 && "unimplemented");
417
0
    return 0;
418
0
}
419
420
size_t quicly_send_stateless_reset(quicly_context_t *ctx, const void *src_cid, void *payload)
421
0
{
422
0
    assert(0 && "unimplemented");
423
0
    return 0;
424
0
}
425
426
int quicly_can_send_data(quicly_conn_t *conn, quicly_send_context_t *s)
427
35.6k
{
428
35.6k
    return 1;
429
35.6k
}
430
431
quicly_error_t quicly_connect(quicly_conn_t **conn, quicly_context_t *ctx, const char *server_name, struct sockaddr *dest_addr,
432
                              struct sockaddr *src_addr, const quicly_cid_plaintext_t *new_cid, ptls_iovec_t address_token,
433
                              ptls_handshake_properties_t *handshake_properties,
434
                              const quicly_transport_parameters_t *resumed_transport_params, void *appdata)
435
0
{
436
0
    assert(0 && "unimplemented");
437
0
    return 0;
438
0
}
439
440
int quicly_connection_is_ready(quicly_conn_t *conn)
441
0
{
442
0
    assert(0 && "unimplemented");
443
0
    return 0;
444
0
}
445
446
void quicly_amend_ptls_context(ptls_context_t *ptls)
447
0
{
448
0
    assert(0 && "unimplemented");
449
0
}
450
451
quicly_error_t quicly_receive(quicly_conn_t *conn, struct sockaddr *dest_addr, struct sockaddr *src_addr,
452
                              quicly_decoded_packet_t *packet)
453
0
{
454
0
    assert(0 && "unimplemented");
455
0
    return 0;
456
0
}
457
458
quicly_error_t quicly_close(quicly_conn_t *conn, quicly_error_t err, const char *reason_phrase)
459
3.74k
{
460
3.74k
    if (conn->super.state >= QUICLY_STATE_CLOSING)
461
0
        return 0;
462
463
3.74k
    conn->super.state = QUICLY_STATE_CLOSING;
464
3.74k
    return 0;
465
3.74k
}
466
467
int64_t quicly_get_first_timeout(quicly_conn_t *conn)
468
28.9k
{
469
    /* TODO: simulate delay */
470
28.9k
    return conn->super.ctx->now->cb(conn->super.ctx->now) + 1;
471
28.9k
}
472
473
void quicly_free(quicly_conn_t *conn)
474
5.80k
{
475
5.80k
    destroy_all_streams(conn, 0);
476
5.80k
    kh_destroy(quicly_stream_t, conn->streams);
477
5.80k
    free(conn->connection_close.reason_phrase);
478
5.80k
    free(conn);
479
5.80k
}
480
481
quicly_error_t quicly_send(quicly_conn_t *conn, quicly_address_t *dest, quicly_address_t *src, struct iovec *datagrams,
482
                           size_t *num_datagrams, void *buf, size_t bufsize)
483
21.6k
{
484
21.6k
    quicly_send_context_t s = {};
485
21.6k
    quicly_error_t ret;
486
21.6k
    if (conn->super.state >= QUICLY_STATE_CLOSING) {
487
5.80k
        ret = QUICLY_ERROR_FREE_CONNECTION;
488
5.80k
        goto Exit;
489
5.80k
    }
490
15.8k
    ret = conn->super.ctx->stream_scheduler->do_send(conn->super.ctx->stream_scheduler, conn, &s);
491
492
21.6k
Exit:
493
21.6k
    *num_datagrams = 0;
494
21.6k
    return ret;
495
15.8k
}
496
497
uint8_t quicly_send_get_ecn_bits(quicly_conn_t *conn)
498
0
{
499
0
    return 0;
500
0
}
501
502
int64_t quicly_foreach_stream(quicly_conn_t *conn, void *thunk, int64_t (*cb)(void *thunk, quicly_stream_t *stream))
503
0
{
504
0
    assert(0 && "unimplemented");
505
0
    return 0;
506
0
}
507
508
quicly_stream_t *quicly_get_stream(quicly_conn_t *conn, quicly_stream_id_t stream_id)
509
0
{
510
0
    assert(0 && "unimplemented");
511
0
    return NULL;
512
0
}
513
514
void quicly_send_datagram_frames(quicly_conn_t *conn, ptls_iovec_t *datagrams, size_t num_datagrams)
515
0
{
516
0
    assert(0 && "unimplemented");
517
0
}
518
519
void quicly_get_max_data(quicly_conn_t *conn, uint64_t *send_permitted, uint64_t *sent, uint64_t *consumed, uint64_t *shifted)
520
7.85k
{
521
7.85k
    if (send_permitted != NULL)
522
0
        *send_permitted = 0xdeadbeef;
523
7.85k
    if (sent != NULL)
524
7.85k
        *sent = 0xdeadbeef;
525
7.85k
    if (consumed != NULL)
526
0
        *consumed = 0xdeadbeef;
527
7.85k
    if (shifted != NULL)
528
0
        *shifted = 0xdeadbeef;
529
7.85k
}
530
531
quicly_error_t quicly_send_resumption_token(quicly_conn_t *conn)
532
5.80k
{
533
5.80k
    return 0;
534
5.80k
}
535
536
const uint32_t quicly_supported_versions[] = {QUICLY_PROTOCOL_VERSION_1, QUICLY_PROTOCOL_VERSION_DRAFT29,
537
                                              QUICLY_PROTOCOL_VERSION_DRAFT27, 0};