Encapsulates A resource record data. More...
#include <DwmDnsRRDataA.hh>


Public Member Functions | |
| RRDataA () | |
| Constructs an empty A record's data. | |
| RRDataA (const in_addr &inAddr) | |
Constructs an A record's data with the given IPv4 address inAddr. More... | |
| 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. | |
| const in_addr & | InAddr (const in_addr &inAddr) |
| Sets and 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. More... | |
| 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. More... | |
Static Public Attributes | |
| static const uint16_t | k_rrtype = 1 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const RRDataA &a) |
| Prints the A record data to an ostream in human readable form. | |
Encapsulates A resource record data.
See RFC1035 for details.
| Dwm::Dns::RRDataA::RRDataA | ( | const in_addr & | inAddr | ) |
Constructs an A record's data with the given IPv4 address inAddr.
|
virtual |
Decodes the A record data from buffer pkt of length pktlen, starting at ptr.
Returns the address immediately following the encoded A record data in pkt on success. Throws std::out_of_range if pkt was too short to contain the encoded A record data.
Implements Dwm::Dns::RRData.
|
virtual |
Encodes the A record data into buffer @ pkt of length pktlen, starting at ptr.
Returns the address immediately following the encoded A record data in pkt on success. Throws std::out_of_range if pkt is too short to contain the encoded A record data.
Implements Dwm::Dns::RRData.