Bitcoin Core 28.99.0
P2P Digital Currency
Functions
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 <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. More...
 
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 87 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)
noexcept

Definition at line 93 of file net.cpp.

Here is the call 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 28 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 415 of file net.cpp.

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