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

#include <RelIfaceMgr.h>

+ Inheritance diagram for TRelIfaceMgr:
+ Collaboration diagram for TRelIfaceMgr:

Public Member Functions

 ~TRelIfaceMgr ()
SPtr< TRelMsgdecodeGeneric (SPtr< TIfaceIface > iface, SPtr< TIPv6Addr > peer, char *buf, int bufsize)
SPtr< TRelMsgdecodeMsg (SPtr< TIfaceIface > iface, SPtr< TIPv6Addr > peer, char *buf, int bufsize)
SPtr< TRelMsgdecodeRelayForw (SPtr< TIfaceIface > iface, SPtr< TIPv6Addr > peer, char *buf, int bufsize)
SPtr< TRelMsgdecodeRelayRepl (SPtr< TIfaceIface > iface, SPtr< TIPv6Addr > peer, char *buf, int bufsize)
void dump ()
SPtr< TRelMsgselect (unsigned long timeout)
bool send (int iface, char *data, int dataLen, SPtr< TIPv6Addr > addr, int port)
- Public Member Functions inherited from TIfaceMgr
 TIfaceMgr (const std::string &xmlFile, bool getIfaces)
virtual ~TIfaceMgr ()
virtual void closeSockets ()
 closes all sockets
int countIface ()
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)

Static Public Member Functions

static TRelIfaceMgrinstance ()
static void instanceCreate (const std::string &xmlFile)

Protected Member Functions

 TRelIfaceMgr (const std::string &xmlFile)
- Protected Member Functions inherited from TIfaceMgr
virtual void optionToEnv (TNotifyScriptParams &params, SPtr< TOpt > opt, std::string txtPrefix)

Static Protected Attributes

static TRelIfaceMgrInstance = 0

Friends

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

Additional Inherited Members

- Protected Attributes inherited from TIfaceMgr
TContainer< SPtr< TIfaceIface > > IfaceLst
bool IsDone
std::string XmlFile

Constructor & Destructor Documentation

TRelIfaceMgr::~TRelIfaceMgr ( )
TRelIfaceMgr::TRelIfaceMgr ( const std::string &  xmlFile)
protected

Member Function Documentation

SPtr< TRelMsg > TRelIfaceMgr::decodeGeneric ( SPtr< TIfaceIface iface,
SPtr< TIPv6Addr peer,
char *  buf,
int  bufsize 
)
SPtr< TRelMsg > TRelIfaceMgr::decodeMsg ( SPtr< TIfaceIface iface,
SPtr< TIPv6Addr peer,
char *  buf,
int  bufsize 
)
SPtr< TRelMsg > TRelIfaceMgr::decodeRelayForw ( SPtr< TIfaceIface iface,
SPtr< TIPv6Addr peer,
char *  buf,
int  bufsize 
)
SPtr< TRelMsg > TRelIfaceMgr::decodeRelayRepl ( SPtr< TIfaceIface iface,
SPtr< TIPv6Addr peer,
char *  buf,
int  bufsize 
)
void TRelIfaceMgr::dump ( )

Reimplemented from TIfaceMgr.

TRelIfaceMgr & TRelIfaceMgr::instance ( )
static
void TRelIfaceMgr::instanceCreate ( const std::string &  xmlFile)
static
SPtr< TRelMsg > TRelIfaceMgr::select ( unsigned long  timeout)

reads messages from all interfaces it's wrapper around IfaceMgr::select(...) method

Parameters
timeout- how long can we wait for packets? returns SPtr to message object
bool TRelIfaceMgr::send ( int  ifindex,
char *  data,
int  dataLen,
SPtr< TIPv6Addr addr,
int  port 
)

sends data to client. Uses multicast address as source

Parameters
ifindexinterface ID
databuffer containing message ready to send
dataLensize of message
addrdestination address
portUDP port to send the data to returns true if message was send successfully

Friends And Related Function Documentation

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

Member Data Documentation

TRelIfaceMgr * TRelIfaceMgr::Instance = 0
staticprotected

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