20 class IDnsResourceData;
21 class DnsResourceDataPtr;
37 size_t m_OffsetInLayer;
39 std::string m_DecodedName;
41 uint8_t* m_ExternalRawData;
47 size_t decodeName(
const char* encodedName,
char* result,
int iteration = 1);
48 void encodeName(
const std::string& decodedName,
char* result,
size_t& resultLen);
52 return m_NextResource;
56 m_NextResource = next;
59 uint8_t* getRawData()
const;
61 void setDnsLayer(
DnsLayer* dnsLayer,
size_t offsetInLayer);
101 return m_OffsetInLayer;
153 return m_NameLength + 2 *
sizeof(uint16_t);
175 m_ResourceType = resourceType;
262 return m_NameLength + 3 *
sizeof(uint16_t) +
sizeof(uint32_t) +
getDataLength();
266 return m_ResourceType;
Definition: DnsLayer.h:94
Definition: DnsResource.h:137
size_t getSize() const override
Definition: DnsResource.h:151
DnsResourceType getType() const override
Definition: DnsResource.h:155
Definition: DnsResourceData.h:87
Definition: DnsResource.h:166
void setTTL(uint32_t newTTL)
void setCustomDnsClass(uint16_t customValue)
size_t getSize() const override
Definition: DnsResource.h:260
uint16_t getCustomDnsClass() const
DnsResourceType getType() const override
Definition: DnsResource.h:264
size_t getDataOffset() const
size_t getDataLength() const
DnsResourceDataPtr getData() const
bool setData(IDnsResourceData *data)
Definition: DnsResourceData.h:28
Definition: DnsResource.h:30
void setDnsType(DnsType newType)
virtual DnsResourceType getType() const =0
const std::string & getName() const
Definition: DnsResource.h:91
virtual size_t getSize() const =0
DnsClass getDnsClass() const
size_t getNameOffset() const
Definition: DnsResource.h:99
void setDnsClass(DnsClass newClass)
DnsType getDnsType() const
bool setName(const std::string &newName)
The main namespace for the PcapPlusPlus lib.
DnsClass
Definition: DnsLayerEnums.h:126
DnsResourceType
Definition: DnsLayerEnums.h:143
@ DnsQueryType
Definition: DnsLayerEnums.h:145
DnsType
Definition: DnsLayerEnums.h:15