wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
request_drive.h
Go to the documentation of this file.
1#ifndef WIRED_H3REQDRIVE_REQUEST_DRIVE_H
2#define WIRED_H3REQDRIVE_REQUEST_DRIVE_H
3
4#include "app/http3/core/h3/priority.h"
5#include "app/qpack/qpack/dyntable.h"
8
13
19
28 u64 stream_id, const wired_h3reqdrive_get_in* in, wired_obuf* out);
29
38
48 u64 stream_id, const wired_h3reqdrive_send_in* in, wired_obuf* out);
49
52#define WIRED_H3REQDRIVE_MAX_HDRS 32
53
65
144
151 return wired_span_of(r->path, r->path_len);
152}
153
164 const wired_h3reqdrive_req* req, wired_span name, wired_span* out);
165
177 wired_span stream_data, wired_mspan scratch, wired_h3reqdrive_req* r);
178
192 wired_span stream_data,
193 wired_mspan scratch,
194 const qpack_dyn* dyn,
196
197#endif
int wired_h3reqdrive_send_get(u64 stream_id, const wired_h3reqdrive_get_in *in, wired_obuf *out)
RFC 9114 4.1 / 4.3.1, RFC 9204 4.5: drive an HTTP/3 GET request end to end: QPACK-encode the request ...
#define WIRED_H3REQDRIVE_MAX_HDRS
Regular request headers kept per request (see wired_h3reqdrive_req's hdrs); further ones are ignored.
Definition request_drive.h:52
static wired_span wired_h3req_path(const wired_h3reqdrive_req *r)
The request's :path as one view (path, path_len).
Definition request_drive.h:150
int wired_h3reqdrive_recv_get_dyn(wired_span stream_data, wired_mspan scratch, const qpack_dyn *dyn, wired_h3reqdrive_req *r)
Same as wired_h3reqdrive_recv_get, but also resolves dynamic-table references (RFC 9204 4....
int wired_http_req_header(const wired_h3reqdrive_req *req, wired_span name, wired_span *out)
RFC 9114 4.2: find a regular request header by name.
int wired_h3reqdrive_recv_get(wired_span stream_data, wired_mspan scratch, wired_h3reqdrive_req *r)
RFC 9114 4.1, RFC 9204 4.5: decode a STREAM frame carrying a request: recover :method,...
int wired_h3reqdrive_send_method(u64 stream_id, const wired_h3reqdrive_send_in *in, wired_obuf *out)
RFC 9114 4.1 / 4.3.1, RFC 9204 4.5: drive an arbitrary-method HTTP/3 request end to end: QPACK-encode...
Value-type views that fold the SDK's recurring argument shapes into single parameters,...
static wired_span wired_span_of(const u8 *p, usz n)
Make a read-only span over p[0..n).
Definition span.h:70
RFC 9218 4: a request's priority — urgency (lower is more urgent) and whether the response may be ser...
Definition priority.h:15
RFC 9204 3.2.
Definition dyntable.h:31
The :path and :authority values for a GET request.
Definition request_drive.h:15
wired_span authority
the :authority pseudo-header value
Definition request_drive.h:17
wired_span path
the :path pseudo-header value
Definition request_drive.h:16
One regular request header: name and value as octet positions inside the request's hdr_base (its deco...
Definition request_drive.h:59
u16 name_off
name position in hdr_base
Definition request_drive.h:60
u16 value_len
value length in octets
Definition request_drive.h:63
u16 value_off
value position in hdr_base
Definition request_drive.h:62
u16 name_len
name length in octets
Definition request_drive.h:61
RFC 9114 4.1 / 4.3.1, RFC 9204 4.5: recovered request pseudo-headers.
Definition request_drive.h:69
usz hdr_count
entries used in hdrs
Definition request_drive.h:131
const u8 * scheme
:scheme value (static-table view or scratch)
Definition request_drive.h:72
usz origin_len
origin length in octets, 0 if absent
Definition request_drive.h:87
usz path_len
path length in octets
Definition request_drive.h:78
usz cookie_len
cookie length in octets, 0 if absent
Definition request_drive.h:100
usz body_len
0 for GET and other bodyless requests
Definition request_drive.h:82
u64 qpack_trailer_ric
RFC 9204 2.2.2.1: the trailer section's Required Insert Count (0 with no trailer); a non-zero one owe...
Definition request_drive.h:137
usz wt_avail_len
wt-available-protocols length in octets, 0 if absent
Definition request_drive.h:94
usz authority_len
authority length in octets
Definition request_drive.h:76
const u8 * authority
:authority value (static-table view or scratch)
Definition request_drive.h:74
const u8 * method
:method value (static-table view or scratch)
Definition request_drive.h:70
int expect_continue
RFC 9110 10.1.1: 1 if a regular expect field carried exactly "100-continue" (case-sensitive; every re...
Definition request_drive.h:106
usz method_len
method length in octets
Definition request_drive.h:71
usz protocol_len
protocol length in octets, 0 if absent
Definition request_drive.h:80
const u8 * hdr_base
RFC 9114 4.2: the first WIRED_H3REQDRIVE_MAX_HDRS regular (non-pseudo) header field lines in received...
Definition request_drive.h:128
const u8 * body
request body view into stream_data, 0 if none
Definition request_drive.h:81
u8 wt_avail[256]
WebTransport subprotocol negotiation: the raw wt-available-protocols header value (an RFC 8941 sf-lis...
Definition request_drive.h:93
int qpack_failed
RFC 9204 4.5.1 / 2.1.2: 1 if the section prefix could not be decoded (an invalid Required Insert Coun...
Definition request_drive.h:142
const u8 * protocol
RFC 9220 3: :protocol value, 0 if absent.
Definition request_drive.h:79
const u8 * origin
regular origin header value (static-table view or scratch), 0 if absent (RFC 9220 3 / WebTransport dr...
Definition request_drive.h:84
u64 qpack_ric
RFC 9204 4.5.1.1: the field section's Required Insert Count – non-zero means the decoder owes a Secti...
Definition request_drive.h:134
u16 too_large_status
RFC 9110 15.5.14 / RFC 6585 5: 413 (body) or 431 (header section) when the request stream overflowed ...
Definition request_drive.h:120
int frame_unexpected
RFC 9114 7.2.5/7.2.8 (9114-067/9114-073): 1 if the request stream carried a frame this endpoint must ...
Definition request_drive.h:115
const u8 * path
:path value (static-table view or scratch)
Definition request_drive.h:77
u8 cookie[512]
RFC 9114 4.2.1: multiple cookie field lines, reassembled with the "; " delimiter into a single value ...
Definition request_drive.h:99
usz scheme_len
scheme length in octets
Definition request_drive.h:73
wired_h3reqdrive_hdr hdrs[WIRED_H3REQDRIVE_MAX_HDRS]
the kept headers, in received order (see hdr_base)
Definition request_drive.h:130
h3_priority priority
RFC 9218 5 priority header (defaults).
Definition request_drive.h:83
Remaining arguments of wired_h3reqdrive_send_method beyond stream_id/out: the request line (method/pa...
Definition request_drive.h:32
wired_span method
the :method pseudo-header value
Definition request_drive.h:33
wired_span authority
the :authority pseudo-header value
Definition request_drive.h:35
wired_span path
the :path pseudo-header value
Definition request_drive.h:34
wired_span body
optional request body; empty for none
Definition request_drive.h:36
Mutable view of a byte range.
Definition span.h:42
Growing output buffer view for variable-length results.
Definition span.h:54
Read-only view of a byte range.
Definition span.h:30
Linux direct syscalls.
u64 usz
unsigned size (size_t equivalent)
Definition types.h:20
unsigned short u16
unsigned 16-bit integer
Definition types.h:17
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18
unsigned long u64
unsigned 64-bit integer
Definition types.h:13