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

#include <OptUserClass.h>

+ Inheritance diagram for TOptUserClass:
+ Collaboration diagram for TOptUserClass:

Classes

struct  UserClassData

Public Member Functions

 TOptUserClass (uint16_t type, const char *buf, unsigned short buf_len, TMsg *parent)
 TOptUserClass (uint16_t type, TMsg *parent)
bool doDuties ()
size_t getSize ()
virtual bool isValid () const
bool parseUserData (const char *buf, unsigned short buf_len)
 parses UserData field
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)

Public Attributes

std::vector< UserClassDatauserClassData_

Protected Member Functions

char * storeUserData (char *buf)
- Protected Member Functions inherited from TOpt
int getSubOptSize ()
char * storeHeader (char *buf)
char * storeSubOpt (char *buf)

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

Constructor & Destructor Documentation

TOptUserClass::TOptUserClass ( uint16_t  type,
const char *  buf,
unsigned short  buf_len,
TMsg parent 
)
TOptUserClass::TOptUserClass ( uint16_t  type,
TMsg parent 
)

Member Function Documentation

bool TOptUserClass::doDuties ( )
inlinevirtual

Implements TOpt.

size_t TOptUserClass::getSize ( )
virtual

Return the size of the option, including :

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

Implements TOpt.

Reimplemented in TOptVendorClass.

bool TOptUserClass::isValid ( ) const
virtual

Validate the option

Returns
true if the option is valid.

Reimplemented from TOpt.

bool TOptUserClass::parseUserData ( const char *  buf,
unsigned short  buf_len 
)

parses UserData field

Returns
true if parsing was successful, false otherwise
char * TOptUserClass::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.

Reimplemented in TOptVendorClass.

char * TOptUserClass::storeUserData ( char *  buf)
protected

Member Data Documentation

std::vector<UserClassData> TOptUserClass::userClassData_

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