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

#include <IfaceMgr.h>

+ Inheritance diagram for TIfaceMgr:
+ Collaboration diagram for TIfaceMgr:

Public Member Functions

 TIfaceMgr (const std::string &xmlFile, bool getIfaces)
virtual ~TIfaceMgr ()
virtual void closeSockets ()
 closes all sockets
int countIface ()
void dump ()
void firstIface ()
SPtr< TIfaceIfacegetIface ()
SPtr< TIfaceIfacegetIfaceByID (int id)
SPtr< TIfaceIfacegetIfaceByName (const std::string &name)
virtual SPtr< TIfaceIfacegetIfaceBySocket (int fd)
bool isDone ()
virtual void notifyScript (const std::string &scriptName, std::string action, TNotifyScriptParams &params)
virtual void notifyScripts (const std::string &scriptName, SPtr< TMsg > question, SPtr< TMsg > answer)
virtual void notifyScripts (const std::string &scriptName, SPtr< TMsg > question, SPtr< TMsg > answer, TNotifyScriptParams &params)
std::string printMac (char *mac, int macLen)
int select (unsigned long time, char *buf, int &bufsize, SPtr< TIPv6Addr > peer, SPtr< TIPv6Addr > myaddr)

Protected Member Functions

virtual void optionToEnv (TNotifyScriptParams &params, SPtr< TOpt > opt, std::string txtPrefix)

Protected Attributes

TContainer< SPtr< TIfaceIface > > IfaceLst
bool IsDone
std::string XmlFile

Friends

std::ostream & operator<< (std::ostream &strum, TIfaceMgr &x)

Constructor & Destructor Documentation

TIfaceMgr::TIfaceMgr ( const std::string &  xmlFile,
bool  getIfaces 
)

constructor

Parameters
xmlFilexml file, where interface info will be stored
getIfacesspecifies if interfaces should be detected
TIfaceMgr::~TIfaceMgr ( )
virtual

Member Function Documentation

void TIfaceMgr::closeSockets ( )
virtual

closes all sockets

int TIfaceMgr::countIface ( )
void TIfaceMgr::dump ( )

Reimplemented in TClntIfaceMgr, TRelIfaceMgr, and TSrvIfaceMgr.

void TIfaceMgr::firstIface ( )
SPtr< TIfaceIface > TIfaceMgr::getIface ( )
SPtr< TIfaceIface > TIfaceMgr::getIfaceByID ( int  id)
SPtr< TIfaceIface > TIfaceMgr::getIfaceByName ( const std::string &  name)
SPtr< TIfaceIface > TIfaceMgr::getIfaceBySocket ( int  fd)
virtual
bool TIfaceMgr::isDone ( )
void TIfaceMgr::notifyScript ( const std::string &  scriptName,
std::string  action,
TNotifyScriptParams params 
)
virtual
void TIfaceMgr::notifyScripts ( const std::string &  scriptName,
SPtr< TMsg question,
SPtr< TMsg answer 
)
virtual

Reimplemented in TSrvIfaceMgr.

void TIfaceMgr::notifyScripts ( const std::string &  scriptName,
SPtr< TMsg question,
SPtr< TMsg answer,
TNotifyScriptParams params 
)
virtual
void TIfaceMgr::optionToEnv ( TNotifyScriptParams params,
SPtr< TOpt opt,
std::string  txtPrefix 
)
protectedvirtual
string TIfaceMgr::printMac ( char *  mac,
int  macLen 
)
int TIfaceMgr::select ( unsigned long  time,
char *  buf,
int &  bufsize,
SPtr< TIPv6Addr peer,
SPtr< TIPv6Addr myaddr 
)

tries to read data from any socket on all interfaces returns after time seconds.

Parameters
timelistens for time seconds
bufbuffer
bufsizebuffer size
peer[out] sender address
myaddr[out] local IPv6 address
Returns
socket descriptor (or negative values for errors)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  strum,
TIfaceMgr x 
)
friend

Member Data Documentation

TContainer< SPtr<TIfaceIface> > TIfaceMgr::IfaceLst
protected
bool TIfaceMgr::IsDone
protected
std::string TIfaceMgr::XmlFile
protected

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