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

◆ ALL_NET_PERMISSION_FLAGS

constexpr NetPermissionFlags ALL_NET_PERMISSION_FLAGS[]
constexpr

◆ ALL_NETWORKS

constexpr auto ALL_NETWORKS
constexpr

◆ ALL_SERVICE_FLAGS

constexpr ServiceFlags ALL_SERVICE_FLAGS[]
constexpr
Initial value:

Definition at line 41 of file net.h.

NET_UNROUTABLE
@ NET_UNROUTABLE
Addresses from these networks are not publicly routable on the global Internet.
Definition: netaddress.h:47
NetPermissionFlags::None
@ None
NET_IPV4
@ NET_IPV4
IPv4.
Definition: netaddress.h:50
NET_INTERNAL
@ NET_INTERNAL
A set of addresses that represent the hash of a string or FQDN.
Definition: netaddress.h:66
NetPermissionFlags::NoBan
@ NoBan
ConnectionType::OUTBOUND_FULL_RELAY
@ OUTBOUND_FULL_RELAY
These are the default connections that we use to connect with the network.
NODE_NETWORK_LIMITED
@ NODE_NETWORK_LIMITED
Definition: protocol.h:291
NODE_NETWORK
@ NODE_NETWORK
Definition: protocol.h:277
NODE_COMPACT_FILTERS
@ NODE_COMPACT_FILTERS
Definition: protocol.h:287
ConnectionType::MANUAL
@ MANUAL
We open manual connections to addresses that users explicitly requested via the addnode RPC or the -a...
NetPermissionFlags::BloomFilter
@ BloomFilter
ConnectionType::INBOUND
@ INBOUND
Inbound connections are those initiated by a peer.
NET_I2P
@ NET_I2P
I2P.
Definition: netaddress.h:59
NetPermissionFlags::Download
@ Download
NODE_BLOOM
@ NODE_BLOOM
Definition: protocol.h:281
NetPermissionFlags::ForceRelay
@ ForceRelay
ConnectionType::FEELER
@ FEELER
Feeler connections are short-lived connections made to check that a node is alive.
NetPermissionFlags::Relay
@ Relay
NetPermissionFlags::All
@ All
NODE_NONE
@ NODE_NONE
Definition: protocol.h:274
NODE_WITNESS
@ NODE_WITNESS
Definition: protocol.h:284
NetPermissionFlags::Addr
@ Addr
NetPermissionFlags::Implicit
@ Implicit
ConnectionType::ADDR_FETCH
@ ADDR_FETCH
AddrFetch connections are short lived connections used to solicit addresses from peers.
NET_ONION
@ NET_ONION
TOR (v2 or v3)
Definition: netaddress.h:56
NET_IPV6
@ NET_IPV6
IPv6.
Definition: netaddress.h:53
ConnectionType::BLOCK_RELAY
@ BLOCK_RELAY
We use block-relay-only connections to help prevent against partition attacks.
NET_CJDNS
@ NET_CJDNS
CJDNS.
Definition: netaddress.h:62
NetPermissionFlags::Mempool
@ Mempool