DwmDns-0.1.0
Dwm::Dns::RRDataRP Class Reference

Encapsulates RP resource record data. More...

#include <DwmDnsRRDataRP.hh>

Inheritance diagram for Dwm::Dns::RRDataRP:
Collaboration diagram for Dwm::Dns::RRDataRP:

Public Member Functions

 RRDataRP ()
 Construct with an empty MBOX and empty TXT.
 
 RRDataRP (const std::string &mbox, const std::string &txt)
 Construct with the given mbox and txt.
 
bool operator== (const RRDataRP &rp) const
 Equal-to operator, mostly for unit testing.
 
const std::string & Mbox () const
 Returns the contained mbox.
 
const std::string & Mbox (const std::string &mbox)
 Sets and returns the contained mbox.
 
const std::string & Txt () const
 Returns the contained txt.
 
const std::string & Txt (const std::string &txt)
 Sets and returns the contained txt.
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the RP 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 RP resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 17
 

Friends

std::ostream & operator<< (std::ostream &os, const RRDataRP &rp)
 Print the RP resource record data to an ostream in human readable form. More...
 

Detailed Description

Encapsulates RP resource record data.

See RFC1183 for details.

Member Function Documentation

◆ Decode()

const uint8_t* Dwm::Dns::RRDataRP::Decode ( const uint8_t *  pkt,
const uint8_t *  ptr,
uint16_t  pktlen,
uint16_t  rdlen 
)
virtual

Decodes the RP resource record data from buffer pkt of length pktlen, starting at ptr.

Returns the address immediately following the encoded RP resource record data in pkt on success. Throws std::out_of_range if pkt was too short to contain an encoded RP resource record data.

Implements Dwm::Dns::RRData.

◆ Encode()

uint8_t* Dwm::Dns::RRDataRP::Encode ( uint8_t *  pkt,
uint8_t *  ptr,
uint16_t  pktlen,
LabelPositions lps 
) const
virtual

Encodes the RP resource record data into buffer @ pkt of length pktlen, starting at ptr.

Returns the address immediately following the encoded RP resource record data in pkt on success. Throws std::out_of_range if pkt is too short to contain the encoded RP resource record data.

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataRP rp 
)
friend

Print the RP resource record data to an ostream in human readable form.


The documentation for this class was generated from the following file: