Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TCfgMgr Class Reference

#include <CfgMgr.h>

+ Inheritance diagram for TCfgMgr:
+ Collaboration diagram for TCfgMgr:

Public Types

enum  DNSUpdateProtocol { DNSUPDATE_TCP, DNSUPDATE_UDP, DNSUPDATE_ANY }

Public Member Functions

 TCfgMgr ()
virtual ~TCfgMgr ()
void addKey (SPtr< TSIGKey > key)
bool compareConfigs (const std::string &cfgFile, const std::string &oldCfgFile)
void copyFile (const std::string &cfgFile, const std::string &oldCfgFile)
uint8_t getAuthAlgorithm ()
bool getAuthDropUnauthenticated ()
AuthProtocols getAuthProtocol ()
std::string getAuthRealm ()
AuthReplay getAuthReplay ()
DNSUpdateProtocol getDDNSProtocol ()
unsigned int getDDNSTimeout ()
SPtr< TDUIDgetDUID ()
SPtr< TSIGKeygetKey ()
int getLogLevel ()
std::string getLogName ()
std::string getWorkDir ()
void setAuthAlgorithm (uint8_t algorithm)
void setAuthDropUnauthenticated (bool drop)
void setAuthProtocol (AuthProtocols proto)
void setAuthRealm (const std::string &realm)
void setAuthReplay (AuthReplay replay_detection_mode)
void setDDNSProtocol (DNSUpdateProtocol proto)
void setDDNSTimeout (unsigned int timeout)
void setWorkdir (std::string workdir)

Protected Member Functions

bool generateDUID (const std::string &duidFile, char *mac, int macLen, int macType)
bool loadDUID (const std::string &filename)
 loads DUID from a file.
bool setDUID (const std::string &duidFile, TIfaceMgr &ifaceMgr)

Protected Attributes

uint8_t AuthAlgorithm_
bool AuthDropUnauthenticated_
AuthProtocols AuthProtocol_
std::string AuthRealm_
AuthReplay AuthReplay_
DNSUpdateProtocol DdnsProto
unsigned int DDNSTimeout_
SPtr< TDUIDDUID
SPtr< TDUIDDUIDEnterpriseID
int DUIDEnterpriseNumber
EDUIDType DUIDType
bool IsDone
TSIGKeyList Keys_
int LogLevel
std::string LogName
std::string Workdir

Member Enumeration Documentation

Enumerator:
DNSUPDATE_TCP 
DNSUPDATE_UDP 
DNSUPDATE_ANY 

Constructor & Destructor Documentation

TCfgMgr::TCfgMgr ( )
TCfgMgr::~TCfgMgr ( )
virtual

Member Function Documentation

void TCfgMgr::addKey ( SPtr< TSIGKey key)
bool TCfgMgr::compareConfigs ( const std::string &  cfgFile,
const std::string &  oldCfgFile 
)
void TCfgMgr::copyFile ( const std::string &  cfgFile,
const std::string &  oldCfgFile 
)
bool TCfgMgr::generateDUID ( const std::string &  duidFile,
char *  mac,
int  macLen,
int  macType 
)
protected
uint8_t TCfgMgr::getAuthAlgorithm ( )
bool TCfgMgr::getAuthDropUnauthenticated ( )
AuthProtocols TCfgMgr::getAuthProtocol ( )
std::string TCfgMgr::getAuthRealm ( )
AuthReplay TCfgMgr::getAuthReplay ( )
DNSUpdateProtocol TCfgMgr::getDDNSProtocol ( )
inline
unsigned int TCfgMgr::getDDNSTimeout ( )
inline
SPtr< TDUID > TCfgMgr::getDUID ( )
SPtr< TSIGKey > TCfgMgr::getKey ( )
Todo:
: add some parameter that will pick the right key
int TCfgMgr::getLogLevel ( )
string TCfgMgr::getLogName ( )
string TCfgMgr::getWorkDir ( )
bool TCfgMgr::loadDUID ( const std::string &  duidFile)
protected

loads DUID from a file.

This function also checks if DUID value exist and checks the correctness of this file.

Parameters
duidFilestring representation of the DUID file.
Returns
true if DUID value exists and is correct, false if doesn't.
void TCfgMgr::setAuthAlgorithm ( uint8_t  algorithm)
void TCfgMgr::setAuthDropUnauthenticated ( bool  drop)
void TCfgMgr::setAuthProtocol ( AuthProtocols  proto)
void TCfgMgr::setAuthRealm ( const std::string &  realm)
void TCfgMgr::setAuthReplay ( AuthReplay  replay_detection_mode)
void TCfgMgr::setDDNSProtocol ( DNSUpdateProtocol  proto)
void TCfgMgr::setDDNSTimeout ( unsigned int  timeout)
inline
bool TCfgMgr::setDUID ( const std::string &  duidFile,
TIfaceMgr ifaceMgr 
)
protected
void TCfgMgr::setWorkdir ( std::string  workdir)

Member Data Documentation

uint8_t TCfgMgr::AuthAlgorithm_
protected
bool TCfgMgr::AuthDropUnauthenticated_
protected
AuthProtocols TCfgMgr::AuthProtocol_
protected
std::string TCfgMgr::AuthRealm_
protected
AuthReplay TCfgMgr::AuthReplay_
protected
DNSUpdateProtocol TCfgMgr::DdnsProto
protected
unsigned int TCfgMgr::DDNSTimeout_
protected
SPtr<TDUID> TCfgMgr::DUID
protected
SPtr<TDUID> TCfgMgr::DUIDEnterpriseID
protected
int TCfgMgr::DUIDEnterpriseNumber
protected
EDUIDType TCfgMgr::DUIDType
protected
bool TCfgMgr::IsDone
protected
TSIGKeyList TCfgMgr::Keys_
protected
int TCfgMgr::LogLevel
protected
std::string TCfgMgr::LogName
protected
std::string TCfgMgr::Workdir
protected

The documentation for this class was generated from the following files: