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

#include <ClntMsgSolicit.h>

+ Inheritance diagram for TClntMsgSolicit:
+ Collaboration diagram for TClntMsgSolicit:

Public Member Functions

 TClntMsgSolicit (int iface, SPtr< TIPv6Addr > addr, TContainer< SPtr< TClntCfgIA > > iaLst, SPtr< TClntCfgTA > ta, TContainer< SPtr< TClntCfgPD > > pdLst, bool rapid=false, bool remoteAutoconf=false)
 ~TClntMsgSolicit ()
void answer (SPtr< TClntMsg > msg)
bool check ()
void doDuties ()
std::string getName () const
bool shallRejectAnswer (SPtr< TClntMsg > msg)
 check if received message should be accepted.
void sortAnswers ()
- Public Member Functions inherited from TClntMsg
 TClntMsg (int iface, SPtr< TIPv6Addr > addr, char *buf, int bufSize)
 TClntMsg (int iface, SPtr< TIPv6Addr > addr, int msgType)
 ~TClntMsg ()
void appendAuthenticationOption ()
 appends authentication option.
void appendElapsedOption ()
void appendRequestedOptions ()
void appendTAOptions (bool switchToInProcess)
 appends all TAs, which are currently in the NOTCONFIGURED state
bool checkReceivedAuthOption ()
void copyAAASPI (SPtr< TClntMsg > q)
void deletePD (SPtr< TOpt > pd_)
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 ()
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)

Private Member Functions

int getMaxPreference ()

Additional Inherited Members

- Public Attributes inherited from TMsg
DigestTypes DigestType_
- Protected Member Functions inherited from TClntMsg
bool appendClientID ()
bool check (bool clntIDmandatory, bool srvIDmandatory)
- Protected Attributes inherited from TClntMsg
int FirstTimeStamp
long IRT
int LastTimeStamp
long MRC
long MRD
long MRT
int RC
int RT

Constructor & Destructor Documentation

TClntMsgSolicit::TClntMsgSolicit ( int  iface,
SPtr< TIPv6Addr addr,
TContainer< SPtr< TClntCfgIA > >  iaLst,
SPtr< TClntCfgTA ta,
TContainer< SPtr< TClntCfgPD > >  pdLst,
bool  rapid = false,
bool  remoteAutoconf = false 
)
TClntMsgSolicit::~TClntMsgSolicit ( )

Member Function Documentation

void TClntMsgSolicit::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 from TClntMsg.

bool TClntMsgSolicit::check ( )
virtual

Implements TClntMsg.

void TClntMsgSolicit::doDuties ( )
virtual

Implements TClntMsg.

int TClntMsgSolicit::getMaxPreference ( )
private
std::string TClntMsgSolicit::getName ( void  ) const
virtual

Implements TMsg.

bool TClntMsgSolicit::shallRejectAnswer ( SPtr< TClntMsg msg)

check if received message should be accepted.

The following conditions are checked:

  • is server on the black-list?
  • are all requested options present?
  • is there requested IA option?
  • is there requested TA option?
  • is there requested PD option?
  • is requested PD option valid?
Parameters
msgserver's REPLY
Returns
true if REPLY is rejected
Todo:
Check if proper IAIDs are returned, also if all IA were answered (if requested several IAs were requested)
Todo:
Check all IA_NAs, not just first one
void TClntMsgSolicit::sortAnswers ( )

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