Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
net.h File Reference
#include <addrdb.h>
#include <addrman.h>
#include <amount.h>
#include <bloom.h>
#include <compat.h>
#include <hash.h>
#include <limitedmap.h>
#include <netaddress.h>
#include <policy/feerate.h>
#include <protocol.h>
#include <random.h>
#include <streams.h>
#include <sync.h>
#include <uint256.h>
#include <threadinterrupt.h>
#include <atomic>
#include <deque>
#include <stdint.h>
#include <thread>
#include <memory>
#include <condition_variable>
#include <arpa/inet.h>
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  AddedNodeInfo
 
struct  CSerializedNetMsg
 
class  CConnman
 
struct  CConnman::Options
 
struct  CConnman::ListenSocket
 
struct  CombinerAll
 
class  NetEventsInterface
 Interface for message handling. More...
 
struct  LocalServiceInfo
 
class  CNodeStats
 
class  CNetMessage
 
class  CNode
 Information about a peer. More...
 

Typedefs

typedef int64_t NodeId
 
typedef std::map< std::string, uint64_t > mapMsgCmdSize
 

Enumerations

enum  {
  LOCAL_NONE, LOCAL_IF, LOCAL_BIND, LOCAL_UPNP,
  LOCAL_MANUAL, LOCAL_MAX
}
 

Functions

void Discover (boost::thread_group &threadGroup)
 
void MapPort (bool fUseUPnP)
 
unsigned short GetListenPort ()
 
bool BindListenPort (const CService &bindAddr, std::string &strError, bool fWhitelisted=false)
 
bool IsPeerAddrLocalGood (CNode *pnode)
 
void AdvertiseLocal (CNode *pnode)
 
void SetLimited (enum Network net, bool fLimited=true)
 Make a particular network entirely off-limits (no automatic connects to it) More...
 
bool IsLimited (enum Network net)
 
bool IsLimited (const CNetAddr &addr)
 
bool AddLocal (const CService &addr, int nScore=LOCAL_NONE)
 
bool AddLocal (const CNetAddr &addr, int nScore=LOCAL_NONE)
 
bool RemoveLocal (const CService &addr)
 
bool SeenLocal (const CService &addr)
 vote for a local address More...
 
bool IsLocal (const CService &addr)
 check whether a given address is potentially local More...
 
bool GetLocal (CService &addr, const CNetAddr *paddrPeer=nullptr)
 
bool IsReachable (enum Network net)
 check whether a given network is one we can probably connect to More...
 
bool IsReachable (const CNetAddr &addr)
 check whether a given address is in a network we can probably connect to More...
 
CAddress GetLocalAddress (const CNetAddr *paddrPeer, ServiceFlags nLocalServices)
 
int64_t PoissonNextSend (int64_t nNow, int average_interval_seconds)
 Return a timestamp in the future (in microseconds) for exponentially distributed events. More...
 

Variables

std::unique_ptr< CConnmang_connman
 
bool fDiscover
 
bool fListen
 
bool fRelayTxes
 
limitedmap< uint256, int64_t > mapAlreadyAskedFor
 
std::string strSubVersion
 Subversion as sent to the P2P network in version messages. More...
 
CCriticalSection cs_mapLocalHost
 
std::map< CNetAddr, LocalServiceInfomapLocalHost
 

Typedef Documentation

typedef std::map<std::string, uint64_t> mapMsgCmdSize

Definition at line 517 of file net.h.

typedef int64_t NodeId

Definition at line 93 of file net.h.

Enumeration Type Documentation

anonymous enum
Enumerator
LOCAL_NONE 
LOCAL_IF 
LOCAL_BIND 
LOCAL_UPNP 
LOCAL_MANUAL 
LOCAL_MAX 

Definition at line 474 of file net.h.

Function Documentation

bool AddLocal ( const CService addr,
int  nScore = LOCAL_NONE 
)

Definition at line 205 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool AddLocal ( const CNetAddr addr,
int  nScore = LOCAL_NONE 
)

Definition at line 231 of file net.cpp.

Here is the call graph for this function:

void AdvertiseLocal ( CNode pnode)

Definition at line 182 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BindListenPort ( const CService bindAddr,
std::string &  strError,
bool  fWhitelisted = false 
)

Here is the caller graph for this function:

void Discover ( boost::thread_group &  threadGroup)

Definition at line 2160 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned short GetListenPort ( )

Definition at line 98 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool GetLocal ( CService addr,
const CNetAddr paddrPeer = nullptr 
)

Definition at line 104 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAddress GetLocalAddress ( const CNetAddr paddrPeer,
ServiceFlags  nLocalServices 
)

Definition at line 153 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool IsLimited ( enum Network  net)

Definition at line 253 of file net.cpp.

Here is the caller graph for this function:

bool IsLimited ( const CNetAddr addr)

Definition at line 259 of file net.cpp.

Here is the call graph for this function:

bool IsLocal ( const CService addr)

check whether a given address is potentially local

Definition at line 278 of file net.cpp.

Here is the caller graph for this function:

bool IsPeerAddrLocalGood ( CNode pnode)

Definition at line 174 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool IsReachable ( enum Network  net)

check whether a given network is one we can probably connect to

Definition at line 285 of file net.cpp.

Here is the caller graph for this function:

bool IsReachable ( const CNetAddr addr)

check whether a given address is in a network we can probably connect to

Definition at line 292 of file net.cpp.

Here is the call graph for this function:

void MapPort ( bool  fUseUPnP)

Definition at line 1544 of file net.cpp.

Here is the caller graph for this function:

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 2883 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool RemoveLocal ( const CService addr)

Definition at line 236 of file net.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SeenLocal ( const CService addr)

vote for a local address

Definition at line 265 of file net.cpp.

Here is the caller graph for this function:

void SetLimited ( enum Network  net,
bool  fLimited = true 
)

Make a particular network entirely off-limits (no automatic connects to it)

Definition at line 245 of file net.cpp.

Here is the caller graph for this function:

Variable Documentation

CCriticalSection cs_mapLocalHost

Definition at line 85 of file net.cpp.

bool fDiscover

Definition at line 82 of file net.cpp.

bool fListen

Definition at line 83 of file net.cpp.

bool fRelayTxes

Definition at line 84 of file net.cpp.

std::unique_ptr<CConnman> g_connman

Definition at line 75 of file init.cpp.

limitedmap<uint256, int64_t> mapAlreadyAskedFor
std::map<CNetAddr, LocalServiceInfo> mapLocalHost

Definition at line 86 of file net.cpp.

std::string strSubVersion

Subversion as sent to the P2P network in version messages.

Definition at line 88 of file net.cpp.