Artifactspublic-v0

curl

master
ply4 git calls24 ms289 KiB3 cachedprotocol v2
130 lines5.0 KiBRaw
1#ifndef HEADER_CURL_VQUIC_QUIC_INT_H
2#define HEADER_CURL_VQUIC_QUIC_INT_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
11 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at https://curl.se/docs/copyright.html.
15 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 * SPDX-License-Identifier: curl
24 *
25 ***************************************************************************/
26#include "curl_setup.h"
28#ifdef USE_HTTP3
30#include "bufq.h"
31#include "u32_ptrset.h"
33#define MAX_UDP_PAYLOAD_SIZE 1452
35/* definitions from RFC 9114, ch 8.1 */
36typedef enum {
37 CURL_H3_ERR_NO_ERROR = 0x0100,
38 CURL_H3_ERR_GENERAL_PROTOCOL_ERROR = 0x0101,
39 CURL_H3_ERR_INTERNAL_ERROR = 0x0102,
40 CURL_H3_ERR_STREAM_CREATION_ERROR = 0x0103,
41 CURL_H3_ERR_CLOSED_CRITICAL_STREAM = 0x0104,
42 CURL_H3_ERR_FRAME_UNEXPECTED = 0x0105,
43 CURL_H3_ERR_FRAME_ERROR = 0x0106,
44 CURL_H3_ERR_EXCESSIVE_LOAD = 0x0107,
45 CURL_H3_ERR_ID_ERROR = 0x0108,
46 CURL_H3_ERR_SETTINGS_ERROR = 0x0109,
47 CURL_H3_ERR_MISSING_SETTINGS = 0x010a,
48 CURL_H3_ERR_REQUEST_REJECTED = 0x010b,
49 CURL_H3_ERR_REQUEST_CANCELLED = 0x010c,
50 CURL_H3_ERR_REQUEST_INCOMPLETE = 0x010d,
51 CURL_H3_ERR_MESSAGE_ERROR = 0x010e,
52 CURL_H3_ERR_CONNECT_ERROR = 0x010f,
53 CURL_H3_ERR_VERSION_FALLBACK = 0x0110,
54} vquic_h3_error;
56#ifdef CURLVERBOSE
57const char *Curl_vquic_h3_err_str(uint64_t error_code);
58#else
59#define Curl_vquic_h3_err_str(x) ""
60#endif /* CURLVERBOSE */
62struct cf_quic_ctx {
63 curl_socket_t sockfd; /* connected UDP socket */
64 struct sockaddr_storage local_addr; /* address socket is bound to */
65 socklen_t local_addrlen; /* length of local address */
67 struct bufq sendbuf; /* buffer for sending one or more packets */
68 struct curltime first_byte_at; /* when first byte was recvd */
69 struct curltime last_op; /* last (attempted) send/recv operation */
70 struct curltime last_io; /* last successful socket IO */
71 size_t gsolen; /* length of individual packets in send buf */
72 size_t split_len; /* if != 0, buffer length after which GSO differs */
73 size_t split_gsolen; /* length of individual packets after split_len */
74#ifdef DEBUGBUILD
75 int wblock_percent; /* percent of writes doing EAGAIN */
76#endif
77 BIT(got_first_byte); /* if first byte was received */
78 BIT(no_gso); /* do not use gso on sending */
79};
81#define H3_STREAM_CTX(ctx, data) \
82 ((data) ? Curl_u32_ptrset_get(&(ctx)->streams, (data)->mid) : NULL)
84CURLcode Curl_vquic_ctx_init(struct Curl_easy *data,
85 struct cf_quic_ctx *qctx);
86void Curl_vquic_ctx_free(struct cf_quic_ctx *qctx);
88void Curl_vquic_ctx_set_time(struct cf_quic_ctx *qctx,
89 const struct curltime *pnow);
91void Curl_vquic_ctx_update_time(struct cf_quic_ctx *qctx,
92 const struct curltime *pnow);
94CURLcode Curl_vquic_send(struct Curl_cfilter *cf, struct Curl_easy *data,
95 struct cf_quic_ctx *qctx, size_t gsolen);
97CURLcode Curl_vquic_send_tail_split(struct Curl_cfilter *cf,
98 struct Curl_easy *data,
99 struct cf_quic_ctx *qctx, size_t gsolen,
100 size_t tail_len, size_t tail_gsolen);
102CURLcode Curl_vquic_flush(struct Curl_cfilter *cf, struct Curl_easy *data,
103 struct cf_quic_ctx *qctx);
105typedef CURLcode Curl_vquic_recv_pkts_cb(const unsigned char *buf,
106 size_t buflen,
107 size_t gso_size,
108 struct sockaddr_storage *remote_addr,
109 socklen_t remote_addrlen, uint8_t ecn,
110 void *userp);
112CURLcode Curl_vquic_recv_packets(struct Curl_cfilter *cf,
113 struct Curl_easy *data,
114 struct cf_quic_ctx *qctx,
115 size_t max_pkts,
116 Curl_vquic_recv_pkts_cb *recv_cb,
117 void *userp);
119#ifdef USE_NGTCP2
120struct ngtcp2_mem;
121struct ngtcp2_mem *Curl_ngtcp2_mem(void);
122#endif
123#ifdef USE_NGHTTP3
124struct nghttp3_mem;
125struct nghttp3_mem *Curl_nghttp3_mem(void);
126#endif
128#endif /* !USE_HTTP3 */
130#endif /* HEADER_CURL_VQUIC_QUIC_INT_H */
Diagnostics4 git calls · 24 ms
CallStatusSizeTime024 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=19
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2001.8 KiB · hit19 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=1886
git.response.cache=HIT
git.response.duration_ms=19
git.fetch.wants=39398529357af78eeda564439ea88b0615f43d8c
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1886
git.pkt.payload.max=1865
git.sideband.band1.bytes=1864
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e37e713b789318
Request
e46a3e32…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format