PcapPlusPlus
22.11
|
#include <DnsResourceData.h>
Public Member Functions | |
virtual | ~IDnsResourceData () |
template<class IDnsResourceDataType > | |
bool | isTypeOf () const |
template<class IDnsResourceDataType > | |
IDnsResourceDataType * | castAs () |
virtual std::string | toString () const =0 |
virtual bool | toByteArr (uint8_t *arr, size_t &arrLength, IDnsResource *dnsResource) const =0 |
A wrapper class for storing DNS RR (resource record) data. This is the base class which introduces several abstract methods for derived classes to implement for setting and retrieving the stored data. Each derived class will store different type of DNS RR data and implement these methods accordingly (for example: IPv4/IPv6 addresses, MX data, hostnames, raw byte data etc.)
|
inlinevirtual |
A virtual d'tor, does nothing
|
inline |
A templated method which take a class that derives from IDnsResourceData as the template argument and tries to cast the current instance as that type
|
inline |
A templated method which takes a class that derives from IDnsResourceData as the template argument and checks whether this instance is of this type
|
pure 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 |
Implemented in pcpp::GenericDnsResourceData, pcpp::MxDnsResourceData, pcpp::IPv6DnsResourceData, pcpp::IPv4DnsResourceData, and pcpp::StringDnsResourceData.
|
pure virtual |
Implemented in pcpp::GenericDnsResourceData, pcpp::MxDnsResourceData, pcpp::IPv6DnsResourceData, pcpp::IPv4DnsResourceData, and pcpp::StringDnsResourceData.