aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-04-17 18:34:32 -0400
committerCory Fields <cory-nospam-@coryfields.com>2016-09-08 12:24:06 -0400
commit6c19d92361fe4afb26dfa5d48a0748b84bca6f12 (patch)
tree30bcc560bc99a3f7ad0e258c5945810d5a8f419c /src/net.h
parent53347f0cb99e514815e44a56439a4a10012238f8 (diff)
net: move whitelist functions into CConnman
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net.h b/src/net.h
index 5b1e80bfbe..8d9925265d 100644
--- a/src/net.h
+++ b/src/net.h
@@ -169,6 +169,7 @@ public:
bool DisconnectNode(NodeId id);
bool DisconnectSubnet(const CSubNet& subnet);
+ void AddWhitelistedRange(const CSubNet &subnet);
private:
struct ListenSocket {
SOCKET socket;
@@ -192,6 +193,8 @@ private:
bool AttemptToEvictConnection();
CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure);
+ bool IsWhitelistedRange(const CNetAddr &addr);
+
void DeleteNode(CNode* pnode);
//!check is the banlist has unwritten changes
bool BannedSetIsDirty();
@@ -203,6 +206,11 @@ private:
void DumpData();
void DumpBanlist();
+ // Whitelisted ranges. Any node connecting from these is automatically
+ // whitelisted (as well as those connecting to whitelisted binds).
+ std::vector<CSubNet> vWhitelistedRange;
+ CCriticalSection cs_vWhitelistedRange;
+
std::vector<ListenSocket> vhListenSocket;
banmap_t setBanned;
CCriticalSection cs_setBanned;
@@ -432,11 +440,6 @@ public:
const uint64_t nKeyedNetGroup;
protected:
- // Whitelisted ranges. Any node connecting from these is automatically
- // whitelisted (as well as those connecting to whitelisted binds).
- static std::vector<CSubNet> vWhitelistedRange;
- static CCriticalSection cs_vWhitelistedRange;
-
mapMsgCmdSize mapSendBytesPerMsgCmd;
mapMsgCmdSize mapRecvBytesPerMsgCmd;
@@ -803,9 +806,6 @@ public:
void copyStats(CNodeStats &stats);
- static bool IsWhitelistedRange(const CNetAddr &ip);
- static void AddWhitelistedRange(const CSubNet &subnet);
-
// Network stats
static void RecordBytesRecv(uint64_t bytes);
static void RecordBytesSent(uint64_t bytes);