Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
net.cpp File Reference
#include <rpc/server.h>
#include <addrman.h>
#include <addrman_impl.h>
#include <banman.h>
#include <chainparams.h>
#include <clientversion.h>
#include <core_io.h>
#include <net_permissions.h>
#include <net_processing.h>
#include <net_types.h>
#include <netbase.h>
#include <node/context.h>
#include <node/protocol_version.h>
#include <node/warnings.h>
#include <policy/settings.h>
#include <protocol.h>
#include <rpc/blockchain.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <sync.h>
#include <univalue.h>
#include <util/chaintype.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/time.h>
#include <util/translation.h>
#include <validation.h>
#include <chrono>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for net.cpp:

Go to the source code of this file.

Functions

static RPCHelpMan getconnectioncount ()
static RPCHelpMan ping ()
static UniValue GetServicesNames (ServiceFlags services)
 Returns, given services flags, a list of humanly readable (known) network services.
static RPCHelpMan getpeerinfo ()
static RPCHelpMan addnode ()
static RPCHelpMan addconnection ()
static RPCHelpMan disconnectnode ()
static RPCHelpMan getaddednodeinfo ()
static RPCHelpMan getnettotals ()
static UniValue GetNetworksInfo ()
static RPCHelpMan getnetworkinfo ()
static RPCHelpMan setban ()
static RPCHelpMan listbanned ()
static RPCHelpMan clearbanned ()
static RPCHelpMan setnetworkactive ()
static RPCHelpMan getnodeaddresses ()
static RPCHelpMan addpeeraddress ()
static RPCHelpMan sendmsgtopeer ()
static RPCHelpMan getaddrmaninfo ()
UniValue AddrmanEntryToJSON (const AddrInfo &info, const CConnman &connman)
UniValue AddrmanTableToJSON (const std::vector< std::pair< AddrInfo, AddressPosition > > &tableInfos, const CConnman &connman)
static RPCHelpMan getrawaddrman ()
void RegisterNetRPCCommands (CRPCTable &t)
template<typename C, typename S, typename UnaryOp>
auto Join (const C &container, const S &separator, UnaryOp unary_op)
 Join all container items.

Variables

const std::vector< std::string > CONNECTION_TYPE_DOC
const std::vector< std::string > TRANSPORT_TYPE_DOC

Function Documentation

◆ addconnection()

RPCHelpMan addconnection ( )
static

Definition at line 381 of file net.cpp.

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

◆ addnode()

RPCHelpMan addnode ( )
static

Definition at line 317 of file net.cpp.

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

◆ addpeeraddress()

RPCHelpMan addpeeraddress ( )
static

Definition at line 973 of file net.cpp.

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

◆ AddrmanEntryToJSON()

UniValue AddrmanEntryToJSON ( const AddrInfo & info,
const CConnman & connman )

Definition at line 1120 of file net.cpp.

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

◆ AddrmanTableToJSON()

UniValue AddrmanTableToJSON ( const std::vector< std::pair< AddrInfo, AddressPosition > > & tableInfos,
const CConnman & connman )

Definition at line 1141 of file net.cpp.

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

◆ clearbanned()

RPCHelpMan clearbanned ( )
static

Definition at line 868 of file net.cpp.

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

◆ disconnectnode()

RPCHelpMan disconnectnode ( )
static

Definition at line 444 of file net.cpp.

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

◆ getaddednodeinfo()

RPCHelpMan getaddednodeinfo ( )
static

Definition at line 490 of file net.cpp.

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

◆ getaddrmaninfo()

RPCHelpMan getaddrmaninfo ( )
static

Definition at line 1081 of file net.cpp.

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

◆ getconnectioncount()

RPCHelpMan getconnectioncount ( )
static

Definition at line 61 of file net.cpp.

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

◆ getnettotals()

RPCHelpMan getnettotals ( )
static

Definition at line 564 of file net.cpp.

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

◆ getnetworkinfo()

RPCHelpMan getnetworkinfo ( )
static

Definition at line 633 of file net.cpp.

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

◆ GetNetworksInfo()

UniValue GetNetworksInfo ( )
static

Definition at line 614 of file net.cpp.

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

◆ getnodeaddresses()

RPCHelpMan getnodeaddresses ( )
static

Definition at line 912 of file net.cpp.

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

◆ getpeerinfo()

RPCHelpMan getpeerinfo ( )
static

Definition at line 121 of file net.cpp.

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

◆ getrawaddrman()

RPCHelpMan getrawaddrman ( )
static

Definition at line 1157 of file net.cpp.

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

◆ GetServicesNames()

UniValue GetServicesNames ( ServiceFlags services)
static

Returns, given services flags, a list of humanly readable (known) network services.

Definition at line 110 of file net.cpp.

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

◆ Join()

template<typename C, typename S, typename UnaryOp>
auto util::Join ( const C & container,
const S & separator,
UnaryOp unary_op )

Join all container items.

Typically used to concatenate strings but accepts containers with elements of any type.

Parameters
containerThe items to join
separatorThe separator
unary_opApply this operator to each item

Definition at line 205 of file string.h.

Here is the caller graph for this function:

◆ listbanned()

RPCHelpMan listbanned ( )
static

Definition at line 820 of file net.cpp.

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

◆ ping()

RPCHelpMan ping ( )
static

Definition at line 84 of file net.cpp.

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

◆ RegisterNetRPCCommands()

void RegisterNetRPCCommands ( CRPCTable & t)

Definition at line 1197 of file net.cpp.

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

◆ sendmsgtopeer()

RPCHelpMan sendmsgtopeer ( )
static

Definition at line 1033 of file net.cpp.

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

◆ setban()

RPCHelpMan setban ( )
static

Definition at line 740 of file net.cpp.

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

◆ setnetworkactive()

RPCHelpMan setnetworkactive ( )
static

Definition at line 890 of file net.cpp.

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

Variable Documentation

◆ CONNECTION_TYPE_DOC

const std::vector<std::string> CONNECTION_TYPE_DOC
Initial value:
{
"outbound-full-relay (default automatic connections)",
"block-relay-only (does not relay transactions or addresses)",
"inbound (initiated by the peer)",
"manual (added via addnode RPC or -addnode/-connect configuration options)",
"addr-fetch (short-lived automatic connection for soliciting addresses)",
"feeler (short-lived automatic connection for testing addresses)",
"private-broadcast (short-lived automatic connection for broadcasting privacy-sensitive transactions)"
}

Definition at line 45 of file net.cpp.

◆ TRANSPORT_TYPE_DOC

const std::vector<std::string> TRANSPORT_TYPE_DOC
Initial value:
{
"detecting (peer could be v1 or v2)",
"v1 (plaintext transport protocol)",
"v2 (BIP324 encrypted transport protocol)"
}

Definition at line 55 of file net.cpp.