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

Encapsulates NSEC resource record data. More...

#include <DwmDnsRRDataNSEC.hh>

Inheritance diagram for Dwm::Dns::RRDataNSEC:
Collaboration diagram for Dwm::Dns::RRDataNSEC:

Public Member Functions

 RRDataNSEC ()
 Construct with empty next domain name and empty bitmaps.
 
 RRDataNSEC (const std::string &nextDomainName, const std::vector< NSECBitmap > &bitmaps)
 Construct with the given nextDomainName and bitmaps.
 
bool operator== (const RRDataNSEC &nsec) const
 Equal-to operator, mostly for unit testing.
 
const std::string & NextDomainName () const
 Returns the contained next domain name.
 
const std::string & NextDomainName (const std::string &domainName)
 Sets and returns the contained next domain 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 doman names.
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the NSEC 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 NSEC resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 47
 

Friends

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

Detailed Description

Encapsulates NSEC resource record data.

See RFC4034 for details.

Member Function Documentation

◆ Decode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Encode()

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

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

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

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataNSEC nsec 
)
friend

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


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