33 ~H2PlanDriver()
override;
35 H2PlanDriver(
const H2PlanDriver&) =
delete;
36 H2PlanDriver& operator=(
const H2PlanDriver&) =
delete;
38 void Reset(
const curl::fuzzer::proto::Http2Plan& plan, std::string scheme =
"https",
39 std::string authority =
"tls.test");
54 struct ClientStreamState {
55 std::size_t headers = 0;
57 std::size_t end_stream = 0;
60 std::uint32_t ResolveStream(
const curl::fuzzer::proto::Http2StreamRef& stream,
bool allow_connection)
const;
61 std::uint32_t ResolvePromisedStream(
const curl::fuzzer::proto::Http2StreamRef& stream);
62 bool WaitSatisfied(
const curl::fuzzer::proto::Http2Wait& wait)
const;
63 bool SerializeAction(
const curl::fuzzer::proto::Http2Action& action, std::string* output);
64 bool EncodeHeaders(
const std::vector<std::pair<std::string, std::string>>& headers, std::string* output);
65 void ParseClientFrames();
66 void RecordClientFrame(std::uint8_t type, std::uint8_t flags, std::uint32_t stream_id);
68 const curl::fuzzer::proto::Http2Plan* plan_;
69 nghttp2_hd_deflater* deflater_;
70 std::size_t next_action_;
71 std::size_t remaining_yields_;
72 bool initial_settings_sent_;
73 bool client_settings_ack_sent_;
74 bool expect_client_preface_;
75 std::size_t observed_client_settings_;
76 std::size_t observed_client_priority_;
77 std::string client_bytes_;
78 std::vector<std::uint32_t> request_streams_;
79 std::vector<std::uint32_t> pushed_streams_;
80 std::unordered_map<std::uint32_t, ClientStreamState> client_streams_;
82 std::string authority_;