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

Encapsulates TLSA resource record data. More...

#include <DwmDnsRRDataTLSA.hh>

Inheritance diagram for Dwm::Dns::RRDataTLSA:
Collaboration diagram for Dwm::Dns::RRDataTLSA:

Public Member Functions

 RRDataTLSA ()
 Construct with an empty certificate association.
 
 RRDataTLSA (uint8_t certificateUsage, uint8_t selector, uint8_t matchingType, const std::string &certificateAssociation)
 Construct with the given certificateUsage, selector, matchingType and certificateAssociation. More...
 
bool operator== (const RRDataTLSA &tlsa) const
 Equal-to operator, mostly for unit testing.
 
uint8_t CertificateUsage () const
 Returns the contained certificate usage.
 
uint8_t CertificateUsage (uint8_t certificateUsage)
 Sets and returns the contained certificate usage.
 
uint8_t Selector () const
 Returns the contained selector.
 
uint8_t Selector (uint8_t selector)
 Sets and returns the contained selector.
 
uint8_t MatchingType () const
 Returns the contained matching type.
 
uint8_t MatchingType (uint8_t matchingType)
 Sets and returns the contained matching type.
 
const std::string & CertificateAssociation () const
 Returns the contained certificate association.
 
const std::string & CertificateAssociation (const std::string &certificateAssociation)
 Sets and returns the contained certificate association.
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the TLSA 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 TLSA resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 52
 

Friends

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

Detailed Description

Encapsulates TLSA resource record data.

See RFC6698 for details.

Constructor & Destructor Documentation

◆ RRDataTLSA()

Dwm::Dns::RRDataTLSA::RRDataTLSA ( uint8_t  certificateUsage,
uint8_t  selector,
uint8_t  matchingType,
const std::string &  certificateAssociation 
)

Construct with the given certificateUsage, selector, matchingType and certificateAssociation.

Member Function Documentation

◆ Decode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Encode()

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

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

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

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataTLSA tlsa 
)
friend

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


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