Bitcoin Core  27.99.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

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 115 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 112 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:46
@ NET_CJDNS
CJDNS.
Definition: netaddress.h:49
@ NET_ONION
TOR (v2 or v3)
Definition: netaddress.h:43
@ NET_IPV6
IPv6.
Definition: netaddress.h:40
@ NET_IPV4
IPv4.
Definition: netaddress.h:37
@ NET_UNROUTABLE
Addresses from these networks are not publicly routable on the global Internet.
Definition: netaddress.h:34
@ NET_INTERNAL
A set of addresses that represent the hash of a string or FQDN.
Definition: netaddress.h:53

Definition at line 121 of file net.h.

◆ ALL_SERVICE_FLAGS

constexpr ServiceFlags ALL_SERVICE_FLAGS[]
constexpr
Initial value:
{
}
@ NODE_NONE
Definition: protocol.h:277
@ NODE_P2P_V2
Definition: protocol.h:295
@ 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 89 of file net.h.