aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-11 18:23:56 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-11 18:23:56 -0700
commita3878873f3317d3d3ee0eee4b030490ad39b3f81 (patch)
tree8394e60e49a987e7b0ae8a78988fd109a55e77e0 /src/net.h
parentc05271901a7aafdd433da14d3d1c290419a28a77 (diff)
parent8f10a2889089af1b2ac64802360494b54c8c7ff1 (diff)
Merge pull request #1021 from sipa/ipv6
IPv6 node support
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/net.h b/src/net.h
index 3521a81388..8fe8c0047d 100644
--- a/src/net.h
+++ b/src/net.h
@@ -38,28 +38,34 @@ CNode* FindNode(const CNetAddr& ip);
CNode* FindNode(const CService& ip);
CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL, int64 nTimeout=0);
void MapPort(bool fMapPort);
-bool BindListenPort(std::string& strError=REF(std::string()));
+bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
void StartNode(void* parg);
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_BIND, // address explicit bound to
+ 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
};
-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);
+void SetLimited(enum Network net, bool fLimited = true);
+bool IsLimited(const CNetAddr& addr);
+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);
+
enum
{
MSG_TX = 1,
@@ -139,7 +145,7 @@ public:
unsigned int nMessageStart;
CAddress addr;
std::string addrName;
- CNetAddr addrLocal;
+ CService addrLocal;
int nVersion;
std::string strSubVer;
bool fOneShot;