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

#include <OptOptionRequest.h>

+ Inheritance diagram for TOptOptionRequest:
+ Collaboration diagram for TOptOptionRequest:

Public Member Functions

 TOptOptionRequest (uint16_t code, TMsg *parent)
 TOptOptionRequest (uint16_t code, const char *buf, size_t size, TMsg *parent)
virtual ~TOptOptionRequest ()
void addOption (unsigned short optNr)
void clearOptions ()
int count ()
void delOption (unsigned short optNr)
virtual bool doDuties ()
virtual std::string getPlain ()
int getReqOpt (int optNr)
virtual size_t getSize ()
bool isOption (unsigned short optNr)
virtual 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 bool isValid () const
void setParent (TMsg *Parent)

Protected Attributes

int OptCnt
unsigned short * Options
- Protected Attributes inherited from TOpt
int OptType
TMsgParent
TOptContainer SubOptions
bool Valid

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)

Constructor & Destructor Documentation

TOptOptionRequest::TOptOptionRequest ( uint16_t  code,
TMsg parent 
)
TOptOptionRequest::TOptOptionRequest ( uint16_t  code,
const char *  buf,
size_t  size,
TMsg parent 
)
TOptOptionRequest::~TOptOptionRequest ( )
virtual

Member Function Documentation

void TOptOptionRequest::addOption ( unsigned short  optNr)
void TOptOptionRequest::clearOptions ( )
int TOptOptionRequest::count ( )
void TOptOptionRequest::delOption ( unsigned short  optNr)
virtual bool TOptOptionRequest::doDuties ( )
inlinevirtual

Implements TOpt.

Reimplemented in TRelOptEcho.

std::string TOptOptionRequest::getPlain ( )
virtual

Reimplemented from TOpt.

int TOptOptionRequest::getReqOpt ( int  optNr)
size_t TOptOptionRequest::getSize ( )
virtual

Return the size of the option, including :

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

Implements TOpt.

bool TOptOptionRequest::isOption ( unsigned short  optNr)
char * TOptOptionRequest::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

int TOptOptionRequest::OptCnt
protected
Todo:
: you're kidding me, right? Rewrite this ASAP
unsigned short* TOptOptionRequest::Options
protected

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