1 #ifndef _ipaddressacl_
\r
2 #define _ipaddressacl_
\r
4 #include <Poco/Net/IPAddress.h>
\r
13 const bool IsAllowed(const Poco::Net::IPAddress &addr);
\r
14 const bool IsAllowed(const std::string &addrstr);
\r
16 const bool Add(const std::string &aclentry);
\r
18 void SetAllowByDefault(const bool allowbydefault) { m_allowbydefault=allowbydefault; }
\r
19 const bool GetAllowByDefault() const { return m_allowbydefault; }
\r
22 const std::string CreateMask(const int maskbits);
\r
24 // Poco 1.3.0 + has Poco::Net::IPAddress::mask - but 1.2.9 does not
\r
25 Poco::Net::IPAddress MaskAddress(const Poco::Net::IPAddress &addr, const Poco::Net::IPAddress &mask);
\r
29 entry(const bool allow, const Poco::Net::IPAddress &mask, const Poco::Net::IPAddress &addr):m_allow(allow),m_mask(mask),m_addr(addr) {}
\r
31 Poco::Net::IPAddress m_mask;
\r
32 Poco::Net::IPAddress m_addr;
\r
35 bool m_allowbydefault; // allow or deny hosts if not explicitly defined
\r
37 std::vector<entry> m_entries;
\r