-public:
- virtual ~RAD_SETTINGS(){};
- const string& GetStrError() const { return errorStr; };
- int ParseSettings(const MODULE_SETTINGS & s);
- uint16_t GetPort() const;
- uint32_t GetServerIP() const;
- int GetPassword(string * password) const;
- int GetAuthServices(list<string> * svcs) const;
- int GetAcctServices(list<string> * svcs) const;
-
-private:
- int ParseIntInRange(const string & str, int min, int max, int * val);
- int ParseIP(const string & str, uint32_t * routerIP);
- int ParseServices(const vector<string> & str, list<string> * lst);
-
- uint16_t port;
- string errorStr;
- string password;
- uint32_t serverIP;
- list<string> authServices;
- list<string> acctServices;
-};
-//-----------------------------------------------------------------------------
-struct RAD_SESSION {
- std::string userName;
- std::string serviceType;
-};
-//-----------------------------------------------------------------------------
-class RADIUS :public BASE_AUTH
-{
-public:
- RADIUS();
- virtual ~RADIUS(){};
-
- void SetUsers(USERS * u);
- void SetTariffs(TARIFFS *){};
- void SetAdmins(ADMINS *){};
- void SetTraffcounter(TRAFFCOUNTER *){};
- void SetStore(BASE_STORE * );
- void SetStgSettings(const SETTINGS * s);
- void SetSettings(const MODULE_SETTINGS & s);
- int ParseSettings();
-
- int Start();
- int Stop();
- int Reload() { return 0; };
- bool IsRunning();
-
- const string & GetStrError() const { return errorStr; };
- const string GetVersion() const;
- uint16_t GetStartPosition() const;
- uint16_t GetStopPosition() const;
-
- int SendMessage(const STG_MSG &, uint32_t) const { return 0; };
-
-private:
- static void * Run(void *);
- 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);
- int RecvData(RAD_PACKET * packet);
- int ProcessData(RAD_PACKET * packet);
+ class RADIUS : public Auth
+ {
+ public:
+ RADIUS();
+
+ int Start() override { return 0; }
+ int Stop() override { return 0; }
+ int Reload(const ModuleSettings & /*ms*/) override { return 0; }
+ bool IsRunning() override { return isRunning; }
+ int ParseSettings() override { return 0; }
+ const std::string & GetStrError() const override { return errorStr; }
+ std::string GetVersion() const override;
+ uint16_t GetStartPosition() const override { return 0; }
+ uint16_t GetStopPosition() const override { return 0; }
+
+ int SendMessage(const Message & msg, uint32_t ip) const override { return 0; }
+
+ private:
+ mutable std::string errorStr;
+ bool isRunning;