#include "addrdb.h"
#include "addrman.h"
#include "bloom.h"
#include "compat.h"
#include "crypto/siphash.h"
#include "fs.h"
#include "hash.h"
#include "limitedmap.h"
#include "netaddress.h"
#include "protocol.h"
#include "random.h"
#include "streams.h"
#include "sync.h"
#include "uint256.h"
#include "utilstrencodings.h"
#include "threadinterrupt.h"
#include "validation.h"
#include <atomic>
#include <cstdint>
#include <deque>
#include <thread>
#include <memory>
#include <condition_variable>
#include <arpa/inet.h>
Go to the source code of this file.
◆ DEFAULT_ALLOW_OPTIMISTIC_SEND
| #define DEFAULT_ALLOW_OPTIMISTIC_SEND false |
Definition at line 49 of file net.h.
◆ ENOUGH_CONNECTIONS
| #define ENOUGH_CONNECTIONS 2 |
Disconnected peers are added to setOffsetDisconnectedPeers only if node has less than ENOUGH_CONNECTIONS.
Definition at line 96 of file net.h.
◆ MAX_TIMEOFFSET_DISCONNECTIONS
| #define MAX_TIMEOFFSET_DISCONNECTIONS 16 |
Maximum number of peers added to setOffsetDisconnectedPeers before triggering a warning.
Definition at line 98 of file net.h.
◆ USE_WAKEUP_PIPE
Definition at line 50 of file net.h.
◆ mapMsgCmdSize
◆ NodeId
◆ anonymous enum
| Enumerator |
|---|
| LOCAL_NONE | |
| LOCAL_IF | |
| LOCAL_BIND | |
| LOCAL_MAPPED | |
| LOCAL_MANUAL | |
| LOCAL_MAX | |
Definition at line 534 of file net.h.
◆ AddLocal() [1/2]
◆ AddLocal() [2/2]
◆ AdvertiseLocal()
| void AdvertiseLocal |
( |
CNode * |
pnode | ) |
|
◆ BindListenPort()
| bool BindListenPort |
( |
const CService & |
bindAddr, |
|
|
std::string & |
strError, |
|
|
bool |
fWhitelisted = false |
|
) |
| |
◆ CheckOffsetDisconnectedPeers()
| void CheckOffsetDisconnectedPeers |
( |
const CNetAddr & |
ip | ) |
|
◆ Discover()
◆ GetListenPort()
| uint16_t GetListenPort |
( |
| ) |
|
◆ GetLocal()
◆ GetLocalAddress()
◆ IsLocal()
check whether a given address is potentially local
Definition at line 278 of file net.cpp.
◆ IsPeerAddrLocalGood()
| bool IsPeerAddrLocalGood |
( |
CNode * |
pnode | ) |
|
◆ IsReachable() [1/2]
| bool IsReachable |
( |
const CNetAddr & |
addr | ) |
|
- Returns
- true if the address is in a reachable network, false otherwise
Definition at line 259 of file net.cpp.
◆ IsReachable() [2/2]
| bool IsReachable |
( |
enum Network |
net | ) |
|
- Returns
- true if the network is reachable, false otherwise
Definition at line 253 of file net.cpp.
◆ PoissonNextSend() [1/2]
| int64_t PoissonNextSend |
( |
int64_t |
nNow, |
|
|
int |
average_interval_seconds |
|
) |
| |
Return a timestamp in the future (in microseconds) for exponentially distributed events.
Definition at line 2846 of file net.cpp.
◆ PoissonNextSend() [2/2]
| std::chrono::microseconds PoissonNextSend |
( |
std::chrono::microseconds |
now, |
|
|
std::chrono::seconds |
average_interval |
|
) |
| |
|
inline |
◆ RemoveLocal()
| bool RemoveLocal |
( |
const CService & |
addr | ) |
|
◆ SeenLocal()
vote for a local address
Definition at line 265 of file net.cpp.
◆ SetReachable()
| void SetReachable |
( |
enum Network |
net, |
|
|
bool |
reachable |
|
) |
| |
Mark a network as reachable or unreachable (no automatic connects to it)
- Note
- Networks are reachable by default
Definition at line 245 of file net.cpp.
◆ validateMasternodeIP()
| bool validateMasternodeIP |
( |
const std::string & |
addrStr | ) |
|
◆ cs_mapLocalHost
◆ fDiscover
◆ fListen
◆ g_connman
◆ mapAlreadyAskedFor
◆ mapLocalHost
◆ strSubVersion
| std::string strSubVersion |
|
extern |
Subversion as sent to the P2P network in version messages.
Definition at line 94 of file net.cpp.