42 #ifndef _DWMDNSRRDATAURI_HH_ 43 #define _DWMDNSRRDATAURI_HH_ 63 static const uint16_t k_rrtype = 256;
73 RRDataURI(uint16_t priority, uint16_t weight,
74 const std::string & target);
89 uint16_t
Priority(uint16_t priority);
99 uint16_t
Weight(uint16_t weight);
104 const std::string &
Target()
const;
109 const std::string &
Target(
const std::string & target);
118 uint8_t *
Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen,
128 const uint8_t *
Decode(
const uint8_t *pkt,
const uint8_t *ptr,
129 uint16_t pktlen, uint16_t rdlen);
135 friend std::ostream &
operator << (std::ostream & os,
148 #endif // _DWMDNSRRDATAURI_HH_ uint8_t * Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
Encodes the URI resource record data into buffer @ pkt of length pktlen, starting at ptr...
bool operator==(const RRDataURI &srv) const
Equal-to operator, mostly for unit testing.
const std::string & Target() const
Returns the contained target.
uint16_t Priority() const
Returns the contained priority.
Encapsulates URI resource record data.
Definition: DwmDnsRRDataURI.hh:59
RRDataURI()
Construct with an empty target.
uint16_t Weight() const
Returns the contained weight.
Definition: DwmDnsEtcHosts.hh:60
friend std::ostream & operator<<(std::ostream &os, const RRDataURI &uri)
Print the URI resource record data to an ostream in human readable form.
Dwm::Dns::RRData class definition.
const uint8_t * Decode(const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
Decodes the URI resource record data from buffer pkt of length pktlen, starting at ptr...
A helper class used when performing label sequence compression.
Definition: DwmDnsLabelPositions.hh:57
Abstract (pure virtual) base for resource record data classes.
Definition: DwmDnsRRData.hh:71