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

#include <OptFQDN.h>

+ Inheritance diagram for TOptFQDN:
+ Collaboration diagram for TOptFQDN:

Public Member Functions

 TOptFQDN (const std::string &fqdn, TMsg *parent)
 TOptFQDN (const char *buf, int bufsize, TMsg *parent)
 ~TOptFQDN ()
bool doDuties ()
std::string getFQDN () const
bool getNFlag () const
bool getOFlag () const
virtual std::string getPlain ()
bool getSFlag () const
size_t getSize ()
 returns option size
bool isValid () const
void setNFlag (bool flag)
void setOFlag (bool flag)
void setSFlag (bool flag)
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)

Private Attributes

bool flag_N_
bool flag_O_
bool flag_S_
std::string fqdn_

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
TOptContainer SubOptions
bool Valid

Constructor & Destructor Documentation

TOptFQDN::TOptFQDN ( const std::string &  fqdn,
TMsg parent 


The FQDN is set and all flags are 0

fqdnThe FQDN about to be sent
parentThe message in which this option is included
TOptFQDN::TOptFQDN ( const char *  buf,
int  bufsize,
TMsg parent 


Build the option with a buffer received

bufthe buffer received, containing the whole option
bufsizethe size of the buffer
parentthe message in which this option is included

Destructor - Does actually nothing

Member Function Documentation

bool TOptFQDN::doDuties ( )

Implements TOpt.

Reimplemented in TClntOptFQDN, and TSrvOptFQDN.

std::string TOptFQDN::getFQDN ( ) const
bool TOptFQDN::getNFlag ( ) const
bool TOptFQDN::getOFlag ( ) const
std::string TOptFQDN::getPlain ( )

Reimplemented from TOpt.

bool TOptFQDN::getSFlag ( ) const
size_t TOptFQDN::getSize ( )

returns option size

Each dot will be removed from the string, and replaced with a length < 63 The first length and the final 0 will increased the fqdn string length by 2 We also have to add 4 for the header (option type and size) and 1 for the flags. 2 + 1 + 4 = 7

size of the option (without option header)

Implements TOpt.

bool TOptFQDN::isValid ( ) const

Validate the option

true if the option is valid.
Check the validity of this option

Reimplemented from TOpt.

void TOptFQDN::setNFlag ( bool  flag)
void TOptFQDN::setOFlag ( bool  flag)
void TOptFQDN::setSFlag ( bool  flag)
char * TOptFQDN::storeSelf ( char *  buf)

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

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

Implements TOpt.

Member Data Documentation

bool TOptFQDN::flag_N_
bool TOptFQDN::flag_O_
bool TOptFQDN::flag_S_
std::string TOptFQDN::fqdn_

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