curl-fuzzer C++ reference
Loading...
Searching...
No Matches
resolver_getaddrinfo_shim.cc File Reference

Target-local deterministic getaddrinfo backend for resolver fuzzing. More...

Go to the source code of this file.

Functions

int getaddrinfo (const char *nodename, const char *service, const addrinfo *hints, addrinfo **result)
 Replace libc name service only in curl_fuzzer_proto_resolver.
void freeaddrinfo (addrinfo *address) noexcept
 Match the ownership contract of the target-local getaddrinfo definition.

Detailed Description

Target-local deterministic getaddrinfo backend for resolver fuzzing.

Definition in file resolver_getaddrinfo_shim.cc.

Function Documentation

◆ freeaddrinfo()

void freeaddrinfo ( addrinfo * address)
noexcept

Match the ownership contract of the target-local getaddrinfo definition.

Parameters
addressAddress chain returned by the target-local getaddrinfo.

Definition at line 208 of file resolver_getaddrinfo_shim.cc.

◆ getaddrinfo()

int getaddrinfo ( const char * nodename,
const char * service,
const addrinfo * hints,
addrinfo ** result )

Replace libc name service only in curl_fuzzer_proto_resolver.

The fixed hostnames are installed by target policy, so no mutation or ambient resolver configuration can select another destination.

Parameters
nodenameHostname selected by the fixed resolver target policy.
serviceDecimal service port, or null when no port is requested.
hintsRequested address family and socket properties, or null.
[out]resultNewly allocated address chain on success.
Returns
Zero on success, otherwise the matching EAI_* resolver error.

Definition at line 129 of file resolver_getaddrinfo_shim.cc.