|
PcapPlusPlus
19.12
|
Go to the documentation of this file. 1 #ifndef PACKETPP_DNS_LAYER
2 #define PACKETPP_DNS_LAYER
30 #if (BYTE_ORDER == LITTLE_ENDIAN)
52 #elif (BYTE_ORDER == BIG_ENDIAN)
190 bool removeQuery(
const std::string& queryNameToRemove,
bool exactMatch);
253 bool removeAnswer(
const std::string& answerNameToRemove,
bool exactMatch);
317 bool removeAuthority(
const std::string& authorityNameToRemove,
bool exactMatch);
444 using Layer::extendLayer;
445 bool extendLayer(
int offsetInLayer,
size_t numOfBytesToExtend,
IDnsResource* resource);
447 using Layer::shortenLayer;
448 bool shortenLayer(
int offsetInLayer,
size_t numOfBytesToShorten,
IDnsResource* resource);
450 IDnsResource* getResourceByName(
IDnsResource* startFrom,
size_t resourceCount,
const std::string& name,
bool exactMatch)
const;
452 void parseResources();
DnsQuery * getNextQuery(DnsQuery *query) const
OsiModelLayer
Definition: ProtocolType.h:224
size_t getHeaderLen() const
Definition: DnsLayer.h:419
bool removeQuery(const std::string &queryNameToRemove, bool exactMatch)
uint16_t opcode
Definition: DnsLayer.h:33
Definition: ProtocolType.h:239
uint16_t recursionDesired
Definition: DnsLayer.h:33
DnsClass
Definition: DnsLayerEnums.h:127
uint16_t authenticData
Definition: DnsLayer.h:33
uint16_t checkingDisabled
Definition: DnsLayer.h:33
Definition: DnsResourceData.h:39
dnshdr * getDnsHeader() const
Definition: DnsLayer.h:138
uint16_t authoritativeAnswer
Definition: DnsLayer.h:33
DnsResource * getFirstAuthority() const
uint16_t numberOfQuestions
Definition: DnsLayer.h:76
uint16_t numberOfAuthority
Definition: DnsLayer.h:80
DnsResource * getAdditionalRecord(const std::string &name, bool exactMatch) const
DnsResource * addAnswer(const std::string &name, DnsType dnsType, DnsClass dnsClass, uint32_t ttl, IDnsResourceData *data)
Definition: DnsResource.h:30
bool removeAdditionalRecord(const std::string &additionalRecordNameToRemove, bool exactMatch)
uint16_t responseCode
Definition: DnsLayer.h:33
DnsResource * getAnswer(const std::string &name, bool exactMatch) const
uint16_t recursionAvailable
Definition: DnsLayer.h:33
DnsQuery * getFirstQuery() const
bool removeAnswer(const std::string &answerNameToRemove, bool exactMatch)
uint16_t zero
Definition: DnsLayer.h:33
std::string toString() const
DnsResource * getAuthority(const std::string &name, bool exactMatch) const
uint16_t numberOfAnswers
Definition: DnsLayer.h:78
DnsResource * getNextAuthority(DnsResource *authority) const
size_t getAuthorityCount() const
DnsQuery * getQuery(const std::string &name, bool exactMatch) const
DnsResource * getFirstAnswer() const
OsiModelLayer getOsiModelLayer() const
Definition: DnsLayer.h:428
DnsType
Definition: DnsLayerEnums.h:15
static const std::map< uint16_t, bool > * getDNSPortMap()
size_t getAdditionalRecordCount() const
DnsResource * getNextAnswer(DnsResource *answer) const
The main namespace for the PcapPlusPlus lib.
DnsLayer & operator=(const DnsLayer &other)
size_t getQueryCount() const
bool removeAuthority(const std::string &authorityNameToRemove, bool exactMatch)
Definition: DnsLayer.h:26
DnsResource * addAdditionalRecord(const std::string &name, DnsType dnsType, DnsClass dnsClass, uint32_t ttl, IDnsResourceData *data)
DnsQuery * addQuery(const std::string &name, DnsType dnsType, DnsClass dnsClass)
uint16_t truncation
Definition: DnsLayer.h:33
DnsResourceType
Definition: DnsLayerEnums.h:145
void computeCalculateFields()
Definition: DnsLayer.h:424
uint16_t queryOrResponse
Definition: DnsLayer.h:33
Definition: DnsResource.h:128
size_t getAnswerCount() const
uint16_t transactionID
Definition: DnsLayer.h:29
DnsResource * getFirstAdditionalRecord() const
Definition: DnsResource.h:150
uint16_t numberOfAdditional
Definition: DnsLayer.h:82
DnsResource * getNextAdditionalRecord(DnsResource *additionalRecord) const
DnsResource * addAuthority(const std::string &name, DnsType dnsType, DnsClass dnsClass, uint32_t ttl, IDnsResourceData *data)
Definition: DnsLayer.h:99
void parseNextLayer()
Definition: DnsLayer.h:413