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

Encapsulates CAA resource record data. More...

#include <DwmDnsRRDataCAA.hh>

Inheritance diagram for Dwm::Dns::RRDataCAA:
Collaboration diagram for Dwm::Dns::RRDataCAA:

Public Member Functions

 RRDataCAA ()
 Default constructor.
 
 RRDataCAA (uint8_t flags, const std::string &tag, const std::string &value)
 Construct with the given flags, tag and value.
 
bool operator== (const RRDataCAA &caa) const
 Equal-to operator, mostly for unit testing.
 
uint8_t Flags () const
 Returns the flags in the CAA resource record data.
 
uint8_t Flags (uint8_t flags)
 Sets and returns the flags in the CAA resource record data.
 
const std::string & Tag () const
 Returns the tag in the CAA resource record data.
 
const std::string & Tag (const std::string &tag)
 Sets and returns the tag in the CAA resource record data.
 
const std::string & Value () const
 Returns the value in the CAA resource record data.
 
const std::string & Value (const std::string &value)
 Sets and returns the value in the CAA resource record data.
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the CAA 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 CAA resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 257
 

Friends

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

Detailed Description

Encapsulates CAA resource record data.

See RFC6844 for details.

Member Function Documentation

◆ Decode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Encode()

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

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

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

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataCAA caa 
)
friend

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


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