X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9701b7ab4dc4cd709ad4dcaa750fc0021f15e231..91b29aeb2d378351856292d540a3539c31df3b59:/include/stg/user_ips.h?ds=sidebyside 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);