42 #ifndef _DWMDNSRRDATADS_HH_ 43 #define _DWMDNSRRDATADS_HH_ 63 static const uint16_t k_rrtype = 43;
65 static const uint8_t k_digestTypeReserved = 0;
66 static const uint8_t k_digestTypeSHA1 = 1;
68 static const uint8_t k_algorithmReserved = 0;
69 static const uint8_t k_algorithmRSAMD5 = 1;
70 static const uint8_t k_algorithmDH = 2;
71 static const uint8_t k_algorithmDSA = 3;
72 static const uint8_t k_algorithmECC = 4;
73 static const uint8_t k_algorithmRSASHA1 = 5;
74 static const uint8_t k_algorithmINDIRECT = 252;
75 static const uint8_t k_algorithmPRIVATEDNS = 253;
76 static const uint8_t k_algorithmPRIVATEOID = 254;
87 RRDataDS(uint16_t keyTag, uint8_t algorithm, uint8_t digestType,
88 const std::string & digest);
103 uint16_t
KeyTag(uint16_t keyTag);
128 const std::string &
Digest()
const;
133 const std::string &
Digest(
const std::string & digest);
142 uint8_t *
Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen,
152 const uint8_t *
Decode(
const uint8_t *pkt,
const uint8_t *ptr,
153 uint16_t pktlen, uint16_t rdlen);
159 friend std::ostream &
operator << (std::ostream & os,
173 #endif // _DWMDNSRRDATADS_HH_ uint16_t KeyTag() const
Returns the key tag in the DS resource record data.
friend std::ostream & operator<<(std::ostream &os, const RRDataDS &ds)
Print the DS resource record data to an ostream in human readable form.
uint8_t * Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
Encodes the DS resource record data into buffer @ pkt of length pktlen, starting at ptr...
uint8_t DigestType() const
Returns the digest type in the DS resource record data.
Definition: DwmDnsEtcHosts.hh:60
RRDataDS()
Constructs an empty DS resource record data object.
bool operator==(const RRDataDS &ds) const
Equal-to operator, mostly for unit testing.
Dwm::Dns::RRData class definition.
const uint8_t * Decode(const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
Decodes the DS resource record data from buffer pkt of length pktlen, starting at ptr...
const std::string & Digest() const
Returns the digest in the DS resource record data.
A helper class used when performing label sequence compression.
Definition: DwmDnsLabelPositions.hh:57
uint8_t Algorithm() const
Returns the algorithm in the DS resource record data.
Abstract (pure virtual) base for resource record data classes.
Definition: DwmDnsRRData.hh:71
Encapsulates DS resource record data.
Definition: DwmDnsRRDataDS.hh:59