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

Encapsulates RRSIG resource record data. More...

#include <DwmDnsRRDataRRSIG.hh>

Inheritance diagram for Dwm::Dns::RRDataRRSIG:
Collaboration diagram for Dwm::Dns::RRDataRRSIG:

Public Member Functions

 RRDataRRSIG ()
 Construct with empty signer's name and signature.
 
 RRDataRRSIG (uint16_t typeCovered, uint8_t algorithm, uint8_t labels, uint32_t originalTTL, uint32_t signatureExpiration, uint32_t signatureInception, uint16_t keyTag, const std::string &signersName, const std::string &signature)
 Construct with the given typeCovered, algorithm, labels, originalTTL, signatureExpiration, signatureInception, keyTag, signersName and signature. More...
 
bool operator== (const RRDataRRSIG &rrsig) const
 Equal-to operator, mostly for unit testing.
 
uint16_t TypeCovered () const
 Returns the contained type covered.
 
uint16_t TypeCovered (uint16_t typeCovered)
 Sets and returns the contained type covered.
 
uint8_t Algorithm () const
 Returns the contained algorithm.
 
uint8_t Algorithm (uint8_t algorithm)
 Sets and returns the contained algorithm.
 
uint8_t Labels () const
 Returns the contained labels.
 
uint8_t Labels (uint8_t labels)
 Sets and returns the contained labels.
 
uint32_t OriginalTTL () const
 Returns the contained original TTL.
 
uint32_t OriginalTTL (uint32_t originalTTL)
 Sets and returns the contained original TTL.
 
uint32_t SignatureExpiration () const
 Returns the contained signature expiration.
 
uint32_t SignatureExpiration (uint32_t signatureExpiration)
 Sets and returns the contained signature expiration.
 
uint32_t SignatureInception () const
 Returns the contained signature inception.
 
uint32_t SignatureInception (uint32_t signatureInception)
 Sets and returns the contained signature inception.
 
uint16_t KeyTag () const
 Returns the contained key tag.
 
uint16_t KeyTag (uint16_t keyTag)
 Sets and returns the contained key tag.
 
const std::string & SignersName () const
 Returns the contained signer's name.
 
const std::string & SignersName (const std::string &signersName)
 Sets and returns the contained signer's name.
 
const std::string & Signature () const
 Returns the contained signature.
 
const std::string & Signature (const std::string &signature)
 Sets and returns the contained signature.
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the RRSIG 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 RRSIG resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Member Functions

static std::string AlgorithmName (uint8_t algo)
 Returns the mnemonic for the given algorithm algo. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 46
 
static constexpr uint8_t k_algoRSAMD5 = 1
 
static constexpr uint8_t k_algoDH = 2
 
static constexpr uint8_t k_algoDSA = 3
 
static constexpr uint8_t k_algoECC = 4
 
static constexpr uint8_t k_algoRSASHA1 = 5
 
static constexpr uint8_t k_algoINDIRECT = 252
 
static constexpr uint8_t k_algoPRIVATEDNS = 253
 
static constexpr uint8_t k_algoPRIVATEOID = 254
 

Friends

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

Detailed Description

Encapsulates RRSIG resource record data.

See RFC4034 for details.

Constructor & Destructor Documentation

◆ RRDataRRSIG()

Dwm::Dns::RRDataRRSIG::RRDataRRSIG ( uint16_t  typeCovered,
uint8_t  algorithm,
uint8_t  labels,
uint32_t  originalTTL,
uint32_t  signatureExpiration,
uint32_t  signatureInception,
uint16_t  keyTag,
const std::string &  signersName,
const std::string &  signature 
)

Construct with the given typeCovered, algorithm, labels, originalTTL, signatureExpiration, signatureInception, keyTag, signersName and signature.

Member Function Documentation

◆ AlgorithmName()

static std::string Dwm::Dns::RRDataRRSIG::AlgorithmName ( uint8_t  algo)
static

Returns the mnemonic for the given algorithm algo.

If algo is an algorithm we do not recognize, returns a string representation of algo.

◆ Decode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Encode()

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

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

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

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataRRSIG rrsig 
)
friend

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

Member Data Documentation

◆ k_algoDH

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoDH = 2
static

Known algorithm (from RFC4034 Appendix A.1)

◆ k_algoDSA

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoDSA = 3
static

Known algorithm (from RFC4034 Appendix A.1)

◆ k_algoECC

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoECC = 4
static

Known algorithm (from RFC4034 Appendix A.1)

◆ k_algoINDIRECT

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoINDIRECT = 252
static

Known algorithm (from RFC4034 Appendix A.1)

◆ k_algoPRIVATEDNS

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoPRIVATEDNS = 253
static

Known algorithm (from RFC4034 Appendix A.1)

◆ k_algoPRIVATEOID

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoPRIVATEOID = 254
static

Known algorithm (from RFC4034 Appendix A.1)

◆ k_algoRSAMD5

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoRSAMD5 = 1
static

Known algorithm (from RFC4034 Appendix A.1)

◆ k_algoRSASHA1

constexpr uint8_t Dwm::Dns::RRDataRRSIG::k_algoRSASHA1 = 5
static

Known algorithm (from RFC4034 Appendix A.1)


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