15#include "proto_fuzzer/allocation_fault_injection.h"
17namespace proto_fuzzer {
41 if (!
scenario()->pop3_starttls_filter_allocation_failure()) {
45 if (starttls_accepted) {
46 allocation_fault_injection::ArmNextAllocationFailure();
57#if defined(PROTO_FUZZER_OBSERVE_STATE)
60 (void)pop3_observation;
virtual void ObserveState()
Default no-op for peers without protocol-specific observations.
const std::string & control_transcript() const
Expose the bounded command capture from the most recent drive so tests can verify protocol states wit...
const curl::fuzzer::proto::Scenario * scenario() const
Borrowed scenario for the synchronous drive, or nullptr outside RunLoop().
static std::string_view FirstToken(std::string_view line)
Remove optional leading horizontal whitespace and return the first token without allocating.
const std::string * NextControlReply()
Return the next command-aligned response within the shared response-count budget.
const std::string & uploaded_data() const
Expose a bounded prefix of bytes drained during the most recent body phase while continuing to drain ...
static bool TokenEquals(std::string_view token, std::string_view expected_uppercase)
Fold only ASCII lowercase command letters.
bool WriteControlBytes(std::string_view bytes)
Keep failed peer writes local to the mock.
void QueueShutdownReply() override
Queue a +OK for the blocking QUIT that follows easy cleanup, then let the shared transport half-close...
void HandleLine(std::string_view line) override
Advance one reply for every complete command.
Pop3MockServer()
Begin without a borrowed protobuf or open socketpair.
~Pop3MockServer() override
Release the server-owned socketpair half after curl has returned its client descriptor.
void ObserveState() override
Retain protocol outcomes in coverage and introspector builds.
Command-aware in-process peer for curl's POP3 state machine.