Added IPAddressList capability and whitelist/blacklist capability.

This commit is contained in:
barant committed 2019-07-27 17:23:23 -07:00
1 parent 2b9749c4b2
commit 5e5e626d28
9 files changed
+111 -24

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include "IPAddressList.h"
namespace core {
IPAddressList::IPAddressList() {}
std::map<std::string, IPAddress> IPAddressList::getList() {
return list;
}
bool IPAddressList::add(IPAddress ipAddress) {
list.insert(std::make_pair(ipAddress.getClientAddress(), ipAddress));
}
bool IPAddressList::remove(IPAddress ipAddress) {
}
bool IPAddressList::contains(std::string ipAddress) {
return list.find(ipAddress) != list.end();
}
}