|
PcapPlusPlus
|
#include <DnsLayer.h>
Public Member Functions | |
| uint32_t | getTTL () |
| void | setTTL (uint32_t newTTL) |
| size_t | getDataLength () |
| std::string | getDataAsString () |
| bool | setData (const std::string &dataAsString) |
| uint16_t | getCustomDnsClass () |
| void | setCustomDnsClass (uint16_t customValue) |
| virtual size_t | getSize () |
| virtual ResourceType | getType () |
Public Member Functions inherited from pcpp::IDnsResource | |
| DnsType | getDnsType () |
| void | setDnsType (DnsType newType) |
| DnsClass | getDnsClass () |
| void | setDnsClass (DnsClass newClass) |
| std::string | getName () |
| bool | setName (const std::string &newName) |
Additional Inherited Members | |
Public Types inherited from pcpp::IDnsResource | |
| enum | ResourceType { DnsQuery = 0, DnsAnswer = 1, DnsAuthority = 2, DnsAdditional = 3 } |
Representing DNS record other than DNS query
| uint16_t pcpp::DnsResource::getCustomDnsClass | ( | ) |
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
| std::string pcpp::DnsResource::getDataAsString | ( | ) |
| size_t pcpp::DnsResource::getDataLength | ( | ) |
|
inlinevirtual |
Implements pcpp::IDnsResource.
| uint32_t pcpp::DnsResource::getTTL | ( | ) |
|
inlinevirtual |
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 | ( | const std::string & | dataAsString | ) |
Set resource data. Data is parse from string and is validated against the DNS type of the resource. For example: if DNS type is A and data isn't a valid IPv4 address a log error will be printed and the method will return false. This method currently supports the following DNS types:
| [in] | dataAsString | The string representation of the relevant data |
| void pcpp::DnsResource::setTTL | ( | uint32_t | newTTL | ) |
Set time-to-leave value for this record
| [in] | newTTL | The new TTL value to set |