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

#include <ClntMsg.h>

+ Inheritance diagram for TClntMsg:
+ Collaboration diagram for TClntMsg:

Public Member Functions

 TClntMsg (int iface, SPtr< TIPv6Addr > addr, char *buf, int bufSize)
 TClntMsg (int iface, SPtr< TIPv6Addr > addr, int msgType)
 ~TClntMsg ()
virtual void answer (SPtr< TClntMsg > reply)
void appendAuthenticationOption ()
 appends authentication option.
void appendElapsedOption ()
void appendRequestedOptions ()
void appendTAOptions (bool switchToInProcess)
 appends all TAs, which are currently in the NOTCONFIGURED state
virtual bool check ()=0
bool checkReceivedAuthOption ()
void copyAAASPI (SPtr< TClntMsg > q)
void deletePD (SPtr< TOpt > pd_)
virtual void doDuties ()=0
void getReconfKeyFromAddrMgr ()
SPtr< TOptStatusCodegetStatusCode () const
 return status-code option (if present)
unsigned long getTimeout ()
SPtr< TOptparseExtraOption (const char *buf, unsigned int code, unsigned int length)
void send ()
void setIface (int iface)
bool validateReplayDetection ()
- Public Member Functions inherited from TMsg
 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 ()
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)

Protected Member Functions

bool appendClientID ()
bool check (bool clntIDmandatory, bool srvIDmandatory)
- Protected Member Functions inherited from TMsg
bool delOption (int code)
void setAttribs (int iface, SPtr< TIPv6Addr > addr, int msgType, long transID)

Protected Attributes

int FirstTimeStamp
long IRT
int LastTimeStamp
long MRC
long MRD
long MRT
int RC
int RT
- Protected Attributes inherited from TMsg
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

Private Member Functions

void invalidAllowOptInMsg (int msg, int opt)
void invalidAllowOptInOpt (int msg, int parentOpt, int childOpt)
void setDefaults ()

Additional Inherited Members

- Public Attributes inherited from TMsg
DigestTypes DigestType_

Constructor & Destructor Documentation

TClntMsg::TClntMsg ( int  iface,
SPtr< TIPv6Addr addr,
char *  buf,
int  bufSize 
)

creates message, based on a received buffer

Parameters
iface
addr
buf
bufSize
TClntMsg::TClntMsg ( int  iface,
SPtr< TIPv6Addr addr,
int  msgType 
)
TClntMsg::~TClntMsg ( )

Member Function Documentation

void TClntMsg::answer ( SPtr< TClntMsg reply)
virtual

method is used to process received REPLY message (as an answer for REQUEST or as an answer for SOLICIT with RAPID COMMIT option)

Parameters
reply
Todo:
: set proper options to FAILED state

Reimplemented in TClntMsgAdvertise, TClntMsgSolicit, TClntMsgRebind, TClntMsgRelease, TClntMsgRequest, TClntMsgConfirm, TClntMsgInfRequest, TClntMsgDecline, TClntMsgRenew, and TClntMsgReply.

void TClntMsg::appendAuthenticationOption ( )

appends authentication option.

bool TClntMsg::appendClientID ( )
protected
void TClntMsg::appendElapsedOption ( )
void TClntMsg::appendRequestedOptions ( )
void TClntMsg::appendTAOptions ( bool  switchToInProcess)

appends all TAs, which are currently in the NOTCONFIGURED state

append all TA options, which are currently in the STATE_NOTCONFIGURED state.

Parameters
switchToInProcess- switch them to STATE_INPROCESS state?
bool TClntMsg::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 from TMsg.

bool TClntMsg::checkReceivedAuthOption ( )
Todo:
calculate HMAC-MD5 checksum and compare it against stored key
void TClntMsg::copyAAASPI ( SPtr< TClntMsg q)
void TClntMsg::deletePD ( SPtr< TOpt pd_)
void TClntMsg::getReconfKeyFromAddrMgr ( )
SPtr< TOptStatusCode > TClntMsg::getStatusCode ( ) const

return status-code option (if present)

unsigned long TClntMsg::getTimeout ( )
virtual

Reimplemented from TMsg.

Reimplemented in TClntMsgConfirm.

void TClntMsg::invalidAllowOptInMsg ( int  msg,
int  opt 
)
private
void TClntMsg::invalidAllowOptInOpt ( int  msg,
int  parentOpt,
int  childOpt 
)
private
SPtr< TOpt > TClntMsg::parseExtraOption ( const char *  buf,
unsigned int  code,
unsigned int  length 
)
void TClntMsg::send ( )
void TClntMsg::setDefaults ( )
private
Todo:
: This should be moved to TMsg
void TClntMsg::setIface ( int  iface)
bool TClntMsg::validateReplayDetection ( )

Member Data Documentation

int TClntMsg::FirstTimeStamp
protected
long TClntMsg::IRT
protected
int TClntMsg::LastTimeStamp
protected
long TClntMsg::MRC
protected
long TClntMsg::MRD
protected
long TClntMsg::MRT
protected
int TClntMsg::RC
protected
int TClntMsg::RT
protected

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