aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-02-12 13:45:24 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-04 16:12:23 +0200
commit39857190dee3ed296112cfcfd79b0a375143b6c6 (patch)
treec78b110e9731a9b495074e3889b5767ab8d40e8b /src/net.h
parent478b01d9a797f3ea41cca141992b161867a5996d (diff)
downloadbitcoin-39857190dee3ed296112cfcfd79b0a375143b6c6.tar.xz
Support for multiple local addresses
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index d48512a5dc..239971e2ca 100644
--- a/src/net.h
+++ b/src/net.h
@@ -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;