X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a536658cf9e66cd5b19c428aa40bcdabf8b5ecd2..afcbfd1a09e22ff4839ba5db42047c96f355506c:/projects/stargazer/traffcounter_impl.h diff --git a/projects/stargazer/traffcounter_impl.h b/projects/stargazer/traffcounter_impl.h index 7e552f82..a1dfa743 100644 --- a/projects/stargazer/traffcounter_impl.h +++ b/projects/stargazer/traffcounter_impl.h @@ -28,13 +28,6 @@ #ifndef TRAFFCOUNTER_IMPL_H #define TRAFFCOUNTER_IMPL_H -#include - -#include -#include -#include -#include - #include "stg/traffcounter.h" #include "stg/os_int.h" #include "stg/logger.h" @@ -45,6 +38,13 @@ #include "eventloop.h" #include "user_impl.h" +#include +#include +#include +#include + +#include + #define PROTOMAX (5) class USERS_IMPL; @@ -147,7 +147,7 @@ private: //----------------------------------------------------------------------------- class ADD_USER_NONIFIER: public NOTIFIER_BASE { public: - ADD_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : + explicit ADD_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : NOTIFIER_BASE(), traffCnt(t) {} @@ -163,7 +163,7 @@ private: //----------------------------------------------------------------------------- class DEL_USER_NONIFIER: public NOTIFIER_BASE { public: - DEL_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : + explicit DEL_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : NOTIFIER_BASE(), traffCnt(t) {} @@ -186,8 +186,6 @@ public: TRAFFCOUNTER_IMPL(USERS_IMPL * users, const std::string & rulesFileName); ~TRAFFCOUNTER_IMPL(); - void SetRulesFile(const std::string & rulesFileName); - int Reload(); int Start(); int Stop(); @@ -204,7 +202,6 @@ private: bool ParseAddress(const char * ta, RULE * rule) const; uint32_t CalcMask(uint32_t msk) const; void FreeRules(); - void PrintRule(RULE rule) const; bool ReadRules(bool test = false); static void * Run(void * data);