curl-fuzzer C++ reference
Loading...
Searching...
No Matches
proto_fuzzer::H2PlanDriver Class Referencefinal

Converts Http2Plan actions to correlated wire frames while tracking the request streams observed from curl. More...

#include <h2_plan.h>

Inheritance diagram for proto_fuzzer::H2PlanDriver:
proto_fuzzer::IncomingDataObserver

Public Member Functions

void Reset (const curl::fuzzer::proto::Http2Plan &plan, std::string scheme="https", std::string authority="tls.test")
 Reset HPACK and stream state for one connection.
void ObserveIncomingData (const unsigned char *data, std::size_t size) override
 Parse client frame headers after transport decoding.
bool NextChunk (std::string *output)
 Advance one scripted boundary.
bool has_pending_work () const
std::size_t observed_request_count () const
std::size_t observed_client_settings_count () const
std::size_t observed_client_priority_count () const

Detailed Description

Converts Http2Plan actions to correlated wire frames while tracking the request streams observed from curl.

It has no transport dependency and can therefore serve both TLS and cleartext H2 origin peers.

Definition at line 30 of file h2_plan.h.

Member Function Documentation

◆ has_pending_work()

bool proto_fuzzer::H2PlanDriver::has_pending_work ( ) const
Returns
true while startup or a bounded action remains to be processed.

Definition at line 545 of file h2_plan.cc.

◆ NextChunk()

bool proto_fuzzer::H2PlanDriver::NextChunk ( std::string * output)

Advance one scripted boundary.

output receives zero or more complete HTTP/2 frames. A true result also represents a consumed wait or yield; false means the next barrier is not ready or the plan is complete.

Parameters
outputDestination for the serialized frame bytes.
Returns
true when a frame, wait, or yield boundary was consumed.

Definition at line 489 of file h2_plan.cc.

◆ observed_client_priority_count()

std::size_t proto_fuzzer::H2PlanDriver::observed_client_priority_count ( ) const
Returns
PRIORITY frames observed from curl since the latest plan reset.

Definition at line 560 of file h2_plan.cc.

◆ observed_client_settings_count()

std::size_t proto_fuzzer::H2PlanDriver::observed_client_settings_count ( ) const
Returns
number of non-ACK client SETTINGS frames observed.

Definition at line 557 of file h2_plan.cc.

◆ observed_request_count()

std::size_t proto_fuzzer::H2PlanDriver::observed_request_count ( ) const
Returns
number of distinct client request streams observed.

Definition at line 554 of file h2_plan.cc.

◆ ObserveIncomingData()

void proto_fuzzer::H2PlanDriver::ObserveIncomingData ( const unsigned char * data,
std::size_t size )
overridevirtual

Parse client frame headers after transport decoding.

Parameters
dataContiguous bytes received from curl.
sizeNumber of bytes available at data.

Implements proto_fuzzer::IncomingDataObserver.

Definition at line 158 of file h2_plan.cc.

◆ Reset()

void proto_fuzzer::H2PlanDriver::Reset ( const curl::fuzzer::proto::Http2Plan & plan,
std::string scheme = "https",
std::string authority = "tls.test" )

Reset HPACK and stream state for one connection.

Parameters
planOrdered H2 actions and initial peer settings to execute.
schemeScheme used in generated push-request pseudo-headers.
authorityAuthority used in generated push-request pseudo-headers.

Definition at line 135 of file h2_plan.cc.


The documentation for this class was generated from the following files: