|
curl-fuzzer C++ reference
|
Protocol state shared by TLS and plaintext HTTP/2 origin peers. More...
#include <h2_runtime.h>
Public Member Functions | |
| H2Runtime () | |
| Construct detached protocol state without observing a connection. | |
| void | PrepareMulti (CURLM *multi, bool accept_push) |
| Install the bounded push policy before curl emits its initial SETTINGS. | |
| void | AttachConnection (MockConnection *connection) |
| Observe application bytes after the carrier has decoded its transport. | |
| void | ResetPlan (const curl::fuzzer::proto::Http2Plan &plan, std::string scheme, std::string authority="tls.test") |
| Borrow a structured plan for the ensuing synchronous drive. | |
| void | DrivePlan (CURLM *multi, MockServer &server, int max_idle_iterations, int max_drive_iterations, const std::function< void()> &after_perform) |
| Alternate curl and one bounded H2 plan boundary. | |
| void | FinishTransfer (CURL *easy, MockConnection *connection) |
| Probe upkeep while curl's connection cache and the peer are still live. | |
| std::size_t | push_callback_count () const |
| std::size_t | push_header_count () const |
| bool | saw_push_path () const |
| std::size_t | accepted_push_count () const |
| std::size_t | pushed_body_bytes () const |
| CURLcode | upkeep_result () const |
| std::size_t | observed_request_count () const |
| std::size_t | observed_client_settings_count () const |
| std::size_t | observed_client_priority_count () const |
| bool | post_headers_transition_applied () const |
| CURLcode | stream_weight_setopt_result () const |
| CURLcode | stream_weight_egress_result () const |
| void | ApplyPostHeadersTransition (CURL *easy) |
| Apply the plan's one state transition only after a real request stream has been observed. | |
Protocol state shared by TLS and plaintext HTTP/2 origin peers.
This object owns the client-frame observer and push callback userdata, but borrows the transport and curl handles. The carrier must destroy its retained multi and observed connections before destroying this runtime.
Definition at line 33 of file h2_runtime.h.
| std::size_t proto_fuzzer::H2Runtime::accepted_push_count | ( | ) | const |
Definition at line 166 of file h2_runtime.cc.
| void proto_fuzzer::H2Runtime::ApplyPostHeadersTransition | ( | CURL * | easy | ) |
Apply the plan's one state transition only after a real request stream has been observed.
Changing the public option at this point makes curl compare the desired weight against the live stream's effective weight.
| easy | Active easy handle whose live stream weight is changed. |
Definition at line 72 of file h2_runtime.cc.
| void proto_fuzzer::H2Runtime::AttachConnection | ( | MockConnection * | connection | ) |
Observe application bytes after the carrier has decoded its transport.
A null connection is harmless; an attached connection borrows this runtime.
| connection | Transport to observe, or nullptr when creation failed. |
Definition at line 50 of file h2_runtime.cc.
| void proto_fuzzer::H2Runtime::DrivePlan | ( | CURLM * | multi, |
| MockServer & | server, | ||
| int | max_idle_iterations, | ||
| int | max_drive_iterations, | ||
| const std::function< void()> & | after_perform ) |
Alternate curl and one bounded H2 plan boundary.
Carrier observation and response-resume work run after each successful perform through the hook. Idle and operation limits remain selected by the owning driver.
| multi | Caller-owned multi handle containing the transfer to drive. |
| server | Carrier exposing the currently active connection. |
| max_idle_iterations | Consecutive no-progress turns allowed. |
| max_drive_iterations | Total state-machine turns allowed. |
| after_perform | Carrier hook invoked after each successful perform. |
Definition at line 95 of file h2_runtime.cc.
| void proto_fuzzer::H2Runtime::FinishTransfer | ( | CURL * | easy, |
| MockConnection * | connection ) |
Probe upkeep while curl's connection cache and the peer are still live.
| easy | Caller-owned easy handle whose upkeep API is probed. |
| connection | Peer to drain after upkeep, or nullptr when none opened. |
Definition at line 133 of file h2_runtime.cc.
| std::size_t proto_fuzzer::H2Runtime::observed_client_priority_count | ( | ) | const |
Definition at line 181 of file h2_runtime.cc.
| std::size_t proto_fuzzer::H2Runtime::observed_client_settings_count | ( | ) | const |
Definition at line 178 of file h2_runtime.cc.
| std::size_t proto_fuzzer::H2Runtime::observed_request_count | ( | ) | const |
Definition at line 175 of file h2_runtime.cc.
| bool proto_fuzzer::H2Runtime::post_headers_transition_applied | ( | ) | const |
Definition at line 184 of file h2_runtime.cc.
| void proto_fuzzer::H2Runtime::PrepareMulti | ( | CURLM * | multi, |
| bool | accept_push ) |
Install the bounded push policy before curl emits its initial SETTINGS.
The runtime must outlive the multi and any accepted pushed handles.
| multi | Caller-owned multi handle receiving the push callbacks. |
| accept_push | Whether to accept one push and reject further pushes. |
Definition at line 38 of file h2_runtime.cc.
| std::size_t proto_fuzzer::H2Runtime::push_callback_count | ( | ) | const |
Definition at line 157 of file h2_runtime.cc.
| std::size_t proto_fuzzer::H2Runtime::push_header_count | ( | ) | const |
Definition at line 160 of file h2_runtime.cc.
| std::size_t proto_fuzzer::H2Runtime::pushed_body_bytes | ( | ) | const |
Definition at line 169 of file h2_runtime.cc.
| void proto_fuzzer::H2Runtime::ResetPlan | ( | const curl::fuzzer::proto::Http2Plan & | plan, |
| std::string | scheme, | ||
| std::string | authority = "tls.test" ) |
Borrow a structured plan for the ensuing synchronous drive.
| plan | Stable plan that remains alive and unmodified during the drive. |
| scheme | Scheme used in generated push-request pseudo-headers. |
| authority | Authority used in generated push-request pseudo-headers. |
Definition at line 60 of file h2_runtime.cc.
| bool proto_fuzzer::H2Runtime::saw_push_path | ( | ) | const |
Definition at line 163 of file h2_runtime.cc.
| CURLcode proto_fuzzer::H2Runtime::stream_weight_egress_result | ( | ) | const |
Definition at line 190 of file h2_runtime.cc.
| CURLcode proto_fuzzer::H2Runtime::stream_weight_setopt_result | ( | ) | const |
Definition at line 187 of file h2_runtime.cc.
| CURLcode proto_fuzzer::H2Runtime::upkeep_result | ( | ) | const |
Definition at line 172 of file h2_runtime.cc.