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

Encapsulates SMIMEA resource record data. More...

#include <DwmDnsRRDataSMIMEA.hh>

Inheritance diagram for Dwm::Dns::RRDataSMIMEA:
Collaboration diagram for Dwm::Dns::RRDataSMIMEA:

Public Member Functions

 RRDataSMIMEA ()
 Construct with an empty certificate association.
 
 RRDataSMIMEA (uint8_t certificateUsage, uint8_t selector, uint8_t matchingType, const std::string &certificateAssociation)
 Constrct with the given certificateUsage, selector, matchingTypecertificateAssociation. More...
 
bool operator== (const RRDataSMIMEA &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 SMIMEA 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 SMIMEA resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 53
 

Friends

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

Detailed Description

Encapsulates SMIMEA resource record data.

See RFC8162 for details.

Constructor & Destructor Documentation

◆ RRDataSMIMEA()

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

Constrct with the given certificateUsage, selector, matchingTypecertificateAssociation.

Member Function Documentation

◆ Decode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Encode()

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

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

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

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataSMIMEA smimea 
)
friend

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


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