Bitcoin Core  25.99.0
P2P Digital Currency
Classes | Functions | Variables
net.h File Reference
#include <compat/compat.h>
#include <node/eviction.h>
#include <netaddress.h>
#include <net.h>
#include <util/sock.h>
#include <array>
#include <cassert>
#include <cstring>
#include <memory>
#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 84 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 79 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:58
@ NET_CJDNS
CJDNS.
Definition: netaddress.h:61
@ NET_ONION
TOR (v2 or v3)
Definition: netaddress.h:55
@ NET_IPV6
IPv6.
Definition: netaddress.h:52
@ NET_IPV4
IPv4.
Definition: netaddress.h:49
@ NET_UNROUTABLE
Addresses from these networks are not publicly routable on the global Internet.
Definition: netaddress.h:46
@ NET_INTERNAL
A set of addresses that represent the hash of a string or FQDN.
Definition: netaddress.h:65

Definition at line 88 of file net.h.

◆ ALL_SERVICE_FLAGS

constexpr ServiceFlags ALL_SERVICE_FLAGS[]
constexpr
Initial value:
{
}
@ NODE_NONE
Definition: protocol.h:277
@ NODE_WITNESS
Definition: protocol.h:285
@ NODE_NETWORK_LIMITED
Definition: protocol.h:292
@ NODE_BLOOM
Definition: protocol.h:282
@ NODE_NETWORK
Definition: protocol.h:280
@ NODE_COMPACT_FILTERS
Definition: protocol.h:288

Definition at line 57 of file net.h.