42 #ifndef _DWMDNSRRDATASOA_HH_ 43 #define _DWMDNSRRDATASOA_HH_ 63 static const uint16_t k_rrtype = 6;
74 RRDataSOA(
const std::string & mname,
const std::string & rname,
75 uint32_t serial, uint32_t refresh, uint32_t retry,
76 uint32_t expire, uint32_t minimum);
86 const std::string &
Mname()
const;
91 const std::string &
Mname(
const std::string & mname);
96 const std::string &
Rname()
const;
101 const std::string &
Rname(
const std::string & rname);
111 uint32_t
Serial(uint32_t serial);
121 uint32_t
Refresh(uint32_t refresh);
126 uint32_t
Retry()
const;
131 uint32_t
Retry(uint32_t retry);
141 uint32_t
Expire(uint32_t expire);
151 uint32_t
Minimum(uint32_t minimum);
160 uint8_t *
Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen,
170 const uint8_t *
Decode(
const uint8_t *pkt,
const uint8_t *ptr,
171 uint16_t pktlen, uint16_t rdlen);
177 friend std::ostream &
operator << (std::ostream & os,
194 #endif // _DWMDNSRRDATANS_HH_ bool operator==(const RRDataSOA &soa) const
Equal-to operator, mostly for unit testing.
uint32_t Refresh() const
Returns the contained refresh.
uint32_t Expire() const
Returns the contained expire.
uint32_t Serial() const
Returns the contained serial.
uint32_t Minimum() const
Returns the contained minimum.
Definition: DwmDnsEtcHosts.hh:60
friend std::ostream & operator<<(std::ostream &os, const RRDataSOA &soa)
Print the SOA resource record data to an ostream in human readable form.
const uint8_t * Decode(const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
Decodes the SOA resource record data from buffer pkt of length pktlen, starting at ptr...
const std::string & Mname() const
Returns the contained MNAME.
uint32_t Retry() const
Returns the contained retry.
Dwm::Dns::RRData class definition.
Encapsulates SOA resource record data.
Definition: DwmDnsRRDataSOA.hh:59
RRDataSOA()
Construct with an empty MNAME and RNAME.
A helper class used when performing label sequence compression.
Definition: DwmDnsLabelPositions.hh:57
Abstract (pure virtual) base for resource record data classes.
Definition: DwmDnsRRData.hh:71
uint8_t * Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
Encodes the SOA resource record data into buffer @ pkt of length pktlen, starting at ptr...
const std::string & Rname() const
Returns the contained RNAME.