blob: 70751562a57ec80de13b769c96e34fed40a23755 [file] [log] [blame]
#ifndef IP_PARSER_PARSER_IP_NET
#define IP_PARSER_PARSER_IP_NET
#include <sstream>
#include <utility>
#include "./IP.h"
#include "./IPMask.h"
namespace casbin {
class IPNet {
public:
IP net_ip;
IPMask mask;
std::string NETIP_toString();
std::string IPMask_toString();
// Contains reports whether the network includes ip.
bool contains(IP ipNew);
static std::pair<IP, IPMask> networkNumberAndMask(IPNet n);
};
} // namespace casbin
#endif