PcapPlusPlus
Next
|
#include <DnsResource.h>
Public Member Functions | |
uint32_t | getTTL () const |
void | setTTL (uint32_t newTTL) |
size_t | getDataLength () const |
DnsResourceDataPtr | getData () const |
size_t | getDataOffset () const |
bool | setData (IDnsResourceData *data) |
uint16_t | getCustomDnsClass () const |
void | setCustomDnsClass (uint16_t customValue) |
size_t | getSize () const override |
DnsResourceType | getType () const override |
Public Member Functions inherited from pcpp::IDnsResource | |
DnsType | getDnsType () const |
void | setDnsType (DnsType newType) |
DnsClass | getDnsClass () const |
void | setDnsClass (DnsClass newClass) |
const std::string & | getName () const |
size_t | getNameOffset () const |
bool | setName (const std::string &newName) |
Representing DNS record other than DNS query
uint16_t pcpp::DnsResource::getCustomDnsClass | ( | ) | const |
Some records don't have a DNS class and the bytes used for storing the DNS class are used for other purpose. This method enables the user to receive these bytes
DnsResourceDataPtr pcpp::DnsResource::getData | ( | ) | const |
size_t pcpp::DnsResource::getDataLength | ( | ) | const |
size_t pcpp::DnsResource::getDataOffset | ( | ) | const |
|
inlineoverridevirtual |
Implements pcpp::IDnsResource.
uint32_t pcpp::DnsResource::getTTL | ( | ) | const |
|
inlineoverridevirtual |
Implements pcpp::IDnsResource.
void pcpp::DnsResource::setCustomDnsClass | ( | uint16_t | customValue | ) |
Some records don't have a DNS class and the bytes used for storing the DNS class are used for other purpose. This method enables the user to set these bytes
[in] | customValue | The value to set |
bool pcpp::DnsResource::setData | ( | IDnsResourceData * | data | ) |
Set resource data. The given IDnsResourceData input object is validated against the DNS type of the resource. For example: if DNS type is A and data isn't of type IPv4DnsResourceData (which contains the IPv4 address) a log error will be printed and the method will return false. This method currently supports the following DNS types:
[in] | data | The pointer to the data object, as described above |
void pcpp::DnsResource::setTTL | ( | uint32_t | newTTL | ) |
Set time-to-leave value for this record
[in] | newTTL | The new TTL value to set |