PcapPlusPlus
|
#include <DnsLayer.h>
Public Types | |
enum | ResourceType { DnsQuery = 0, DnsAnswer = 1, DnsAuthority = 2, DnsAdditional = 3 } |
Public Member Functions | |
DnsType | getDnsType () |
void | setDnsType (DnsType newType) |
DnsClass | getDnsClass () |
void | setDnsClass (DnsClass newClass) |
std::string | getName () |
bool | setName (const std::string &newName) |
virtual size_t | getSize ()=0 |
virtual ResourceType | getType ()=0 |
An abstract class for representing all types of DNS records. This class gives access to all available record data such as DNS type, class, name, type of record, etc. The DnsLayer holds an instance of (inherited type of) this class for each DNS record in the DNS packet
DnsClass pcpp::IDnsResource::getDnsClass | ( | ) |
DnsType pcpp::IDnsResource::getDnsType | ( | ) |
|
inline |
|
pure virtual |
Implemented in pcpp::DnsResource, and pcpp::DnsQuery.
|
pure virtual |
Implemented in pcpp::DnsResource, and pcpp::DnsQuery.
void pcpp::IDnsResource::setDnsClass | ( | DnsClass | newClass | ) |
Set DNS class for this record
[in] | newClass | The class to set |
void pcpp::IDnsResource::setDnsType | ( | DnsType | newType | ) |
Set DNS type for this record
[in] | newType | The type to set |
bool pcpp::IDnsResource::setName | ( | const std::string & | newName | ) |
Set the name of this record. Note the new name can be shorter or longer of the old name, so this method can cause the packet to be shorten or extended
[in] | newName | The name to set |