Encapsulates SRV resource record data. More...
#include <DwmDnsRRDataSRV.hh>


Public Member Functions | |
| RRDataSRV () | |
| Construct with an empty target. | |
| RRDataSRV (uint16_t priority, uint16_t weight, uint16_t port, const std::string &target) | |
Construct with the given priority, weight, port and target. More... | |
| bool | operator== (const RRDataSRV &srv) const |
| Equal-to operator. | |
| uint16_t | Priority () const |
| Returns the contained priority. | |
| uint16_t | Priority (uint16_t priority) |
| Sets and returns the contained priority. | |
| uint16_t | Weight () const |
| Returns the contained weight. | |
| uint16_t | Weight (uint16_t weight) |
| Sets and returns the contained weight. | |
| uint16_t | Port () const |
| Returns the contained port. | |
| uint16_t | Port (uint16_t port) |
| Sets and returns the contained port. | |
| const std::string & | Target () const |
| Returns the contained target. | |
| const std::string & | Target (const std::string &target) |
| Sets and returns the contained target. | |
| uint8_t * | Encode (uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const |
Encodes the SRV 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 SRV resource record data from buffer pkt of length pktlen, starting at ptr. More... | |
Static Public Attributes | |
| static const uint16_t | k_rrtype = 33 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const RRDataSRV &srv) |
| Print the SRV resource record data to an ostream in human readable form. More... | |
Encapsulates SRV resource record data.
See RFC 2782 for details.
| Dwm::Dns::RRDataSRV::RRDataSRV | ( | uint16_t | priority, |
| uint16_t | weight, | ||
| uint16_t | port, | ||
| const std::string & | target | ||
| ) |
Construct with the given priority, weight, port and target.
|
virtual |
Decodes the SRV resource record data from buffer pkt of length pktlen, starting at ptr.
Returns the address immediately following the encoded SRV resource record data in pkt on success. Throws std::out_of_range if pkt was too short to contain an encoded SRV resource record data.
Implements Dwm::Dns::RRData.
|
virtual |
Encodes the SRV resource record data into buffer @ pkt of length pktlen, starting at ptr.
Returns the address immediately following the encoded SRV resource record data in pkt on success. Throws std::out_of_range if pkt is too short to contain the encoded SRV resource record data.
Implements Dwm::Dns::RRData.
|
friend |
Print the SRV resource record data to an ostream in human readable form.