Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
net.cpp File Reference
#include <test/fuzz/util/net.h>
#include <compat/compat.h>
#include <netaddress.h>
#include <node/protocol_version.h>
#include <protocol.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/util.h>
#include <test/util/net.h>
#include <util/sock.h>
#include <util/time.h>
#include <array>
#include <cassert>
#include <cerrno>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ranges>
#include <thread>
#include <vector>
Include dependency graph for net.cpp:

Go to the source code of this file.

Functions

CNetAddr ConsumeNetAddr (FuzzedDataProvider &fuzzed_data_provider, FastRandomContext *rand) noexcept
 Create a CNetAddr.
CAddress ConsumeAddress (FuzzedDataProvider &fuzzed_data_provider) noexcept
template<typename P>
ConsumeDeserializationParams (FuzzedDataProvider &fuzzed_data_provider) noexcept
template CNetAddr::SerParams ConsumeDeserializationParams (FuzzedDataProvider &) noexcept
void FillNode (FuzzedDataProvider &fuzzed_data_provider, ConnmanTestMsg &connman, CNode &node) noexcept

Function Documentation

◆ ConsumeAddress()

CAddress ConsumeAddress ( FuzzedDataProvider & fuzzed_data_provider)
noexcept

Definition at line 88 of file net.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeDeserializationParams() [1/2]

template CNetAddr::SerParams ConsumeDeserializationParams ( FuzzedDataProvider & )
noexcept

◆ ConsumeDeserializationParams() [2/2]

template<typename P>
P ConsumeDeserializationParams ( FuzzedDataProvider & fuzzed_data_provider)
nodiscardnoexcept

Definition at line 94 of file net.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeNetAddr()

CNetAddr ConsumeNetAddr ( FuzzedDataProvider & fuzzed_data_provider,
FastRandomContext * rand = nullptr )
noexcept

Create a CNetAddr.

It may have addr.IsValid() == false.

Parameters
[in,out]fuzzed_data_providerTake data for the address from this, if rand is nullptr.
[in,out]randIf not nullptr, take data from it instead of from fuzzed_data_provider. Prefer generating addresses using fuzzed_data_provider because it is not uniform. Only use rand if fuzzed_data_provider is exhausted or its data is needed for other things.
Returns
a "random" network address.

Definition at line 29 of file net.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillNode()

void FillNode ( FuzzedDataProvider & fuzzed_data_provider,
ConnmanTestMsg & connman,
CNode & node )
noexcept

Definition at line 457 of file net.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: