00001 /* 00002 * RadiusClass -- An C++-Library for radius authentication 00003 * and accounting. 00004 * 00005 * Copyright (C) 2005 EWE TEL GmbH/Ralf Luebben <ralfluebben@gmx.de> 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License version 2 00009 * as published by the Free Software Foundation. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program (see the file COPYING included with this 00018 * distribution); if not, write to the Free Software Foundation, Inc., 00019 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00022 #ifndef _RADIUSSERVER_H_ 00023 #define _RADIUSSERVER_H_ 00024 #include <string> 00025 #include <iostream> 00026 00027 using namespace std; 00030 class RadiusServer 00031 { 00032 private: 00033 short int authport; 00034 short int acctport; 00035 string name; 00036 int retry; 00037 string sharedsecret; 00038 int wait; 00040 public: 00041 00042 00043 RadiusServer(char * name="127.0.0.1",char * secret = "", int authport=1812, int acctport=1813, int retry=3, int wait=1); 00044 ~RadiusServer(); 00045 RadiusServer &operator=(const RadiusServer &); 00046 00047 int getRetry(); 00048 void setRetry(int); 00049 00050 void setWait(int); 00051 int getWait(void); 00052 00053 void setSharedSecret(char *); 00054 string getSharedSecret(void); 00055 00056 int getAuthPort(); 00057 void setAuthPort(short int); 00058 00059 int getAcctPort(); 00060 void setAcctPort(short int); 00061 00062 string getName(); 00063 void setName(char *); 00064 00065 friend ostream& operator << (ostream& os, RadiusServer& server); 00066 }; 00067 00068 #endif //_RADIUSSERVER_H_ 00069 00070 00071