PcapPlusPlus
22.11
|
#include <DnsResourceData.h>
Public Member Functions | |
StringDnsResourceData (const std::string &data) | |
bool | operator== (const StringDnsResourceData &other) const |
std::string | toString () const |
bool | toByteArr (uint8_t *arr, size_t &arrLength, IDnsResource *dnsResource) const |
Public Member Functions inherited from pcpp::IDnsResourceData | |
virtual | ~IDnsResourceData () |
template<class IDnsResourceDataType > | |
bool | isTypeOf () const |
template<class IDnsResourceDataType > | |
IDnsResourceDataType * | castAs () |
A class that represents DNS RR string data, mainly used in DNS RRs that store hostnames (like CNAME, DNAME, NS, etc.)
|
inline |
A c'tor for this class
[in] | data | The string data to store in this object. If this string represents a hostname it's possible to include a pointer to another string in the DNS layer (as explained here: http://www.zytrax.com/books/dns/ch15/#name). These pointers are often used to reduce the DNS packet size and avoid unnecessary duplications. The way to include pointers in a hostname string is to use the following format: 'some.domain.#{offset}' where '#{offset}' is the offset from the start of the DNS layer. For example: if the string 'yahoo.com' already appears in offset 12 in the packet and you want to set the DNS RR data as 'my.subdomain.yahoo.com' you may use the following string: 'my.subdomain.#12'. This will result in writing 'my.subdomain' and a pointer to offset 12 |
|
inline |
Equality operator overload for this class that compares the strings stored in each object
[in] | other | The object to compare with |
|
virtual |
Convert the DNS RR data into a byte array
[out] | arr | A pointer to a pre-allocated byte array where the result will be written to |
[out] | arrLength | A reference to a 2-byte number where the result array length will be written to |
[in] | dnsResource | A pointer to a DNS resource object where this DNS RR data will be stored |
Implements pcpp::IDnsResourceData.
|
inlinevirtual |
Implements pcpp::IDnsResourceData.