|
PcapPlusPlus
20.08
|
Go to the documentation of this file. 1 #ifndef PACKETPP_DNS_LAYER
2 #define PACKETPP_DNS_LAYER
28 #if (BYTE_ORDER == LITTLE_ENDIAN)
50 #elif (BYTE_ORDER == BIG_ENDIAN)
188 bool removeQuery(
const std::string& queryNameToRemove,
bool exactMatch);
251 bool removeAnswer(
const std::string& answerNameToRemove,
bool exactMatch);
315 bool removeAuthority(
const std::string& authorityNameToRemove,
bool exactMatch);
432 static inline bool isDnsPort(uint16_t port);
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:233
size_t getHeaderLen() const
Definition: DnsLayer.h:417
bool removeQuery(const std::string &queryNameToRemove, bool exactMatch)
uint16_t opcode
Definition: DnsLayer.h:37
@ OsiModelApplicationLayer
Definition: ProtocolType.h:248
uint16_t recursionDesired
Definition: DnsLayer.h:31
DnsClass
Definition: DnsLayerEnums.h:127
uint16_t authenticData
Definition: DnsLayer.h:45
uint16_t checkingDisabled
Definition: DnsLayer.h:43
Definition: DnsResourceData.h:40
dnshdr * getDnsHeader() const
Definition: DnsLayer.h:136
uint16_t authoritativeAnswer
Definition: DnsLayer.h:35
DnsResource * getFirstAuthority() const
uint16_t numberOfQuestions
Definition: DnsLayer.h:74
uint16_t numberOfAuthority
Definition: DnsLayer.h:78
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:41
DnsResource * getAnswer(const std::string &name, bool exactMatch) const
uint16_t recursionAvailable
Definition: DnsLayer.h:49
DnsQuery * getFirstQuery() const
bool removeAnswer(const std::string &answerNameToRemove, bool exactMatch)
uint16_t zero
Definition: DnsLayer.h:47
std::string toString() const
DnsResource * getAuthority(const std::string &name, bool exactMatch) const
uint16_t numberOfAnswers
Definition: DnsLayer.h:76
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:426
DnsType
Definition: DnsLayerEnums.h:15
size_t getAdditionalRecordCount() const
DnsResource * getNextAnswer(DnsResource *answer) const
static bool isDnsPort(uint16_t port)
Definition: DnsLayer.h:464
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:24
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:422
uint16_t queryOrResponse
Definition: DnsLayer.h:39
Definition: DnsResource.h:128
size_t getAnswerCount() const
uint16_t transactionID
Definition: DnsLayer.h:27
DnsResource * getFirstAdditionalRecord() const
Definition: DnsResource.h:150
uint16_t numberOfAdditional
Definition: DnsLayer.h:80
DnsResource * getNextAdditionalRecord(DnsResource *additionalRecord) const
DnsResource * addAuthority(const std::string &name, DnsType dnsType, DnsClass dnsClass, uint32_t ttl, IDnsResourceData *data)
Definition: DnsLayer.h:97
void parseNextLayer()
Definition: DnsLayer.h:411