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);
102 return m_OffsetInLayer;
155 return m_NameLength + 2 *
sizeof(uint16_t);
177 m_ResourceType = resourceType;
265 return m_NameLength + 3 *
sizeof(uint16_t) +
sizeof(uint32_t) +
getDataLength();
269 return m_ResourceType;
Definition: DnsLayer.h:94
Definition: DnsResource.h:138
virtual DnsResourceType getType() const
Definition: DnsResource.h:157
virtual size_t getSize() const
Definition: DnsResource.h:153
Definition: DnsResourceData.h:88
Definition: DnsResource.h:168
void setTTL(uint32_t newTTL)
virtual size_t getSize() const
Definition: DnsResource.h:263
void setCustomDnsClass(uint16_t customValue)
uint16_t getCustomDnsClass() const
size_t getDataOffset() const
size_t getDataLength() const
DnsResourceDataPtr getData() const
bool setData(IDnsResourceData *data)
virtual DnsResourceType getType() const
Definition: DnsResource.h:267
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:92
virtual size_t getSize() const =0
DnsClass getDnsClass() const
size_t getNameOffset() const
Definition: DnsResource.h:100
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