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

#include <ClntOptIA_NA.h>

+ Inheritance diagram for TClntOptIA_NA:
+ Collaboration diagram for TClntOptIA_NA:

Public Member Functions

 TClntOptIA_NA (SPtr< TClntCfgIA > ClntCfgIA, TMsg *parent)
 TClntOptIA_NA (SPtr< TAddrIA > AddrIA, TMsg *parent)
 TClntOptIA_NA (SPtr< TAddrIA > clntAddrIA, bool zeroTimes, TMsg *parent)
 TClntOptIA_NA (SPtr< TClntCfgIA > ClntCfgIA, SPtr< TAddrIA > ClntaddrIA, TMsg *parent)
 TClntOptIA_NA (char *buf, int bufsize, TMsg *parent)
 ~TClntOptIA_NA ()
int countAddr ()
bool doDuties ()
void firstAddr ()
SPtr< TOptIAAddressgetAddr ()
SPtr< TOptIAAddressgetAddr (SPtr< TIPv6Addr > addr)
int getStatusCode ()
bool isValid () const
void setContext (SPtr< TDUID > srvDuid, SPtr< TIPv6Addr > srvAddr, int iface)
void setIface (int iface)
- Public Member Functions inherited from TOptIA_NA
 TOptIA_NA (long IAID, long t1, long t2, TMsg *parent)
 TOptIA_NA (char *&buf, int &bufsize, TMsg *parent)
int countAddrs ()
unsigned long getMaxValid ()
size_t getSize ()
char * storeSelf (char *buf)
- Public Member Functions inherited from TOptIA
 TOptIA (uint16_t type, uint32_t iaid, uint32_t t1, uint32_t t2, TMsg *parent)
 TOptIA (uint16_t type, TMsg *parent)
unsigned long getIAID () const
unsigned long getT1 () const
unsigned long getT2 () const
void setIAID (uint32_t iaid)
void setT1 (unsigned long t1)
void setT2 (unsigned long t2)
- Public Member Functions inherited from TOpt
 TOpt (int optType, TMsg *parent)
virtual ~TOpt ()
void addOption (TOptPtr opt)
int countOption ()
void delAllOptions ()
bool delOption (uint16_t type)
 Deletes all specified options of that type.
void firstOption ()
TOptPtr getOption (int type)
TOptPtr getOption ()
int getOptType ()
virtual std::string getPlain ()
void setParent (TMsg *Parent)

Private Member Functions

int countValidAddrs (SPtr< TAddrIA > ptrAddrIA)
void releaseAddr (long IAID, SPtr< TIPv6Addr > addr)

Private Attributes

SPtr< TIPv6AddrAddr
SPtr< TDUIDDUID
int Iface_

Additional Inherited Members

- Public Types inherited from TOpt
enum  EOptionLayout {
  Layout_Addr, Layout_AddrLst, Layout_String, Layout_StringLst,
  Layout_Duid, Layout_Generic
}
- Static Public Member Functions inherited from TOpt
static TOptPtr getOption (const TOptList &list, uint16_t opt_type)
static bool parseOptions (TOptContainer &options, const char *buf, size_t len, TMsg *parent, uint16_t placeId=0, std::string place="option")
 Parses options or suboptions, creates appropriate objects and store them in options container.
- Static Public Attributes inherited from TOpt
static const size_t OPTION6_HDR_LEN = 4
 length of a DHCPv6 option header
- Protected Member Functions inherited from TOpt
int getSubOptSize ()
char * storeHeader (char *buf)
char * storeSubOpt (char *buf)
- Protected Attributes inherited from TOptIA
unsigned long IAID_
unsigned long T1_
unsigned long T2_
bool Valid_

Constructor & Destructor Documentation

TClntOptIA_NA::TClntOptIA_NA ( SPtr< TClntCfgIA ClntCfgIA,
TMsg parent 
)
Todo:
: WTF? Why there are 5 different constructors??? There should be 2 or 3.

Used in SOLICIT constructor

Parameters
ClntCfgIA
parent
TClntOptIA_NA::TClntOptIA_NA ( SPtr< TAddrIA addrIA,
TMsg parent 
)

Used in DECLINE, RENEW and RELEASE

Parameters
addrIA
parent
TClntOptIA_NA::TClntOptIA_NA ( SPtr< TAddrIA clntAddrIA,
bool  zeroTimes,
TMsg parent 
)

Used in CONFIRM constructor

Parameters
clntAddrIA
zeroTimes
parent
TClntOptIA_NA::TClntOptIA_NA ( SPtr< TClntCfgIA ClntCfgIA,
SPtr< TAddrIA ClntaddrIA,
TMsg parent 
)

Used in REQUEST constructor

Parameters
ClntCfgIA
ClntaddrIA
parent
Todo:
: keep allocated address in TAddrClient
TClntOptIA_NA::TClntOptIA_NA ( char *  buf,
int  bufsize,
TMsg parent 
)

Used to create object from received message

Parameters
buf
bufsize
parent
TClntOptIA_NA::~TClntOptIA_NA ( )

Member Function Documentation

int TClntOptIA_NA::countAddr ( )
int TClntOptIA_NA::countValidAddrs ( SPtr< TAddrIA ptrAddrIA)
private
Todo:
: A) check if they repeats (possible with maliciious server)
bool TClntOptIA_NA::doDuties ( )
virtual

Implements TOpt.

void TClntOptIA_NA::firstAddr ( )
SPtr< TOptIAAddress > TClntOptIA_NA::getAddr ( )
SPtr< TOptIAAddress > TClntOptIA_NA::getAddr ( SPtr< TIPv6Addr addr)

memcmp(optAddr->getAddr(),addr,16)

int TClntOptIA_NA::getStatusCode ( )

Reimplemented from TOptIA.

bool TClntOptIA_NA::isValid ( ) const
virtual

Validate the option

Returns
true if the option is valid.

Reimplemented from TOptIA_NA.

void TClntOptIA_NA::releaseAddr ( long  IAID,
SPtr< TIPv6Addr addr 
)
private
void TClntOptIA_NA::setContext ( SPtr< TDUID srvDuid,
SPtr< TIPv6Addr srvAddr,
int  iface 
)
void TClntOptIA_NA::setIface ( int  iface)

Member Data Documentation

SPtr<TIPv6Addr> TClntOptIA_NA::Addr
private
SPtr<TDUID> TClntOptIA_NA::DUID
private
int TClntOptIA_NA::Iface_
private

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