#include "net.h"
#include "chainparams.h"
#include "clientversion.h"
#include "crypto/common.h"
#include "crypto/sha256.h"
#include "guiinterface.h"
#include "netaddress.h"
#include "netbase.h"
#include "netmessagemaker.h"
#include "optional.h"
#include "primitives/transaction.h"
#include "scheduler.h"
#include "tiertwo/net_masternodes.h"
#include <fcntl.h>
#include <cstdint>
#include <unordered_map>
#include <math.h>
Go to the source code of this file.
◆ DUMP_ADDRESSES_INTERVAL
| #define DUMP_ADDRESSES_INTERVAL 900 |
◆ FEELER_SLEEP_WINDOW
| #define FEELER_SLEEP_WINDOW 1 |
◆ BindFlags
Used to pass flags to the Bind() function.
- Todo:
- : Can be removed when our pull-tester is upgraded to a modern MinGW version.
| Enumerator |
|---|
| BF_NONE | |
| BF_EXPLICIT | |
| BF_REPORT_ERROR | |
| BF_WHITELIST | |
Definition at line 68 of file net.cpp.
◆ AddLocal() [1/2]
| bool AddLocal |
( |
const CNetAddr & |
addr, |
|
|
int |
nScore |
|
) |
| |
◆ AddLocal() [2/2]
| bool AddLocal |
( |
const CService & |
addr, |
|
|
int |
nScore |
|
) |
| |
◆ AdvertiseLocal()
| void AdvertiseLocal |
( |
CNode * |
pnode | ) |
|
◆ CheckOffsetDisconnectedPeers()
| void CheckOffsetDisconnectedPeers |
( |
const CNetAddr & |
ip | ) |
|
◆ Discover()
◆ GetListenPort()
| uint16_t GetListenPort |
( |
| ) |
|
◆ GetLocal()
◆ GetLocalAddress()
◆ GetnScore()
◆ 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()
| 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.
◆ 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
◆ instance_of_cnetcleanup
◆ mapAlreadyAskedFor
| limitedmap<CInv, int64_t> mapAlreadyAskedFor(MAX_INV_SZ) |
( |
MAX_INV_SZ |
| ) |
|
◆ mapLocalHost
◆ strSubVersion
| std::string strSubVersion |
Subversion as sent to the P2P network in version messages.
Definition at line 94 of file net.cpp.