mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-30 11:44:29 +03:00
sync code
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <vector>
|
||||
|
||||
namespace Waap {
|
||||
namespace Util {
|
||||
@@ -29,11 +30,14 @@ struct CIDRData {
|
||||
uint8_t networkBits;
|
||||
bool isIPV6;
|
||||
bool operator==(const CIDRData &other) const;
|
||||
bool operator<(const CIDRData &other) const;
|
||||
};
|
||||
|
||||
bool isCIDR(const std::string& strCIDR, CIDRData& cidr);
|
||||
bool cidrMatch(const std::string& sourceip, const CIDRData& cidr);
|
||||
bool cidrMatch(const std::string &sourceip, const std::string &target);
|
||||
bool doesFirstCidrContainSecond(const CIDRData &first, const CIDRData &second);
|
||||
std::string cidrsToString(const std::vector<CIDRData>& cidrs);
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user