Main Page | Namespace List | Alphabetical List | Class List | File List | Class Members | File Members

RadiusConfig Class Reference

#include <RadiusConfig.h>

List of all members.

Public Member Functions

 RadiusConfig (void)
 RadiusConfig (char *configfile)
 ~RadiusConfig ()
int parseConfigFile (const char *configfile)
void getValue (char *text, char *value)
list< RadiusServer > * getRadiusServer (void)
void setServiceType (char *)
char * getServiceType (void)
void setFramedProtocol (char *)
char * getFramedProtocol (void)
void setNASPortType (char *)
char * getNASPortType (void)
void setNASIdentifier (char *)
char * getNASIdentifier (void)
char * getNASIpAddress (void)
void setNASIpAddress (char *)

Private Member Functions

void deletechars (char *)

Private Attributes

list< RadiusServerserver
char serviceType [2]
char framedProtocol [2]
char nasPortType [2]
char nasIdentifier [128]
char nasIpAddress [16]

Friends

ostream & operator<< (ostream &os, RadiusConfig &config)


Detailed Description

This class represents the configurations attributes which can set in the configuration file and methods for the attributes.


Constructor & Destructor Documentation

RadiusConfig::RadiusConfig void   ) 
 

The constructor The constructor initializes all char arrays with 0.

RadiusConfig::RadiusConfig char *  configfile  ) 
 

The constructor initializes all char arrays with 0. After the initialization the configfile is parsed and the information which are found are copied to the attributes.

Parameters:
configfile The name of the configfile.

RadiusConfig::~RadiusConfig void   ) 
 

The destructur clears the serverlist.


Member Function Documentation

void RadiusConfig::deletechars char *  text  )  [private]
 

The method deletes chars from a string. This is used to delete tabs, spaces, # and '' from a string.

Parameters:
text The string which should be cleaned.

char * RadiusConfig::getFramedProtocol void   ) 
 

The getter method for the framed protocol

Returns:
A pointer to the framed protocol.

char * RadiusConfig::getNASIdentifier void   ) 
 

The getter method for the nas identifier.

Returns:
A pointer to the nas identifier.

char * RadiusConfig::getNASIpAddress void   ) 
 

The getter method for the nas ip address.

Returns:
A pointer to the nas ipaddress.

char * RadiusConfig::getNASPortType void   ) 
 

The getter method for the nas port type.

Returns:
A pointer to the nas port type.

list< RadiusServer > * RadiusConfig::getRadiusServer void   ) 
 

The getter method for the radius server list.

Returns:
The server list.

char * RadiusConfig::getServiceType void   ) 
 

The getter method for the service type

Returns:
A pointer to the service type.

void RadiusConfig::getValue char *  text,
char *  value
 

The method finds the part of the string after the '=' and puts it in the value.

Parameters:
text The string with the value.
value The value where to put the part of the string.

int RadiusConfig::parseConfigFile const char *  configfile  ) 
 

The method parse the configfile for attributes and radius server, the attributes are copied to the member variables.

Parameters:
configfile The name of the configfile.
Returns:
An integer, 0 if everything is ok or PARSING_ERROR or BAD_FILE if something is wrong.

void RadiusConfig::setFramedProtocol char *  proto  ) 
 

The setter method for the framed protocol.

Parameters:
proto A string with the framed protocol.

void RadiusConfig::setNASIdentifier char *  identifier  ) 
 

The setter method for the nas identifier.

Parameters:
identifier A string with the identifier.

void RadiusConfig::setNASIpAddress char *  ip  ) 
 

The setter method for the nas ip address.

Parameters:
ip A string with ip address.

void RadiusConfig::setNASPortType char *  type  ) 
 

The setter method for the nas port type.

Parameters:
type A string with the nas port type.

void RadiusConfig::setServiceType char *  type  ) 
 

The setter method for the service type.

Parameters:
type A string with the service type.


Friends And Related Function Documentation

ostream& operator<< ostream &  os,
RadiusConfig config
[friend]
 


Member Data Documentation

char RadiusConfig::framedProtocol[2] [private]
 

The framed protocol which is set in the radius packet as an attribute.

char RadiusConfig::nasIdentifier[128] [private]
 

The nas identifier which is set in the radius packet.

char RadiusConfig::nasIpAddress[16] [private]
 

The nas ipaddress which is set in the radius packet.

char RadiusConfig::nasPortType[2] [private]
 

The nas port type which is set in radius packet.

list<RadiusServer> RadiusConfig::server [private]
 

An list with radius server, it is created dynamically by parsing the configuration file.

char RadiusConfig::serviceType[2] [private]
 

The service type which is set in the radius packet.


The documentation for this class was generated from the following files:
Generated on Sun Nov 27 20:19:13 2005 for RadiusClass by  doxygen 1.4.2