Bitcoin Core 22.99.0
P2P Digital Currency
Classes | Functions | Variables
net.h File Reference
#include <compat.h>
#include <netaddress.h>
#include <net.h>
#include <util/sock.h>
#include <array>
#include <cassert>
#include <cstring>
#include <string>
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

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 44 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[]
constexpr
Initial value:
{
}
@ BLOCK_RELAY
We use block-relay-only connections to help prevent against partition attacks.
@ MANUAL
We open manual connections to addresses that users explicitly requested via the addnode RPC or the -a...
@ OUTBOUND_FULL_RELAY
These are the default connections that we use to connect with the network.
@ FEELER
Feeler connections are short-lived connections made to check that a node is alive.
@ INBOUND
Inbound connections are those initiated by a peer.
@ ADDR_FETCH
AddrFetch connections are short lived connections used to solicit addresses from peers.

Definition at line 69 of file net.h.

◆ ALL_NET_PERMISSION_FLAGS

constexpr NetPermissionFlags ALL_NET_PERMISSION_FLAGS[]
constexpr

◆ ALL_NETWORKS

constexpr auto ALL_NETWORKS
constexpr
Initial value:
= std::array{
}
@ NET_I2P
I2P.
Definition: netaddress.h:59
@ NET_CJDNS
CJDNS.
Definition: netaddress.h:62
@ NET_ONION
TOR (v2 or v3)
Definition: netaddress.h:56
@ NET_IPV6
IPv6.
Definition: netaddress.h:53
@ NET_IPV4
IPv4.
Definition: netaddress.h:50
@ NET_UNROUTABLE
Addresses from these networks are not publicly routable on the global Internet.
Definition: netaddress.h:47
@ NET_INTERNAL
A set of addresses that represent the hash of a string or FQDN.
Definition: netaddress.h:66

Definition at line 78 of file net.h.

◆ ALL_SERVICE_FLAGS

constexpr ServiceFlags ALL_SERVICE_FLAGS[]
constexpr
Initial value:
{
}
@ NODE_NONE
Definition: protocol.h:274
@ NODE_WITNESS
Definition: protocol.h:284
@ NODE_NETWORK_LIMITED
Definition: protocol.h:291
@ NODE_BLOOM
Definition: protocol.h:281
@ NODE_NETWORK
Definition: protocol.h:277
@ NODE_COMPACT_FILTERS
Definition: protocol.h:287

Definition at line 47 of file net.h.