42 #ifndef _DWMDNSRRDATAA_HH_ 43 #define _DWMDNSRRDATAA_HH_ 46 #include <netinet/in.h> 66 static const uint16_t k_rrtype = 1;
77 RRDataA(
const in_addr & inAddr);
87 const in_addr &
InAddr()
const;
92 const in_addr &
InAddr(
const in_addr & inAddr);
101 uint8_t *
Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen,
111 const uint8_t *
Decode(
const uint8_t *pkt,
const uint8_t *ptr,
112 uint16_t pktlen, uint16_t rdlen);
117 friend std::ostream &
operator << (std::ostream & os,
128 #endif // _DWMDNSRRDATAA_HH_ bool operator==(const RRDataA &a) const
Equal-to operator, for unit testing.
const in_addr & InAddr() const
Returns IPv4 address in the A record's data.
uint8_t * Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
Encodes the A record data into buffer @ pkt of length pktlen, starting at ptr.
RRDataA()
Constructs an empty A record's data.
Definition: DwmDnsEtcHosts.hh:60
const uint8_t * Decode(const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
Decodes the A record data from buffer pkt of length pktlen, starting at ptr.
Dwm::Dns::RRData class definition.
A helper class used when performing label sequence compression.
Definition: DwmDnsLabelPositions.hh:57
friend std::ostream & operator<<(std::ostream &os, const RRDataA &a)
Prints the A record data to an ostream in human readable form.
Abstract (pure virtual) base for resource record data classes.
Definition: DwmDnsRRData.hh:71
Encapsulates A resource record data.
Definition: DwmDnsRRDataA.hh:62