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

Encapsulates MINFO resource record data. More...

#include <DwmDnsRRDataMINFO.hh>

Inheritance diagram for Dwm::Dns::RRDataMINFO:
Collaboration diagram for Dwm::Dns::RRDataMINFO:

Public Member Functions

 RRDataMINFO ()
 Construct MINFO resource record data with empty RMAILBX and empty EMAILBX. More...
 
 RRDataMINFO (const std::string &rmailbx, const std::string &emailbx)
 Construct with the given rmailbx and emailbx.
 
bool operator== (const RRDataMINFO &minfo) const
 Equal-to operator, mostly for unit testing.
 
const std::string & Rmailbx () const
 Returns the contained RMAILBX.
 
const std::string & Rmailbx (const std::string &rmailbx)
 Sets and returns the contained RMAILBX.
 
const std::string & Emailbx () const
 Returns the contained EMAILBX.
 
const std::string & Emailbx (const std::string &emailbx)
 Sets and returns the contained EMAILBX.
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the MINFO 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 MINFO resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 14
 

Friends

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

Detailed Description

Encapsulates MINFO resource record data.

See RFC1035 for details.

Constructor & Destructor Documentation

◆ RRDataMINFO()

Dwm::Dns::RRDataMINFO::RRDataMINFO ( )

Construct MINFO resource record data with empty RMAILBX and empty EMAILBX.

Member Function Documentation

◆ Decode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Encode()

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

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

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

Implements Dwm::Dns::RRData.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataMINFO minfo 
)
friend

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


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