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

#include <Msg.h>

+ Inheritance diagram for TMsg:
+ Collaboration diagram for TMsg:

Public Member Functions

 TMsg (int iface, SPtr< TIPv6Addr > addr, int msgType)
 TMsg (int iface, SPtr< TIPv6Addr > addr, int msgType, long transID)
 TMsg (int iface, SPtr< TIPv6Addr > addr, char *&buf, int &bufSize)
virtual ~TMsg ()
void addOption (SPtr< TOpt > opt)
void calculateDigests (char *buffer, size_t len)
int countOption ()
void firstOption ()
TKey getAuthKey ()
SPtr< TOptDUIDgetClientID () const
 returns client-id option (if present)
int getIface ()
SPtr< TIPv6AddrgetLocalAddr ()
virtual std::string getName () const =0
void * getNotifyScriptParams ()
SPtr< TOptgetOption (int type) const
virtual SPtr< TOptgetOption ()
TOptListgetOptLst ()
SPtr< TOptOptionRequestgetORO () const
 returns ORO (if present)
SPtr< TIPv6AddrgetRemoteAddr ()
SPtr< TOptDUIDgetServerID () const
 returns server-id option (if present)
virtual int getSize ()
uint32_t getSPI ()
virtual unsigned long getTimeout ()
long getTransID ()
long getType ()
bool isDone ()
bool isDone (bool done)
bool loadAuthKey ()
void setAuthDigestPtr (char *ptr, unsigned len)
void setAuthKey (const TKey &key)
void setLocalAddr (SPtr< TIPv6Addr > myaddr)
void setSPI (uint32_t val)
virtual int storeSelf (char *buffer)
bool validateAuthInfo (char *buf, int bufSize, AuthProtocols proto, const DigestTypesLst &acceptedDigestTypes)

Public Attributes

DigestTypes DigestType_

Protected Member Functions

virtual bool check (bool clntIDmandatory, bool srvIDmandatory)
bool delOption (int code)
void setAttribs (int iface, SPtr< TIPv6Addr > addr, int msgType, long transID)

Protected Attributes

unsigned AuthDigestLen_
char * AuthDigestPtr_
TKey AuthKey_
int Iface
bool IsDone
SPtr< TIPv6AddrLocalAddr_
 Address the packet was received on.
int MsgType
TOptList::iterator NextOpt
TNotifyScriptParamsNotifyScripts
TOptList Options
SPtr< TIPv6AddrPeerAddr_
uint32_t SPI_
long TransID

Constructor & Destructor Documentation

TMsg::TMsg ( int  iface,
SPtr< TIPv6Addr addr,
int  msgType 
)
TMsg::TMsg ( int  iface,
SPtr< TIPv6Addr addr,
int  msgType,
long  transID 
)
TMsg::TMsg ( int  iface,
SPtr< TIPv6Addr addr,
char *&  buf,
int &  bufSize 
)
TMsg::~TMsg ( )
virtual

Member Function Documentation

void TMsg::addOption ( SPtr< TOpt opt)
inline

Reimplemented in TReqMsg.

void TMsg::calculateDigests ( char *  buffer,
size_t  len 
)
bool TMsg::check ( bool  clntIDmandatory,
bool  srvIDmandatory 
)
protectedvirtual

checks if appropriate number of server/client IDs has been attached

Parameters
srvIDmandatory- is ServerID option mandatory? (false==ServerID not allowed)
clntIDmandatory- is ClientID option mandatory?(false==ClientID is optional)
Returns

Reimplemented in TSrvMsg, and TClntMsg.

int TMsg::countOption ( )
bool TMsg::delOption ( int  code)
protected
void TMsg::firstOption ( )
TKey TMsg::getAuthKey ( )
SPtr< TOptDUID > TMsg::getClientID ( ) const

returns client-id option (if present)

int TMsg::getIface ( )
SPtr< TIPv6Addr > TMsg::getLocalAddr ( )
void * TMsg::getNotifyScriptParams ( )
SPtr< TOpt > TMsg::getOption ( int  type) const
SPtr< TOpt > TMsg::getOption ( )
virtual
TOptList & TMsg::getOptLst ( )
SPtr< TOptOptionRequest > TMsg::getORO ( ) const

returns ORO (if present)

returns option request option (if present)

SPtr< TIPv6Addr > TMsg::getRemoteAddr ( )
SPtr< TOptDUID > TMsg::getServerID ( ) const

returns server-id option (if present)

int TMsg::getSize ( )
virtual

Reimplemented in TRelMsgRelayForw, and TRelMsgRelayRepl.

uint32_t TMsg::getSPI ( )
long TMsg::getTransID ( )
long TMsg::getType ( )
bool TMsg::isDone ( )
bool TMsg::isDone ( bool  done)
bool TMsg::loadAuthKey ( )
void TMsg::setAttribs ( int  iface,
SPtr< TIPv6Addr addr,
int  msgType,
long  transID 
)
protected
void TMsg::setAuthDigestPtr ( char *  ptr,
unsigned  len 
)
Todo:
: remove from here (and move to AUTH option)
void TMsg::setAuthKey ( const TKey key)
void TMsg::setLocalAddr ( SPtr< TIPv6Addr myaddr)
void TMsg::setSPI ( uint32_t  val)
int TMsg::storeSelf ( char *  buffer)
virtual

Reimplemented in TRelMsgRelayForw, and TRelMsgRelayRepl.

bool TMsg::validateAuthInfo ( char *  buf,
int  bufSize,
AuthProtocols  proto,
const DigestTypesLst &  acceptedDigestTypes 
)
Todo:
: load plain text from a file

Member Data Documentation

unsigned TMsg::AuthDigestLen_
protected
char* TMsg::AuthDigestPtr_
protected
TKey TMsg::AuthKey_
protected
DigestTypes TMsg::DigestType_
int TMsg::Iface
protected
bool TMsg::IsDone
protected
SPtr<TIPv6Addr> TMsg::LocalAddr_
protected

Address the packet was received on.

int TMsg::MsgType
protected
TOptList::iterator TMsg::NextOpt
protected
TNotifyScriptParams* TMsg::NotifyScripts
protected
TOptList TMsg::Options
protected
SPtr<TIPv6Addr> TMsg::PeerAddr_
protected

Address of the corresponding node (received from or to be sent to)

Todo:
: rename to RemoteAddr_
uint32_t TMsg::SPI_
protected
long TMsg::TransID
protected

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