mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 15:39:05 +01:00
Support for multiple local addresses
This commit is contained in:
17
src/net.h
17
src/net.h
@@ -42,6 +42,21 @@ bool BindListenPort(std::string& strError=REF(std::string()));
|
||||
void StartNode(void* parg);
|
||||
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,
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user