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

#include <OptIAAddress.h>

+ Inheritance diagram for TOptIAAddress:
+ Collaboration diagram for TOptIAAddress:

Public Member Functions

 TOptIAAddress (const char *addr, size_t len, TMsg *parent)
 TOptIAAddress (SPtr< TIPv6Addr > addr, unsigned long pref, unsigned long valid, TMsg *parent)
virtual bool doDuties ()
SPtr< TIPv6AddrgetAddr () const
unsigned long getPref () const
size_t getSize ()
unsigned long getValid () const
bool isValid () const
void setPref (unsigned long pref)
void setValid (unsigned long valid)
char * storeSelf (char *buf)
- 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 Attributes

SPtr< TIPv6AddrAddr_
unsigned long PrefLifetime_
bool Valid_
unsigned long ValidLifetime_

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 TOpt
int OptType
TMsgParent
TOptContainer SubOptions
bool Valid

Constructor & Destructor Documentation

TOptIAAddress::TOptIAAddress ( const char *  addr,
size_t  len,
TMsg parent 
)
TOptIAAddress::TOptIAAddress ( SPtr< TIPv6Addr addr,
unsigned long  pref,
unsigned long  valid,
TMsg parent 
)

Member Function Documentation

virtual bool TOptIAAddress::doDuties ( )
inlinevirtual

Implements TOpt.

Reimplemented in TSrvOptIAAddress, and TReqOptAddr.

SPtr< TIPv6Addr > TOptIAAddress::getAddr ( ) const
unsigned long TOptIAAddress::getPref ( ) const
size_t TOptIAAddress::getSize ( )
virtual

Return the size of the option, including :

  • Option number,
  • Option size
  • data
Returns
the size

Implements TOpt.

unsigned long TOptIAAddress::getValid ( ) const
bool TOptIAAddress::isValid ( ) const
virtual

Validate the option

Returns
true if the option is valid.

Reimplemented from TOpt.

void TOptIAAddress::setPref ( unsigned long  pref)
void TOptIAAddress::setValid ( unsigned long  valid)
char * TOptIAAddress::storeSelf ( char *  buf)
virtual

This method transform the instance of the option class into bytecode ready to be sent to the client or server, conform to the RFC

Parameters
bufThe address where to store the option
Returns
The address where the option ends

Implements TOpt.

Member Data Documentation

SPtr<TIPv6Addr> TOptIAAddress::Addr_
private
unsigned long TOptIAAddress::PrefLifetime_
private
bool TOptIAAddress::Valid_
private
unsigned long TOptIAAddress::ValidLifetime_
private

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