Encapsulates TXT resource record data. More...
#include <DwmDnsRRDataTXT.hh>


Public Member Functions | |
| RRDataTXT () | |
| Construct with empty data. | |
| RRDataTXT (const std::vector< std::string > &txt) | |
Construct with the given txt. | |
| bool | operator== (const RRDataTXT &txt) const |
| Equal-to operator, mostly for unit testing. | |
| const std::vector< std::string > & | Txt () const |
| Returns the contained TXT data. | |
| const std::vector< std::string > & | Txt (const std::vector< std::string > &txt) |
| Sets and returns the contained TXT data. | |
| uint8_t * | Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const |
Encodes the TXT 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 TXT resource record data from buffer pkt of length pktlen, starting at ptr. More... | |
Static Public Attributes | |
| static const uint16_t | k_rrtype = 16 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const RRDataTXT &txt) |
| Print the TXT resource record data to an ostream in human readable form. More... | |
Encapsulates TXT resource record data.
See RFC1035 for details.
|
virtual |
Decodes the TXT resource record data from buffer pkt of length pktlen, starting at ptr.
Returns the address immediately following the encoded TXT resource record data in pkt on success. Throws std::out_of_range if pkt was too short to contain an encoded TXT resource record data.
Implements Dwm::Dns::RRData.
|
virtual |
Encodes the TXT resource record data into buffer @ pkt of length pktlen, starting at ptr.
Returns the address immediately following the encoded TXT resource record data in pkt on success. Throws std::out_of_range if pkt is too short to contain the encoded TXT resource record data.
Implements Dwm::Dns::RRData.
|
friend |
Print the TXT resource record data to an ostream in human readable form.