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

#include <ClntTransMgr.h>

+ Collaboration diagram for TClntTransMgr:

Public Member Functions

 ~TClntTransMgr ()
void addAdvertise (SPtr< TClntMsg > advertise)
void delFirstAdvertise ()
void doDuties ()
void firstAdvertise ()
SPtr< TClntMsggetAdvertise ()
SPtr< TOptgetAdvertiseDUID ()
int getAdvertiseLstCount ()
char * getCtrlAddr ()
int getCtrlIface ()
int getMaxPreference ()
unsigned long getTimeout ()
void handleReconfigure (SPtr< TClntMsg > reconfMsg)
bool handleResponse (SPtr< TClntMsg > question, SPtr< TClntMsg > answer)
bool isDone ()
void printAdvertiseLst ()
void relayMsg (SPtr< TClntMsg > msg)
bool sanitizeAddrDB ()
 checks/updates loaded database (regarding interface names/indexes)
void sendInfRequest (TOptList requestOptions, int iface)
void sendRebind (TOptList ptrIA, int iface)
void sendRelease (TContainer< SPtr< TAddrIA > > iaLst, SPtr< TAddrIA > ta, TContainer< SPtr< TAddrIA > > pdLst)
void sendRenew ()
void sendRequest (TOptList requestOptions, int iface)
void shutdown ()
void sortAdvertise ()
void stop ()

Static Public Member Functions

static TClntTransMgrinstance ()
static void instanceCreate (const std::string &config)

Protected Member Functions

void checkConfirm ()
void checkDB ()
void checkDecline ()
void checkInfRequest ()
void checkRenew ()
void checkRequest ()
void checkSolicit ()
void removeExpired ()

Private Member Functions

 TClntTransMgr (const std::string &config)
bool openLoopbackSocket ()
bool openSockets (SPtr< TClntCfgIface > iface)
bool populateAddrMgr (SPtr< TClntCfgIface > iface)
void printLst (TContainer< SPtr< TClntMsg > > lst)
void sortAdvertiseLst ()

Private Attributes

TContainer< SPtr< TClntMsg > > AdvertiseLst
bool BindReuse
char CtrlAddr_ [48]
int CtrlIface_
bool IsDone
bool Shutdown
TContainer< SPtr< TClntMsg > > Transactions

Static Private Attributes

static TClntTransMgrInstance = 0

Constructor & Destructor Documentation

TClntTransMgr::TClntTransMgr ( const std::string &  config)
private
TClntTransMgr::~TClntTransMgr ( )

Member Function Documentation

void TClntTransMgr::addAdvertise ( SPtr< TClntMsg advertise)
void TClntTransMgr::checkConfirm ( )
protected
void TClntTransMgr::checkDB ( )
protected

checks if loaded Address database is sane (i.e. does not reffer to non-existing interface)

void TClntTransMgr::checkDecline ( )
protected
Todo:
: check result
Todo:
: check result
void TClntTransMgr::checkInfRequest ( )
protected
void TClntTransMgr::checkRenew ( )
protected
void TClntTransMgr::checkRequest ( )
protected
Todo:
: Reimplement check request support.
void TClntTransMgr::checkSolicit ( )
protected
void TClntTransMgr::delFirstAdvertise ( )
void TClntTransMgr::doDuties ( )
void TClntTransMgr::firstAdvertise ( )
SPtr< TClntMsg > TClntTransMgr::getAdvertise ( )
SPtr< TOpt > TClntTransMgr::getAdvertiseDUID ( )
int TClntTransMgr::getAdvertiseLstCount ( )
char * TClntTransMgr::getCtrlAddr ( )
int TClntTransMgr::getCtrlIface ( )
int TClntTransMgr::getMaxPreference ( )
unsigned long TClntTransMgr::getTimeout ( )
void TClntTransMgr::handleReconfigure ( SPtr< TClntMsg reconfMsg)

processes received RECONFIGURE message

Verifies that received message is valid. Depending on received option, it will send RENEW, INF-REQUEST or REBIND message

Parameters
reconfMsgpointer to received reconfigure message
Todo:
: check authentication here
Todo:
: server may tell client to send, RENEW, REBIND or INF-REQUEST
bool TClntTransMgr::handleResponse ( SPtr< TClntMsg question,
SPtr< TClntMsg answer 
)

handle response

Parameters
question
answer
Returns
TClntTransMgr & TClntTransMgr::instance ( )
static
void TClntTransMgr::instanceCreate ( const std::string &  config)
static
bool TClntTransMgr::isDone ( )
bool TClntTransMgr::openLoopbackSocket ( )
private
bool TClntTransMgr::openSockets ( SPtr< TClntCfgIface iface)
private
bool TClntTransMgr::populateAddrMgr ( SPtr< TClntCfgIface iface)
private
void TClntTransMgr::printAdvertiseLst ( )
void TClntTransMgr::printLst ( TContainer< SPtr< TClntMsg > >  lst)
private
void TClntTransMgr::relayMsg ( SPtr< TClntMsg msg)
void TClntTransMgr::removeExpired ( )
protected

this function removes expired addresses from interface and from database It must be called before AddrMgr::doDuties() is called.

Todo:
: call notify-script when address/prefix is expired
bool TClntTransMgr::sanitizeAddrDB ( )

checks/updates loaded database (regarding interface names/indexes)

Returns
true if sanitization was successful, false if it failed
void TClntTransMgr::sendInfRequest ( TOptList  requestOptions,
int  iface 
)
void TClntTransMgr::sendRebind ( TOptList  ptrIA,
int  iface 
)
void TClntTransMgr::sendRelease ( TContainer< SPtr< TAddrIA > >  iaLst,
SPtr< TAddrIA ta,
TContainer< SPtr< TAddrIA > >  pdLst 
)
void TClntTransMgr::sendRenew ( )
void TClntTransMgr::sendRequest ( TOptList  requestOptions,
int  iface 
)

Note: requestOptions list MUST NOT contain server DUID.

void TClntTransMgr::shutdown ( )
void TClntTransMgr::sortAdvertise ( )
void TClntTransMgr::sortAdvertiseLst ( )
private
void TClntTransMgr::stop ( )

Member Data Documentation

TContainer< SPtr<TClntMsg> > TClntTransMgr::AdvertiseLst
private
bool TClntTransMgr::BindReuse
private
char TClntTransMgr::CtrlAddr_[48]
private
int TClntTransMgr::CtrlIface_
private
TClntTransMgr * TClntTransMgr::Instance = 0
staticprivate
bool TClntTransMgr::IsDone
private
bool TClntTransMgr::Shutdown
private
TContainer< SPtr<TClntMsg> > TClntTransMgr::Transactions
private

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