mirror of
https://github.com/curl/curl.git
synced 2026-07-09 23:57:15 +03:00
parent
7bfdc6f44a
commit
2d38f44121
6 changed files with 90 additions and 85 deletions
|
|
@ -139,7 +139,7 @@ void Curl_cf_ngtcp2_ctx_cleanup(struct cf_ngtcp2_ctx *ctx)
|
|||
{
|
||||
if(ctx && ctx->initialized) {
|
||||
Curl_vquic_tls_cleanup(&ctx->tls);
|
||||
vquic_ctx_free(&ctx->q);
|
||||
Curl_vquic_ctx_free(&ctx->q);
|
||||
Curl_bufcp_free(&ctx->stream_bufcp);
|
||||
curlx_dyn_free(&ctx->scratch);
|
||||
Curl_uint32_hash_destroy(&ctx->streams);
|
||||
|
|
@ -921,7 +921,7 @@ static CURLcode cf_connect_start(struct Curl_cfilter *cf,
|
|||
ctx->qlogfd = qfd; /* -1 if failure above */
|
||||
quic_settings(ctx, data, pktx);
|
||||
|
||||
result = vquic_ctx_init(data, &ctx->q);
|
||||
result = Curl_vquic_ctx_init(data, &ctx->q);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
|
|
@ -1228,7 +1228,7 @@ CURLcode Curl_cf_ngtcp2_cmn_shutdown(struct Curl_cfilter *cf,
|
|||
|
||||
if(!Curl_bufq_is_empty(&ctx->q.sendbuf)) {
|
||||
CURL_TRC_CF(data, cf, "shutdown, flushing egress");
|
||||
result = vquic_flush(cf, data, &ctx->q);
|
||||
result = Curl_vquic_flush(cf, data, &ctx->q);
|
||||
if(result == CURLE_AGAIN) {
|
||||
CURL_TRC_CF(data, cf, "sending shutdown packets blocked");
|
||||
result = CURLE_OK;
|
||||
|
|
@ -1296,7 +1296,7 @@ void Curl_cf_ngtcp2_io_ctx_init(struct cf_ngtcp2_io_ctx *io_ctx,
|
|||
io_ctx->cf = cf;
|
||||
io_ctx->data = data;
|
||||
ngtcp2_path_storage_zero(&io_ctx->ps);
|
||||
vquic_ctx_set_time(&ctx->q, pnow);
|
||||
Curl_vquic_ctx_set_time(&ctx->q, pnow);
|
||||
io_ctx->ts = ((ngtcp2_tstamp)pnow->tv_sec * NGTCP2_SECONDS) +
|
||||
((ngtcp2_tstamp)pnow->tv_usec * NGTCP2_MICROSECONDS);
|
||||
}
|
||||
|
|
@ -1308,7 +1308,7 @@ void Curl_cf_ngtcp2_io_ctx_update_time(struct Curl_easy *data,
|
|||
struct cf_ngtcp2_ctx *ctx = cf->ctx;
|
||||
const struct curltime *pnow = Curl_pgrs_now(data);
|
||||
|
||||
vquic_ctx_update_time(&ctx->q, pnow);
|
||||
Curl_vquic_ctx_update_time(&ctx->q, pnow);
|
||||
pktx->ts = ((ngtcp2_tstamp)pnow->tv_sec * NGTCP2_SECONDS) +
|
||||
((ngtcp2_tstamp)pnow->tv_usec * NGTCP2_MICROSECONDS);
|
||||
}
|
||||
|
|
@ -1484,7 +1484,7 @@ CURLcode Curl_cf_ngtcp2_progress_egress(struct Curl_cfilter *cf,
|
|||
ngtcp2_path_storage_zero(&pktx->ps);
|
||||
}
|
||||
|
||||
result = vquic_flush(cf, data, &ctx->q);
|
||||
result = Curl_vquic_flush(cf, data, &ctx->q);
|
||||
if(result) {
|
||||
if(result == CURLE_AGAIN) {
|
||||
Curl_expire(data, 1, EXPIRE_QUIC);
|
||||
|
|
@ -1532,11 +1532,11 @@ CURLcode Curl_cf_ngtcp2_progress_egress(struct Curl_cfilter *cf,
|
|||
}
|
||||
else if(nread > gsolen ||
|
||||
(gsolen > path_max_payload_size && nread != gsolen)) {
|
||||
/* The added packet is a PMTUD *or* the one(s) before the
|
||||
* added were PMTUD and the last one is smaller.
|
||||
* Flush the buffer before the last add. */
|
||||
result = vquic_send_tail_split(cf, data, &ctx->q,
|
||||
gsolen, nread, nread);
|
||||
/* The added packet is a PMTUD *or* the one(s) before the added were
|
||||
* PMTUD and the last one is smaller. Flush the buffer before the last
|
||||
* add. */
|
||||
result = Curl_vquic_send_tail_split(cf, data, &ctx->q,
|
||||
gsolen, nread, nread);
|
||||
if(result) {
|
||||
if(result == CURLE_AGAIN) {
|
||||
Curl_expire(data, 1, EXPIRE_QUIC);
|
||||
|
|
@ -1558,7 +1558,7 @@ CURLcode Curl_cf_ngtcp2_progress_egress(struct Curl_cfilter *cf,
|
|||
/* time to send */
|
||||
CURL_TRC_CF(data, cf, "egress, send collected %zu packets in %zu bytes",
|
||||
pktcnt, Curl_bufq_len(&ctx->q.sendbuf));
|
||||
result = vquic_send(cf, data, &ctx->q, gsolen);
|
||||
result = Curl_vquic_send(cf, data, &ctx->q, gsolen);
|
||||
if(result) {
|
||||
if(result == CURLE_AGAIN) {
|
||||
Curl_expire(data, 1, EXPIRE_QUIC);
|
||||
|
|
@ -1649,8 +1649,8 @@ CURLcode Curl_cf_ngtcp2_progress_ingress(struct Curl_cfilter *cf,
|
|||
if(ctx->q.sockfd != CURL_SOCKET_BAD) {
|
||||
/* Direct UDP socket (via happy eyeballs) */
|
||||
CURL_TRC_CF(data, cf, "progress_ingress(socket)");
|
||||
return vquic_recv_packets(cf, data, &ctx->q, 1000,
|
||||
cf_ngtcp2_recv_pkts, &rctx);
|
||||
return Curl_vquic_recv_packets(cf, data, &ctx->q, 1000,
|
||||
cf_ngtcp2_recv_pkts, &rctx);
|
||||
}
|
||||
else {
|
||||
/* Tunneled QUIC (CONNECT-UDP through proxy) */
|
||||
|
|
|
|||
|
|
@ -674,13 +674,13 @@ static ssize_t cf_h3_proxy_recv_closed_stream(struct Curl_cfilter *cf,
|
|||
CURL_TRC_CF(data, cf, "[%" PRId64 "] error after response headers, "
|
||||
"but we did not want a body anyway, ignore error 0x%"
|
||||
PRIx64 " %s", stream->id, stream->error3,
|
||||
vquic_h3_err_str(stream->error3));
|
||||
Curl_vquic_h3_err_str(stream->error3));
|
||||
nread = 0;
|
||||
goto out;
|
||||
}
|
||||
failf(data, "HTTP/3 stream %" PRId64 " reset by server (error 0x%" PRIx64
|
||||
" %s)", stream->id, stream->error3,
|
||||
vquic_h3_err_str(stream->error3));
|
||||
Curl_vquic_h3_err_str(stream->error3));
|
||||
*err = data->req.bytecount ? CURLE_PARTIAL_FILE : CURLE_HTTP3;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -457,12 +457,12 @@ static CURLcode recv_closed_stream(struct Curl_cfilter *cf,
|
|||
CURL_TRC_CF(data, cf, "[%" PRId64 "] error after response headers, "
|
||||
"but we did not want a body anyway, ignore error 0x%"
|
||||
PRIx64 " %s", stream->id, stream->error3,
|
||||
vquic_h3_err_str(stream->error3));
|
||||
Curl_vquic_h3_err_str(stream->error3));
|
||||
return CURLE_OK;
|
||||
}
|
||||
failf(data, "HTTP/3 stream %" PRId64 " reset by server (error 0x%" PRIx64
|
||||
" %s)", stream->id, stream->error3,
|
||||
vquic_h3_err_str(stream->error3));
|
||||
Curl_vquic_h3_err_str(stream->error3));
|
||||
return data->req.bytecount ? CURLE_PARTIAL_FILE : CURLE_HTTP3;
|
||||
}
|
||||
else if(!stream->resp_hds_complete) {
|
||||
|
|
@ -947,7 +947,7 @@ static void cf_ngtcp2_ctx_close(struct cf_ngtcp2_ctx *ctx)
|
|||
ctx->qlogfd = -1;
|
||||
Curl_vquic_tls_cleanup(&ctx->tls);
|
||||
Curl_ssl_peer_cleanup(&ctx->ssl_peer);
|
||||
vquic_ctx_free(&ctx->q);
|
||||
Curl_vquic_ctx_free(&ctx->q);
|
||||
if(ctx->h3conn) {
|
||||
nghttp3_conn_del(ctx->h3conn);
|
||||
ctx->h3conn = NULL;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ static void cf_quiche_ctx_free(struct cf_quiche_ctx *ctx)
|
|||
ctx->tls.ossl.ssl = NULL;
|
||||
Curl_vquic_tls_cleanup(&ctx->tls);
|
||||
Curl_ssl_peer_cleanup(&ctx->ssl_peer);
|
||||
vquic_ctx_free(&ctx->q);
|
||||
Curl_vquic_ctx_free(&ctx->q);
|
||||
Curl_uint32_hash_destroy(&ctx->streams);
|
||||
curlx_dyn_free(&ctx->h1hdr);
|
||||
Curl_bufq_free(&ctx->writebuf);
|
||||
|
|
@ -726,8 +726,8 @@ static CURLcode cf_process_ingress(struct Curl_cfilter *cf,
|
|||
rctx.data = data;
|
||||
rctx.pkts = 0;
|
||||
|
||||
result = vquic_recv_packets(cf, data, &ctx->q, 1000,
|
||||
cf_quiche_recv_pkts, &rctx);
|
||||
result = Curl_vquic_recv_packets(cf, data, &ctx->q, 1000,
|
||||
cf_quiche_recv_pkts, &rctx);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
|
|
@ -796,7 +796,7 @@ static CURLcode cf_flush_egress(struct Curl_cfilter *cf,
|
|||
}
|
||||
}
|
||||
|
||||
result = vquic_flush(cf, data, &ctx->q);
|
||||
result = Curl_vquic_flush(cf, data, &ctx->q);
|
||||
if(result) {
|
||||
if(result == CURLE_AGAIN) {
|
||||
Curl_expire(data, 1, EXPIRE_QUIC);
|
||||
|
|
@ -818,7 +818,7 @@ static CURLcode cf_flush_egress(struct Curl_cfilter *cf,
|
|||
if(result != CURLE_AGAIN)
|
||||
return result;
|
||||
/* Nothing more to add, flush and leave */
|
||||
result = vquic_send(cf, data, &ctx->q, gsolen);
|
||||
result = Curl_vquic_send(cf, data, &ctx->q, gsolen);
|
||||
if(result) {
|
||||
if(result == CURLE_AGAIN) {
|
||||
Curl_expire(data, 1, EXPIRE_QUIC);
|
||||
|
|
@ -831,7 +831,7 @@ static CURLcode cf_flush_egress(struct Curl_cfilter *cf,
|
|||
|
||||
++pkt_count;
|
||||
if(nread < gsolen || pkt_count >= MAX_PKT_BURST) {
|
||||
result = vquic_send(cf, data, &ctx->q, gsolen);
|
||||
result = Curl_vquic_send(cf, data, &ctx->q, gsolen);
|
||||
if(result) {
|
||||
if(result == CURLE_AGAIN) {
|
||||
Curl_expire(data, 1, EXPIRE_QUIC);
|
||||
|
|
@ -874,12 +874,12 @@ static CURLcode recv_closed_stream(struct Curl_cfilter *cf,
|
|||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] error after response headers, "
|
||||
"but we did not want a body anyway, ignore error 0x%"
|
||||
PRIx64 " %s", stream->id, stream->error3,
|
||||
vquic_h3_err_str(stream->error3));
|
||||
Curl_vquic_h3_err_str(stream->error3));
|
||||
return CURLE_OK;
|
||||
}
|
||||
failf(data, "HTTP/3 stream %" PRIu64 " reset by server (error 0x%" PRIx64
|
||||
" %s)", stream->id, stream->error3,
|
||||
vquic_h3_err_str(stream->error3));
|
||||
Curl_vquic_h3_err_str(stream->error3));
|
||||
result = data->req.bytecount ? CURLE_PARTIAL_FILE : CURLE_HTTP3;
|
||||
CURL_TRC_CF(data, cf, "[%" PRIu64 "] cf_recv, was reset -> %d",
|
||||
stream->id, (int)result);
|
||||
|
|
@ -903,7 +903,7 @@ static CURLcode cf_quiche_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
*pnread = 0;
|
||||
(void)buf;
|
||||
(void)blen;
|
||||
vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
Curl_vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
|
||||
if(!stream)
|
||||
return CURLE_RECV_ERROR;
|
||||
|
|
@ -1114,7 +1114,7 @@ static CURLcode cf_quiche_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
CURLcode result;
|
||||
|
||||
*pnwritten = 0;
|
||||
vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
Curl_vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
|
||||
result = cf_process_ingress(cf, data);
|
||||
if(result)
|
||||
|
|
@ -1272,7 +1272,7 @@ static CURLcode cf_quiche_ctx_open(struct Curl_cfilter *cf,
|
|||
DEBUGASSERT(ctx->q.sockfd != CURL_SOCKET_BAD);
|
||||
DEBUGASSERT(ctx->initialized);
|
||||
|
||||
result = vquic_ctx_init(data, &ctx->q);
|
||||
result = Curl_vquic_ctx_init(data, &ctx->q);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
|
|
@ -1397,7 +1397,7 @@ static CURLcode cf_quiche_connect(struct Curl_cfilter *cf,
|
|||
return CURLE_OK;
|
||||
}
|
||||
|
||||
vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
Curl_vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
|
||||
if(!ctx->qconn) {
|
||||
result = cf_quiche_ctx_open(cf, data);
|
||||
|
|
@ -1479,7 +1479,7 @@ static CURLcode cf_quiche_shutdown(struct Curl_cfilter *cf,
|
|||
int err;
|
||||
|
||||
ctx->shutdown_started = TRUE;
|
||||
vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
Curl_vquic_ctx_update_time(&ctx->q, Curl_pgrs_now(data));
|
||||
err = quiche_conn_close(ctx->qconn, TRUE, 0, NULL, 0);
|
||||
if(err) {
|
||||
CURL_TRC_CF(data, cf, "error %d adding shutdown packet, "
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ void Curl_quic_ver(char *p, size_t len)
|
|||
#endif
|
||||
}
|
||||
|
||||
CURLcode vquic_ctx_init(struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx)
|
||||
CURLcode Curl_vquic_ctx_init(struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx)
|
||||
{
|
||||
Curl_bufq_init2(&qctx->sendbuf, NW_CHUNK_SIZE, NW_SEND_CHUNKS,
|
||||
BUFQ_OPT_SOFT_LIMIT);
|
||||
|
|
@ -95,24 +95,24 @@ CURLcode vquic_ctx_init(struct Curl_easy *data,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
vquic_ctx_set_time(qctx, Curl_pgrs_now(data));
|
||||
Curl_vquic_ctx_set_time(qctx, Curl_pgrs_now(data));
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
void vquic_ctx_free(struct cf_quic_ctx *qctx)
|
||||
void Curl_vquic_ctx_free(struct cf_quic_ctx *qctx)
|
||||
{
|
||||
Curl_bufq_free(&qctx->sendbuf);
|
||||
}
|
||||
|
||||
void vquic_ctx_set_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow)
|
||||
void Curl_vquic_ctx_set_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow)
|
||||
{
|
||||
qctx->last_op = *pnow;
|
||||
}
|
||||
|
||||
void vquic_ctx_update_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow)
|
||||
void Curl_vquic_ctx_update_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow)
|
||||
{
|
||||
qctx->last_op = *pnow;
|
||||
}
|
||||
|
|
@ -333,8 +333,8 @@ static CURLcode vquic_send_packets(struct Curl_cfilter *cf,
|
|||
return result;
|
||||
}
|
||||
|
||||
CURLcode vquic_flush(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx)
|
||||
CURLcode Curl_vquic_flush(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx)
|
||||
{
|
||||
const unsigned char *buf;
|
||||
size_t blen, sent;
|
||||
|
|
@ -380,24 +380,26 @@ CURLcode vquic_flush(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
return CURLE_OK;
|
||||
}
|
||||
|
||||
CURLcode vquic_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen)
|
||||
CURLcode Curl_vquic_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen)
|
||||
{
|
||||
qctx->gsolen = gsolen;
|
||||
return vquic_flush(cf, data, qctx);
|
||||
return Curl_vquic_flush(cf, data, qctx);
|
||||
}
|
||||
|
||||
CURLcode vquic_send_tail_split(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen,
|
||||
size_t tail_len, size_t tail_gsolen)
|
||||
CURLcode Curl_vquic_send_tail_split(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen,
|
||||
size_t tail_len, size_t tail_gsolen)
|
||||
{
|
||||
DEBUGASSERT(Curl_bufq_len(&qctx->sendbuf) > tail_len);
|
||||
qctx->split_len = Curl_bufq_len(&qctx->sendbuf) - tail_len;
|
||||
qctx->split_gsolen = gsolen;
|
||||
qctx->gsolen = tail_gsolen;
|
||||
CURL_TRC_CF(data, cf, "vquic_send_tail_split: [%zu gso=%zu][%zu gso=%zu]",
|
||||
CURL_TRC_CF(data, cf, "Curl_vquic_send_tail_split: "
|
||||
"[%zu gso=%zu][%zu gso=%zu]",
|
||||
qctx->split_len, qctx->split_gsolen, tail_len, qctx->gsolen);
|
||||
return vquic_flush(cf, data, qctx);
|
||||
return Curl_vquic_flush(cf, data, qctx);
|
||||
}
|
||||
|
||||
#if defined(HAVE_SENDMMSG) || defined(HAVE_SENDMSG)
|
||||
|
|
@ -435,7 +437,7 @@ static CURLcode recvmmsg_packets(struct Curl_cfilter *cf,
|
|||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx,
|
||||
size_t max_pkts,
|
||||
vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
Curl_vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
{
|
||||
#if defined(__linux__) && defined(UDP_GRO)
|
||||
#define MMSG_NUM 16
|
||||
|
|
@ -541,7 +543,7 @@ static CURLcode recvmsg_packets(struct Curl_cfilter *cf,
|
|||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx,
|
||||
size_t max_pkts,
|
||||
vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
Curl_vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
{
|
||||
struct iovec msg_iov;
|
||||
struct msghdr msg;
|
||||
|
|
@ -624,7 +626,7 @@ static CURLcode recvfrom_packets(struct Curl_cfilter *cf,
|
|||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx,
|
||||
size_t max_pkts,
|
||||
vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
Curl_vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
{
|
||||
uint8_t buf[64 * 1024];
|
||||
int bufsize = (int)sizeof(buf);
|
||||
|
|
@ -685,11 +687,11 @@ out:
|
|||
}
|
||||
#endif /* !HAVE_SENDMMSG && !HAVE_SENDMSG */
|
||||
|
||||
CURLcode vquic_recv_packets(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx,
|
||||
size_t max_pkts,
|
||||
vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
CURLcode Curl_vquic_recv_packets(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx,
|
||||
size_t max_pkts,
|
||||
Curl_vquic_recv_pkts_cb *recv_cb, void *userp)
|
||||
{
|
||||
CURLcode result;
|
||||
#ifdef HAVE_SENDMMSG
|
||||
|
|
@ -885,7 +887,7 @@ CURLcode Curl_conn_may_http3(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
#ifdef CURLVERBOSE
|
||||
const char *vquic_h3_err_str(uint64_t error_code)
|
||||
const char *Curl_vquic_h3_err_str(uint64_t error_code)
|
||||
{
|
||||
if(error_code <= UINT_MAX) {
|
||||
switch((unsigned int)error_code) {
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ typedef enum {
|
|||
} vquic_h3_error;
|
||||
|
||||
#ifdef CURLVERBOSE
|
||||
const char *vquic_h3_err_str(uint64_t error_code);
|
||||
const char *Curl_vquic_h3_err_str(uint64_t error_code);
|
||||
#else
|
||||
#define vquic_h3_err_str(x) ""
|
||||
#define Curl_vquic_h3_err_str(x) ""
|
||||
#endif /* CURLVERBOSE */
|
||||
|
||||
struct cf_quic_ctx {
|
||||
|
|
@ -80,37 +80,40 @@ struct cf_quic_ctx {
|
|||
#define H3_STREAM_CTX(ctx, data) \
|
||||
((data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL)
|
||||
|
||||
CURLcode vquic_ctx_init(struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx);
|
||||
void vquic_ctx_free(struct cf_quic_ctx *qctx);
|
||||
CURLcode Curl_vquic_ctx_init(struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx);
|
||||
void Curl_vquic_ctx_free(struct cf_quic_ctx *qctx);
|
||||
|
||||
void vquic_ctx_set_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow);
|
||||
void Curl_vquic_ctx_set_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow);
|
||||
|
||||
void vquic_ctx_update_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow);
|
||||
void Curl_vquic_ctx_update_time(struct cf_quic_ctx *qctx,
|
||||
const struct curltime *pnow);
|
||||
|
||||
CURLcode vquic_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen);
|
||||
CURLcode Curl_vquic_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen);
|
||||
|
||||
CURLcode vquic_send_tail_split(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen,
|
||||
size_t tail_len, size_t tail_gsolen);
|
||||
CURLcode Curl_vquic_send_tail_split(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx, size_t gsolen,
|
||||
size_t tail_len, size_t tail_gsolen);
|
||||
|
||||
CURLcode vquic_flush(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx);
|
||||
CURLcode Curl_vquic_flush(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx);
|
||||
|
||||
typedef CURLcode vquic_recv_pkts_cb(const unsigned char *buf, size_t buflen,
|
||||
size_t gso_size,
|
||||
struct sockaddr_storage *remote_addr,
|
||||
socklen_t remote_addrlen, int ecn,
|
||||
void *userp);
|
||||
typedef CURLcode Curl_vquic_recv_pkts_cb(const unsigned char *buf,
|
||||
size_t buflen,
|
||||
size_t gso_size,
|
||||
struct sockaddr_storage *remote_addr,
|
||||
socklen_t remote_addrlen, int ecn,
|
||||
void *userp);
|
||||
|
||||
CURLcode vquic_recv_packets(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx,
|
||||
size_t max_pkts,
|
||||
vquic_recv_pkts_cb *recv_cb, void *userp);
|
||||
CURLcode Curl_vquic_recv_packets(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
struct cf_quic_ctx *qctx,
|
||||
size_t max_pkts,
|
||||
Curl_vquic_recv_pkts_cb *recv_cb,
|
||||
void *userp);
|
||||
|
||||
#ifdef USE_NGTCP2
|
||||
struct ngtcp2_mem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue