X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9701b7ab4dc4cd709ad4dcaa750fc0021f15e231..a8c0ec7842337a96c32fa24919c2564b2b36f3fb:/include/stg/user_ips.h diff --git a/include/stg/user_ips.h b/include/stg/user_ips.h index 250520b2..8fada63b 100644 --- a/include/stg/user_ips.h +++ b/include/stg/user_ips.h @@ -41,7 +41,7 @@ #include #include -#include "common.h" +#include "stg/common.h" #include "os_int.h" using namespace std; @@ -134,6 +134,14 @@ return ips.size(); } //----------------------------------------------------------------------------- inline +uint32_t USER_IPS::CalcMask(unsigned int msk) const +{ +if (msk > 32) + return 0; +return htonl(0xFFffFFff << (32 - msk)); +} +//----------------------------------------------------------------------------- +inline bool USER_IPS::IsIPInIPS(uint32_t ip) const { if (ips.empty()) @@ -163,14 +171,6 @@ return false; } //----------------------------------------------------------------------------- inline -uint32_t USER_IPS::CalcMask(unsigned int msk) const -{ -if (msk > 32) - return 0; -return htonl(0xFFffFFff << (32 - msk)); -} -//----------------------------------------------------------------------------- -inline void USER_IPS::Add(const IP_MASK &im) { ips.push_back(im);