mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Keep port information for local addresses
This commit is contained in:
23
src/net.h
23
src/net.h
@@ -44,22 +44,23 @@ bool StopNode();
|
||||
|
||||
enum
|
||||
{
|
||||
LOCAL_NONE,
|
||||
LOCAL_IF,
|
||||
LOCAL_UPNP,
|
||||
LOCAL_IRC,
|
||||
LOCAL_HTTP,
|
||||
LOCAL_MANUAL,
|
||||
LOCAL_NONE, // unknown
|
||||
LOCAL_IF, // address a local interface listens on
|
||||
LOCAL_UPNP, // address reported by UPnP
|
||||
LOCAL_IRC, // address reported by IRC (deprecated)
|
||||
LOCAL_HTTP, // address reported by whatismyip.com and similars
|
||||
LOCAL_MANUAL, // address explicitly specified (-externalip=)
|
||||
|
||||
LOCAL_MAX
|
||||
};
|
||||
|
||||
void SetLimited(enum Network net, bool fLimited = true);
|
||||
bool IsLimited(const CNetAddr& addr);
|
||||
bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE);
|
||||
bool SeenLocal(const CNetAddr& addr);
|
||||
bool IsLocal(const CNetAddr& addr);
|
||||
bool GetLocal(CNetAddr &addr, const CNetAddr *paddrPeer = NULL);
|
||||
bool AddLocal(const CService& addr, int nScore = LOCAL_NONE);
|
||||
bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE, int port = -1);
|
||||
bool SeenLocal(const CService& addr);
|
||||
bool IsLocal(const CService& addr);
|
||||
bool GetLocal(CService &addr, const CNetAddr *paddrPeer = NULL);
|
||||
bool IsReachable(const CNetAddr &addr);
|
||||
CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL);
|
||||
|
||||
@@ -142,7 +143,7 @@ public:
|
||||
unsigned int nMessageStart;
|
||||
CAddress addr;
|
||||
std::string addrName;
|
||||
CNetAddr addrLocal;
|
||||
CService addrLocal;
|
||||
int nVersion;
|
||||
std::string strSubVer;
|
||||
bool fOneShot;
|
||||
|
||||
Reference in New Issue
Block a user