diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-02-12 13:45:24 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-05-04 16:12:23 +0200 |
commit | 39857190dee3ed296112cfcfd79b0a375143b6c6 (patch) | |
tree | c78b110e9731a9b495074e3889b5767ab8d40e8b /src/net.h | |
parent | 478b01d9a797f3ea41cca141992b161867a5996d (diff) |
Support for multiple local addresses
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -44,6 +44,21 @@ bool StopNode(); enum { + LOCAL_NONE, + LOCAL_IF, + LOCAL_UPNP, + LOCAL_IRC, + LOCAL_HTTP, +}; + +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); +CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL); + +enum +{ MSG_TX = 1, MSG_BLOCK, }; @@ -85,7 +100,6 @@ enum threadId extern bool fClient; extern uint64 nLocalServices; -extern CAddress addrLocalHost; extern uint64 nLocalHostNonce; extern boost::array<int, THREAD_MAX> vnThreadsRunning; extern CAddrMan addrman; @@ -121,6 +135,7 @@ public: unsigned int nMessageStart; CAddress addr; std::string addrName; + CNetAddr addrLocal; int nVersion; std::string strSubVer; bool fOneShot; |