42 #ifndef _DWMDNSRRDATAMX_HH_ 43 #define _DWMDNSRRDATAMX_HH_ 63 static const uint16_t k_rrtype = 15;
73 RRDataMX(uint16_t preference,
const std::string & exchange);
93 const std::string &
Exchange()
const;
98 const std::string &
Exchange(
const std::string & exchange);
107 uint8_t *
Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen,
117 const uint8_t *
Decode(
const uint8_t *pkt,
const uint8_t *ptr,
118 uint16_t pktlen, uint16_t rdlen);
124 friend std::ostream &
operator << (std::ostream & os,
128 uint16_t _preference;
129 std::string _exchange;
136 #endif // _DWMDNSRRDATAMX_HH_ const std::string & Exchange() const
Returns the exchange in the MX resource record data.
Encapsulates MX resource record data.
Definition: DwmDnsRRDataMX.hh:59
friend std::ostream & operator<<(std::ostream &os, const RRDataMX &mx)
Print the MX resource record data to an ostream in human readable form.
uint8_t * Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
Encodes the MX resource record data into buffer @ pkt of length pktlen, starting at ptr...
const uint8_t * Decode(const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
Decodes the MX resource record data from buffer pkt of length pktlen, starting at ptr...
RRDataMX()
Construct with an empty exchange with preference 0.
Definition: DwmDnsEtcHosts.hh:60
Dwm::Dns::RRData class definition.
A helper class used when performing label sequence compression.
Definition: DwmDnsLabelPositions.hh:57
uint16_t Preference() const
Returns the preference in the MX resource record data.
bool operator==(const RRDataMX &mx) const
Equal-to operator, mostly for unit testing.
Abstract (pure virtual) base for resource record data classes.
Definition: DwmDnsRRData.hh:71