Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 474 Lines • ▼ Show 20 Lines | enum { | ||||
// address explicitly specified (-externalip=) | // address explicitly specified (-externalip=) | ||||
LOCAL_MANUAL, | LOCAL_MANUAL, | ||||
LOCAL_MAX | LOCAL_MAX | ||||
}; | }; | ||||
bool IsPeerAddrLocalGood(CNode *pnode); | bool IsPeerAddrLocalGood(CNode *pnode); | ||||
void AdvertiseLocal(CNode *pnode); | void AdvertiseLocal(CNode *pnode); | ||||
void SetLimited(enum Network net, bool fLimited = true); | |||||
bool IsLimited(enum Network net); | /** | ||||
bool IsLimited(const CNetAddr &addr); | * Mark a network as reachable or unreachable (no automatic connects to it) | ||||
* @note Networks are reachable by default | |||||
*/ | |||||
void SetReachable(enum Network net, bool reachable); | |||||
/** @returns true if the network is reachable, false otherwise */ | |||||
bool IsReachable(enum Network net); | |||||
/** @returns true if the address is in a reachable network, false otherwise */ | |||||
bool IsReachable(const CNetAddr &addr); | |||||
bool AddLocal(const CService &addr, int nScore = LOCAL_NONE); | bool AddLocal(const CService &addr, int nScore = LOCAL_NONE); | ||||
bool AddLocal(const CNetAddr &addr, int nScore = LOCAL_NONE); | bool AddLocal(const CNetAddr &addr, int nScore = LOCAL_NONE); | ||||
void RemoveLocal(const CService &addr); | void RemoveLocal(const CService &addr); | ||||
bool SeenLocal(const CService &addr); | bool SeenLocal(const CService &addr); | ||||
bool IsLocal(const CService &addr); | bool IsLocal(const CService &addr); | ||||
bool GetLocal(CService &addr, const CNetAddr *paddrPeer = nullptr); | bool GetLocal(CService &addr, const CNetAddr *paddrPeer = nullptr); | ||||
bool IsReachable(enum Network net); | |||||
bool IsReachable(const CNetAddr &addr); | |||||
CAddress GetLocalAddress(const CNetAddr *paddrPeer, | CAddress GetLocalAddress(const CNetAddr *paddrPeer, | ||||
ServiceFlags nLocalServices); | ServiceFlags nLocalServices); | ||||
extern bool fDiscover; | extern bool fDiscover; | ||||
extern bool fListen; | extern bool fListen; | ||||
extern bool fRelayTxes; | extern bool fRelayTxes; | ||||
extern limitedmap<uint256, int64_t> mapAlreadyAskedFor; | extern limitedmap<uint256, int64_t> mapAlreadyAskedFor; | ||||
▲ Show 20 Lines • Show All 351 Lines • Show Last 20 Lines |