X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/913b7a4ab586482c853b679fcd8415cf88524c31..b084087ede50ac90d2493b6192fec9b7342e30bf:/projects/stargazer/plugins/other/radius/radius.h?ds=sidebyside diff --git a/projects/stargazer/plugins/other/radius/radius.h b/projects/stargazer/plugins/other/radius/radius.h index 8d37ab14..69d3b9d9 100644 --- a/projects/stargazer/plugins/other/radius/radius.h +++ b/projects/stargazer/plugins/other/radius/radius.h @@ -29,11 +29,12 @@ #ifndef RADIUS_H #define RADIUS_H +#include + +#include +#include #include #include -#include -#include -#include #include "os_int.h" #include "base_auth.h" @@ -55,24 +56,24 @@ class RADIUS; class RAD_SETTINGS { public: - virtual ~RAD_SETTINGS(){}; - const string& GetStrError() const { return errorStr; }; - int ParseSettings(const MODULE_SETTINGS & s); - uint16_t GetPort() const; - int GetPassword(string * password) const; - int GetAuthServices(list * svcs) const; - int GetAcctServices(list * svcs) const; + RAD_SETTINGS() : port(0) {} + virtual ~RAD_SETTINGS() {} + const string & GetStrError() const { return errorStr; } + int ParseSettings(const MODULE_SETTINGS & s); + uint16_t GetPort() const { return port; } + const std::string & GetPassword() const { return password; } + const list & GetAuthServices() const { return authServices; } + const list & GetAcctServices() const { return acctServices; } private: - int ParseIntInRange(const string & str, int min, int max, int * val); - int ParseIP(const string & str, uint32_t * routerIP); - int ParseServices(const vector & str, list * lst); - - uint16_t port; - string errorStr; - string password; - list authServices; - list acctServices; + int ParseIntInRange(const string & str, int min, int max, int * val); + int ParseServices(const vector & str, list * lst); + + uint16_t port; + string errorStr; + string password; + list authServices; + list acctServices; }; //----------------------------------------------------------------------------- struct RAD_SESSION { @@ -112,10 +113,6 @@ private: int PrepareNet(); int FinalizeNet(); - void InitEncrypt(BLOWFISH_CTX * ctx, const string & password); - void Decrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8); - void Encrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8); - int Send(const RAD_PACKET & packet, struct sockaddr_in * outerAddr); int RecvData(RAD_PACKET * packet, struct sockaddr_in * outerAddr); int ProcessData(RAD_PACKET * packet); @@ -133,9 +130,6 @@ private: bool CanAcctService(const std::string & svc) const; bool IsAllowedService(const std::string & svc) const; - void SetUserNotifier(user_iter u); - void UnSetUserNotifier(user_iter u); - bool WaitPackets(int sd) const; void PrintServices(const std::list & svcs);