Bitcoin Core  28.1.0
P2P Digital Currency
Classes | Functions | Variables
net.h File Reference
#include <compat/compat.h>
#include <net.h>
#include <net_permissions.h>
#include <net_processing.h>
#include <netaddress.h>
#include <node/connection_types.h>
#include <node/eviction.h>
#include <sync.h>
#include <util/sock.h>
#include <algorithm>
#include <array>
#include <cassert>
#include <chrono>
#include <cstdint>
#include <cstring>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for net.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Span< C >
 A Span is an object that can refer to a contiguous sequence of objects. More...
 
struct  ConnmanTestMsg
 
class  StaticContentsSock
 A mocked Sock alternative that returns a statically contained data upon read and succeeds and ignores all writes. More...
 

Functions

std::vector< NodeEvictionCandidateGetRandomNodeEvictionCandidates (int n_candidates, FastRandomContext &random_context)
 

Variables

constexpr ServiceFlags ALL_SERVICE_FLAGS []
 
constexpr NetPermissionFlags ALL_NET_PERMISSION_FLAGS []
 
constexpr ConnectionType ALL_CONNECTION_TYPES []
 
constexpr auto ALL_NETWORKS
 

Function Documentation

◆ GetRandomNodeEvictionCandidates()

std::vector<NodeEvictionCandidate> GetRandomNodeEvictionCandidates ( int  n_candidates,
FastRandomContext random_context 
)

Definition at line 116 of file net.cpp.

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

Variable Documentation

◆ ALL_CONNECTION_TYPES

constexpr ConnectionType ALL_CONNECTION_TYPES[]
Initial value:
{
}
AddrFetch connections are short lived connections used to solicit addresses from peers.
Inbound connections are those initiated by a peer.
Feeler connections are short-lived connections made to check that a node is alive.
These are the default connections that we use to connect with the network.
We open manual connections to addresses that users explicitly requested via the addnode RPC or the -a...
We use block-relay-only connections to help prevent against partition attacks.

Definition at line 117 of file net.h.

◆ ALL_NET_PERMISSION_FLAGS

constexpr NetPermissionFlags ALL_NET_PERMISSION_FLAGS[]

◆ ALL_NETWORKS

constexpr auto ALL_NETWORKS
Initial value:
= std::array{
}
A set of addresses that represent the hash of a string or FQDN.
Definition: netaddress.h:53
IPv4.
Definition: netaddress.h:37
I2P.
Definition: netaddress.h:46
IPv6.
Definition: netaddress.h:40
TOR (v2 or v3)
Definition: netaddress.h:43
CJDNS.
Definition: netaddress.h:49
Addresses from these networks are not publicly routable on the global Internet.
Definition: netaddress.h:34

Definition at line 126 of file net.h.

◆ ALL_SERVICE_FLAGS

constexpr ServiceFlags ALL_SERVICE_FLAGS[]