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

#include <OptVendorSpecInfo.h>

+ Inheritance diagram for TOptVendorSpecInfo:
+ Collaboration diagram for TOptVendorSpecInfo:

Public Member Functions

 TOptVendorSpecInfo (uint16_t type, char *buf, int n, TMsg *parent)
 TOptVendorSpecInfo (uint16_t code, uint32_t enterprise, uint16_t sub_option_code, const char *data, int dataLen, TMsg *parent)
 TOptVendorSpecInfo (uint16_t code, uint32_t enterprise, uint16_t sub_option_code, SPtr< TIPv6Addr > addr, TMsg *parent)
 TOptVendorSpecInfo (uint16_t code, uint32_t enterprise, uint16_t sub_option_code, const std::string &str, TMsg *parent)
 ~TOptVendorSpecInfo ()
bool doDuties ()
virtual std::string getPlain ()
size_t getSize ()
uint32_t getVendor ()
virtual bool isValid () const
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 ()
void setParent (TMsg *Parent)

Protected Member Functions

void createSuboption (uint16_t sub_option_code, const char *data, size_t data_len)
 utility function that appends sub-option with specified code and data
- Protected Member Functions inherited from TOpt
int getSubOptSize ()
char * storeHeader (char *buf)
char * storeSubOpt (char *buf)

Protected Attributes

uint32_t Vendor_
- 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

Constructor & Destructor Documentation

TOptVendorSpecInfo::TOptVendorSpecInfo ( uint16_t  type,
char *  buf,
int  n,
TMsg parent 
)
TOptVendorSpecInfo::TOptVendorSpecInfo ( uint16_t  code,
uint32_t  enterprise,
uint16_t  sub_option_code,
const char *  data,
int  dataLen,
TMsg parent 
)
TOptVendorSpecInfo::TOptVendorSpecInfo ( uint16_t  code,
uint32_t  enterprise,
uint16_t  sub_option_code,
SPtr< TIPv6Addr addr,
TMsg parent 
)
TOptVendorSpecInfo::TOptVendorSpecInfo ( uint16_t  code,
uint32_t  enterprise,
uint16_t  sub_option_code,
const std::string &  str,
TMsg parent 
)
TOptVendorSpecInfo::~TOptVendorSpecInfo ( )

Member Function Documentation

void TOptVendorSpecInfo::createSuboption ( uint16_t  sub_option_code,
const char *  data,
size_t  data_len 
)
protected

utility function that appends sub-option with specified code and data

Parameters
sub_option_codethe code of suboption to be added
dataspecifies sub-option length
data_lenpointer to the sub-option data
bool TOptVendorSpecInfo::doDuties ( )
inlinevirtual

Implements TOpt.

std::string TOptVendorSpecInfo::getPlain ( )
virtual

Reimplemented from TOpt.

size_t TOptVendorSpecInfo::getSize ( )
virtual

Return the size of the option, including :

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

Implements TOpt.

uint32_t TOptVendorSpecInfo::getVendor ( )
bool TOptVendorSpecInfo::isValid ( ) const
virtual

Validate the option

Returns
true if the option is valid.

Reimplemented from TOpt.

char * TOptVendorSpecInfo::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

uint32_t TOptVendorSpecInfo::Vendor_
protected

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