curl-fuzzer C++ reference
Loading...
Searching...
No Matches
target_profile.h File Reference

Compile-time identities and execution modes for proto fuzz targets. More...

Go to the source code of this file.

Enumerations

enum class  proto_fuzzer::TargetProfile {
  kCompatibility , kFastHttp , kDeepHttp , kFastHttps ,
  kHttpsH2 , kFastHttp2 , kFastHttp3 , kH2Proxy ,
  kProxyTransport , kResolver , kFastWebSocket , kFastSecureWebSocket ,
  kFastTelnet , kFastFtp , kFastTftp , kFastSmtp ,
  kFastImap , kFastPop3 , kFastMqtt , kFastDict ,
  kFastGopher , kFastFile , kFastLdap , kFastRtsp ,
  kFastIpfs , kApi , kMulti , kTiming
}
 Identifies one compiled proto-fuzzer lane. More...
enum class  proto_fuzzer::ScenarioRunMode {
  kFastProtocol , kProtocolCoverage , kDeepHttpCoverage , kTlsCoverage ,
  kTlsWebSocketCoverage , kTlsHttp2Coverage , kHttp2Coverage , kHttp3Coverage ,
  kH2ProxyCoverage , kProxyTransportCoverage , kResolverCoverage , kFtpCoverage ,
  kTftpCoverage , kSmtpCoverage , kImapCoverage , kPop3Coverage ,
  kMqttCoverage , kDictCoverage , kGopherCoverage , kFileCoverage ,
  kLdapCoverage , kRtspCoverage , kApiLifecycle , kMultiTransfer
}
 Selects one of the complete, valid RunScenario behaviours. More...

Functions

constexpr ScenarioRunMode proto_fuzzer::RunModeFor (TargetProfile profile)
 Derive runtime behaviour from the compiled target identity.

Detailed Description

Compile-time identities and execution modes for proto fuzz targets.

Definition in file target_profile.h.

Enumeration Type Documentation

◆ ScenarioRunMode

enum class proto_fuzzer::ScenarioRunMode
strong

Selects one of the complete, valid RunScenario behaviours.

Keeping this closed set avoids boolean combinations that have no useful interpretation.

Enumerator
kFastProtocol 

Drive the protocol without charging its hot loop for generic API probes.

kProtocolCoverage 

Drive the protocol and inspect a compact set of public result APIs.

kDeepHttpCoverage 

Drive deep HTTP plus its bounded filename-backed parser inputs.

kTlsCoverage 

Drive HTTPS through a real TLS peer and inspect live TLS result state.

kTlsWebSocketCoverage 

Drive WebSocket framing through a verified in-process TLS peer.

kTlsHttp2Coverage 

Drive an HTTPS origin through fixed ALPN h2 with push/upkeep probes.

kHttp2Coverage 

Drive a plaintext HTTP/2 prior-knowledge origin with the H2 peer.

kHttp3Coverage 

Drive ordered plaintext HTTP/3 actions through the QUIC peer.

kH2ProxyCoverage 

Drive raw HTTP/2 proxy frames around one CONNECT tunnel.

kProxyTransportCoverage 

Drive request-triggered SOCKS4/SOCKS5 negotiation, optional HAProxy framing, and the tunneled HTTP exchange.

kResolverCoverage 

Let curl resolve the origin while the socket callback still owns I/O.

kFtpCoverage 

Drive FTP or FTPS through its concurrent control/passive-data peer.

kTftpCoverage 

Drive TFTP through its datagram-preserving loopback peer.

kSmtpCoverage 

Drive SMTP or SMTPS through its command-aware control peer, including the DATA body exchange.

kImapCoverage 

Drive IMAP through its command-aware control peer, including literals.

kPop3Coverage 

Drive POP3 through its command-aware control peer, including RETR bodies.

kMqttCoverage 

Drive MQTT or MQTTS through its packet-aware single-socket peer.

kDictCoverage 

Drive DICT lookups through its command-aware stream peer and EOF-framed response body.

kGopherCoverage 

Drive Gopher through the bounded stream peer.

kFileCoverage 

Drive file:// without a peer, reading only the canonical local target.

kLdapCoverage 

Drive LDAP through its BER-aware single-socket peer, including the bind reply and scripted search-result messages.

kRtspCoverage 

Drive RTSP through its request-aligned control peer, including response bodies and interleaved RTP data.

kApiLifecycle 

Honour ApiPlan and run the dedicated lifecycle and typed-result probes.

kMultiTransfer 

Honour MultiPlan and drive several HTTP transfers through one multi.

Definition at line 85 of file target_profile.h.

◆ TargetProfile

enum class proto_fuzzer::TargetProfile
strong

Identifies one compiled proto-fuzzer lane.

A profile is the single source of truth for both mutation constraints and runtime coverage policy, which prevents independent flags from describing combinations no target uses.

Enumerator
kCompatibility 

Preserve the original mixed target and its accumulated corpus exactly.

kFastHttp 

Keep ordinary HTTP iterations cheap enough for a high mutation rate.

kDeepHttp 

Retain HTTP's complete structured request and response surface.

kFastHttps 

Exercise a complete HTTPS exchange against the in-process TLS peer.

kHttpsH2 

Exercise raw HTTP/2 origin frames after a verified TLS/ALPN handshake.

kFastHttp2 

Exercise HTTP/2 origin frames over plaintext prior knowledge.

kFastHttp3 

Exercise HTTP/3 over a valid in-process QUIC/TLS connection.

kH2Proxy 

Exercise an HTTP/1.1 origin through an HTTPS/HTTP2 CONNECT proxy.

kProxyTransport 

Exercise HTTP through an in-process SOCKS proxy, optionally preceded by a HAProxy protocol-v1 prefix after tunnel establishment.

kResolver 

Exercise localhost lookup and structured CURLOPT_RESOLVE host-cache work.

kFastWebSocket 

Exercise plaintext WebSocket framing without wall-clock waits.

kFastSecureWebSocket 

Exercise WebSocket framing through a verified TLS connection.

kFastTelnet 

Exercise bounded TELNET negotiation and callback-backed input.

kFastFtp 

Exercise FTP control and passive data connections, including implicit-TLS FTPS, without external I/O.

kFastTftp 

Exercise packet-preserving TFTP exchanges over the loopback UDP peer.

kFastSmtp 

Exercise single-connection SMTP and implicit-TLS SMTPS mail transfers.

kFastImap 

Exercise single-connection IMAP mailbox transfers through the control peer.

kFastPop3 

Exercise single-connection POP3 mailbox transfers through the control peer.

kFastMqtt 

Exercise binary MQTT and implicit-TLS MQTTS CONNECT/PUBLISH/SUBSCRIBE exchanges through the packet-aware single-socket peer.

kFastDict 

Exercise line-based DICT lookups through the raw stream peer.

kFastGopher 

Exercise Gopher selectors through the bounded stream peer.

kFastFile 

Exercise file:// URL parsing against a fixed read-only local target.

kFastLdap 

Exercise binary BER LDAP bind and search exchanges through the OpenLDAP-backed single-socket peer.

kFastRtsp 

Exercise RTSP request/response exchanges and interleaved RTP delivery through the request-aligned stream peer.

kFastIpfs 

Exercise curl's ipfs:// and ipns:// gateway rewrite as an ordinary HTTP GET against the in-process HTTP peer.

kApi 

Exercise easy, share, multi, URL, and result API lifecycles.

kMulti 

Exercise several easy handles through one shared multi handle.

kTiming 

Isolate deterministic backpressure and timed-wait behavior.

Definition at line 18 of file target_profile.h.

Function Documentation

◆ RunModeFor()

ScenarioRunMode proto_fuzzer::RunModeFor ( TargetProfile profile)
constexpr

Derive runtime behaviour from the compiled target identity.

Mutation policy remains profile-specific, while targets that need the same execution cost deliberately share a run mode.

Parameters
profileCompiled target whose runner behaviour is required.
Returns
The only RunScenario mode valid for that target.

Definition at line 146 of file target_profile.h.