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

#include <OptAuthentication.h>

+ Inheritance diagram for TOptAuthentication:
+ Collaboration diagram for TOptAuthentication:

Public Member Functions

 TOptAuthentication (AuthProtocols proto, uint8_t algo, AuthReplay rdm, TMsg *parent)
 TOptAuthentication (char *buf, size_t buflen, TMsg *parent)
bool doDuties ()
uint8_t getAlgorithm () const
char * getAuthDataPtr () const
void getPayload (std::vector< uint8_t > &data)
AuthProtocols getProto () const
AuthReplay getRDM () const
uint64_t getReplayDetection ()
size_t getSize ()
uint32_t getSPI () const
void setAuthInfoLen (uint16_t len)
void setDigestType (DigestTypes type)
void setPayload (const std::vector< uint8_t > &data)
void setRDM (AuthReplay value)
void setRealm (const std::string &realm)
void setReplayDetection (uint64_t value)
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 ()
virtual bool isValid () const
void setParent (TMsg *Parent)

Static Public Attributes

static const size_t OPT_AUTH_FIXED_SIZE = 11
- Static Public Attributes inherited from TOpt
static const size_t OPTION6_HDR_LEN = 4
 length of a DHCPv6 option header

Private Attributes

uint8_t algo_
char * authDataPtr_
uint16_t AuthInfoLen_
std::vector< uint8_t > data_
 auth data (specific to a given proto)
AuthProtocols proto_
AuthReplay rdm_
std::string realm_
 auth realm (used in delayed-auth)
uint64_t replay_

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.
- 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

TOptAuthentication::TOptAuthentication ( AuthProtocols  proto,
uint8_t  algo,
AuthReplay  rdm,
TMsg parent 
)
TOptAuthentication::TOptAuthentication ( char *  buf,
size_t  buflen,
TMsg parent 
)

Member Function Documentation

bool TOptAuthentication::doDuties ( )
virtual

Implements TOpt.

uint8_t TOptAuthentication::getAlgorithm ( ) const
char* TOptAuthentication::getAuthDataPtr ( ) const
inline
void TOptAuthentication::getPayload ( std::vector< uint8_t > &  data)
AuthProtocols TOptAuthentication::getProto ( ) const
AuthReplay TOptAuthentication::getRDM ( ) const
uint64_t TOptAuthentication::getReplayDetection ( )
size_t TOptAuthentication::getSize ( )
virtual

Return the size of the option, including :

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

Implements TOpt.

uint32_t TOptAuthentication::getSPI ( ) const
Todo:
: remove this
void TOptAuthentication::setAuthInfoLen ( uint16_t  len)
void TOptAuthentication::setDigestType ( DigestTypes  type)
void TOptAuthentication::setPayload ( const std::vector< uint8_t > &  data)
void TOptAuthentication::setRDM ( AuthReplay  value)
void TOptAuthentication::setRealm ( const std::string &  realm)
void TOptAuthentication::setReplayDetection ( uint64_t  value)
char * TOptAuthentication::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

uint8_t TOptAuthentication::algo_
private
char* TOptAuthentication::authDataPtr_
private
uint16_t TOptAuthentication::AuthInfoLen_
private
std::vector<uint8_t> TOptAuthentication::data_
private

auth data (specific to a given proto)

const size_t TOptAuthentication::OPT_AUTH_FIXED_SIZE = 11
static
AuthProtocols TOptAuthentication::proto_
private
AuthReplay TOptAuthentication::rdm_
private
std::string TOptAuthentication::realm_
private

auth realm (used in delayed-auth)

uint64_t TOptAuthentication::replay_
private

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