DwmDns-0.1.0
Dwm::Dns::RRDataNSEC3 Class Reference

Encapsulates NSEC3 resource record data. More...

#include <DwmDnsRRDataNSEC3.hh>

Inheritance diagram for Dwm::Dns::RRDataNSEC3:
Collaboration diagram for Dwm::Dns::RRDataNSEC3:

Public Member Functions

 RRDataNSEC3 ()
 Construct with empty salt, empty hashed owner name and empty bitmaps. More...
 
 RRDataNSEC3 (uint8_t hashAlgorithm, uint8_t flags, uint16_t iterations, const std::string &salt, const std::string &hashedOwnerName, const std::vector< NSECBitmap > &bitmaps)
 Construct with the given hashAlgorithm, flags, iterations, salt, hashedOwnerName and bitmaps. More...
 
bool operator== (const RRDataNSEC3 &nsec3) const
 Equal-to operator, mostly for unit testing.
 
uint8_t HashAlgorithm () const
 Returns the contained hash algorithm.
 
uint8_t HashAlgorithm (uint8_t hashAlgorithm)
 Sets and returns the contained hash algorithm.
 
uint8_t Flags () const
 Returns the contained flags.
 
uint8_t Flags (uint8_t flags)
 Sets and returns the contained flags.
 
uint16_t Iterations () const
 Returns the contained iterations.
 
uint16_t Iterations (uint16_t iterations)
 Sets and returns the contained iterations.
 
const std::string & Salt () const
 Returns the contained salt.
 
const std::string & Salt (const std::string &salt)
 Sets and returns the contained salt.
 
const std::string & HashedOwnerName () const
 Returns the contained hashed owner name.
 
const std::string & HashedOwnerName (const std::string &hashedOwnerName)
 Sets and returns the contained hashed owner name.
 
const std::vector< NSECBitmap > & Bitmaps () const
 Returns the contained bitmaps.
 
const std::vector< NSECBitmap > & Bitmaps (const std::vector< NSECBitmap > &bitmaps)
 Sets and returns the contained bitmaps.
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the NSEC3 resource record data into buffer @ pkt of length pktlen, starting at ptr. More...
 
const uint8_t * Decode (const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
 Decodes the NSEC3 resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 50
 

Friends

std::ostream & operator<< (std::ostream &os, const RRDataNSEC3 &nsec3)
 Print the NSEC3 resource record data to an ostream in human readable form. More...
 

Detailed Description

Encapsulates NSEC3 resource record data.

See RFC5155 for details.

Constructor & Destructor Documentation

◆ RRDataNSEC3() [1/2]

Dwm::Dns::RRDataNSEC3::RRDataNSEC3 ( )

Construct with empty salt, empty hashed owner name and empty bitmaps.

◆ RRDataNSEC3() [2/2]

Dwm::Dns::RRDataNSEC3::RRDataNSEC3 ( uint8_t  hashAlgorithm,
uint8_t  flags,
uint16_t  iterations,
const std::string &  salt,
const std::string &  hashedOwnerName,
const std::vector< NSECBitmap > &  bitmaps 
)

Construct with the given hashAlgorithm, flags, iterations, salt, hashedOwnerName and bitmaps.

Member Function Documentation

◆ Decode()

const uint8_t* Dwm::Dns::RRDataNSEC3::Decode ( const uint8_t *  pkt,
const uint8_t *  ptr,
uint16_t  pktlen,
uint16_t  rdlen 
)
virtual

Decodes the NSEC3 resource record data from buffer pkt of length pktlen, starting at ptr.

Returns the address immediately following the encoded NSEC3 resource record data in pkt on success. Throws std::out_of_range if pkt was too short to contain an encoded NSEC3 resource record data.

Implements Dwm::Dns::RRData.

◆ Encode()

uint8_t* Dwm::Dns::RRDataNSEC3::Encode ( uint8_t *  pkt,
uint8_t *  ptr,
uint16_t  pktlen,
LabelPositions lps 
) const
virtual

Encodes the NSEC3 resource record data into buffer @ pkt of length pktlen, starting at ptr.

Returns the address immediately following the encoded NSEC3 resource record data in pkt on success. Throws std::out_of_range if pkt is too short to contain the encoded NSEC3 resource record data.

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataNSEC3 nsec3 
)
friend

Print the NSEC3 resource record data to an ostream in human readable form.


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