diff options
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -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; |