|
|
@ -307,12 +307,18 @@ bool IsLocal(const CService& addr)
|
|
|
|
return mapLocalHost.count(addr) > 0;
|
|
|
|
return mapLocalHost.count(addr) > 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** check whether a given network is one we can probably connect to */
|
|
|
|
|
|
|
|
bool IsReachable(enum Network net)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LOCK(cs_mapLocalHost);
|
|
|
|
|
|
|
|
return vfReachable[net] && !vfLimited[net];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** check whether a given address is in a network we can probably connect to */
|
|
|
|
/** check whether a given address is in a network we can probably connect to */
|
|
|
|
bool IsReachable(const CNetAddr& addr)
|
|
|
|
bool IsReachable(const CNetAddr& addr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LOCK(cs_mapLocalHost);
|
|
|
|
|
|
|
|
enum Network net = addr.GetNetwork();
|
|
|
|
enum Network net = addr.GetNetwork();
|
|
|
|
return vfReachable[net] && !vfLimited[net];
|
|
|
|
return IsReachable(net);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const char* pszKeyword, CNetAddr& ipRet)
|
|
|
|
bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const char* pszKeyword, CNetAddr& ipRet)
|
|
|
|