Bitcoin Core 31.99.0
P2P Digital Currency
Functions | Variables
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 <common/args.h>
#include <core_io.h>
#include <hash.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/asmap.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 RPCMethod getconnectioncount ()
 
static RPCMethod ping ()
 
static UniValue GetServicesNames (ServiceFlags services)
 Returns, given services flags, a list of humanly readable (known) network services. More...
 
static RPCMethod getpeerinfo ()
 
static RPCMethod addnode ()
 
static RPCMethod addconnection ()
 
static RPCMethod disconnectnode ()
 
static RPCMethod getaddednodeinfo ()
 
static RPCMethod getnettotals ()
 
static UniValue GetNetworksInfo ()
 
static RPCMethod getnetworkinfo ()
 
static RPCMethod setban ()
 
static RPCMethod listbanned ()
 
static RPCMethod clearbanned ()
 
static RPCMethod setnetworkactive ()
 
static RPCMethod getnodeaddresses ()
 
static RPCMethod addpeeraddress ()
 
static RPCMethod sendmsgtopeer ()
 
static RPCMethod getaddrmaninfo ()
 
static RPCMethod exportasmap ()
 
UniValue AddrmanEntryToJSON (const AddrInfo &info, const CConnman &connman)
 
UniValue AddrmanTableToJSON (const std::vector< std::pair< AddrInfo, AddressPosition > > &tableInfos, const CConnman &connman)
 
static RPCMethod getrawaddrman ()
 
void RegisterNetRPCCommands (CRPCTable &t)
 

Variables

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

Function Documentation

◆ addconnection()

static RPCMethod addconnection ( )
static

Definition at line 383 of file net.cpp.

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

◆ addnode()

static RPCMethod addnode ( )
static

Definition at line 319 of file net.cpp.

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

◆ addpeeraddress()

static RPCMethod addpeeraddress ( )
static

Definition at line 978 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 1178 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 1199 of file net.cpp.

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

◆ clearbanned()

static RPCMethod clearbanned ( )
static

Definition at line 873 of file net.cpp.

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

◆ disconnectnode()

static RPCMethod disconnectnode ( )
static

Definition at line 446 of file net.cpp.

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

◆ exportasmap()

static RPCMethod exportasmap ( )
static

Definition at line 1125 of file net.cpp.

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

◆ getaddednodeinfo()

static RPCMethod getaddednodeinfo ( )
static

Definition at line 492 of file net.cpp.

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

◆ getaddrmaninfo()

static RPCMethod getaddrmaninfo ( )
static

Definition at line 1086 of file net.cpp.

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

◆ getconnectioncount()

static RPCMethod getconnectioncount ( )
static

Definition at line 67 of file net.cpp.

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

◆ getnettotals()

static RPCMethod getnettotals ( )
static

Definition at line 566 of file net.cpp.

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

◆ getnetworkinfo()

static RPCMethod getnetworkinfo ( )
static

Definition at line 638 of file net.cpp.

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

◆ GetNetworksInfo()

static UniValue GetNetworksInfo ( )
static

Definition at line 616 of file net.cpp.

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

◆ getnodeaddresses()

static RPCMethod getnodeaddresses ( )
static

Definition at line 917 of file net.cpp.

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

◆ getpeerinfo()

static RPCMethod getpeerinfo ( )
static

Definition at line 127 of file net.cpp.

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

◆ getrawaddrman()

static RPCMethod getrawaddrman ( )
static

Definition at line 1215 of file net.cpp.

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

◆ GetServicesNames()

static UniValue GetServicesNames ( ServiceFlags  services)
static

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

Definition at line 116 of file net.cpp.

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

◆ listbanned()

static RPCMethod listbanned ( )
static

Definition at line 825 of file net.cpp.

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

◆ ping()

static RPCMethod ping ( )
static

Definition at line 90 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 1255 of file net.cpp.

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

◆ sendmsgtopeer()

static RPCMethod sendmsgtopeer ( )
static

Definition at line 1038 of file net.cpp.

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

◆ setban()

static RPCMethod setban ( )
static

Definition at line 745 of file net.cpp.

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

◆ setnetworkactive()

static RPCMethod setnetworkactive ( )
static

Definition at line 895 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 51 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 61 of file net.cpp.