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

Encapsulates HINFO resource record data. More...

#include <DwmDnsRRDataHINFO.hh>

Inheritance diagram for Dwm::Dns::RRDataHINFO:
Collaboration diagram for Dwm::Dns::RRDataHINFO:

Public Member Functions

 RRDataHINFO ()
 Construct empty HINFO resource record data.
 
 RRDataHINFO (const std::string &cpu, const std::string &os)
 Construct with the given cpu and operating system os.
 
bool operator== (const RRDataHINFO &hinfo) const
 Equal-to operator, mostly for unit testing.
 
const std::string & Cpu () const
 Returns the CPU in the HINFO resource record data.
 
const std::string & Cpu (const std::string &cpu)
 Sets and returns the CPU in the HINFO resource record data.
 
const std::string & Os () const
 Returns the operating system in the HINFO resource record data.
 
const std::string & Os (const std::string &os)
 Sets and returns the operating system in the HINFO resource record data. More...
 
uint8_t * Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
 Encodes the HINFO 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 HINFO resource record data from buffer pkt of length pktlen, starting at ptr. More...
 

Static Public Attributes

static const uint16_t k_rrtype = 13
 

Friends

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

Detailed Description

Encapsulates HINFO resource record data.

See RFC1035 for details.

Member Function Documentation

◆ Decode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Encode()

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

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

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

Implements Dwm::Dns::RRData.

◆ Os()

const std::string& Dwm::Dns::RRDataHINFO::Os ( const std::string &  os)

Sets and returns the operating system in the HINFO resource record data.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RRDataHINFO hinfo 
)
friend

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


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