|
PcapPlusPlus
19.12
|
Go to the documentation of this file. 1 #ifndef PACKETPP_DNS_RESOURCE
2 #define PACKETPP_DNS_RESOURCE
21 class IDnsResourceData;
22 class DnsResourceDataPtr;
38 size_t m_OffsetInLayer;
40 std::string m_DecodedName;
42 uint8_t* m_ExternalRawData;
48 size_t decodeName(
const char* encodedName,
char* result,
int iteration = 1);
49 void encodeName(
const std::string& decodedName,
char* result,
size_t& resultLen);
51 IDnsResource* getNextResource()
const {
return m_NextResource; }
52 void setNexResource(
IDnsResource* next) { m_NextResource = next; }
54 uint8_t* getRawData()
const;
56 void setDnsLayer(
DnsLayer* dnsLayer,
size_t offsetInLayer);
87 std::string
getName()
const {
return m_DecodedName; }
107 bool setName(
const std::string& newName);
115 virtual size_t getSize()
const = 0;
141 virtual size_t getSize()
const {
return m_NameLength + 2*
sizeof(uint16_t); }
173 void setTTL(uint32_t newTTL);
230 virtual size_t getSize()
const {
return m_NameLength + 3*
sizeof(uint16_t) +
sizeof(uint32_t) +
getDataLength(); }
237 #endif // PACKETPP_DNS_RESOURCE
virtual DnsResourceType getType() const =0
bool setName(const std::string &newName)
DnsClass
Definition: DnsLayerEnums.h:127
virtual DnsResourceType getType() const
Definition: DnsResource.h:142
Definition: DnsResourceData.h:39
DnsType getDnsType() const
DnsResourceDataPtr getData() const
virtual size_t getSize() const
Definition: DnsResource.h:230
void setDnsType(DnsType newType)
DnsClass getDnsClass() const
bool setData(IDnsResourceData *data)
Definition: DnsResource.h:30
virtual DnsResourceType getType() const
Definition: DnsResource.h:231
virtual size_t getSize() const
Definition: DnsResource.h:141
void setDnsClass(DnsClass newClass)
void setCustomDnsClass(uint16_t customValue)
size_t getDataLength() const
DnsType
Definition: DnsLayerEnums.h:15
size_t getNameOffset() const
Definition: DnsResource.h:92
uint16_t getCustomDnsClass() const
std::string getName() const
Definition: DnsResource.h:87
The main namespace for the PcapPlusPlus lib.
size_t getDataOffset() const
DnsResourceType
Definition: DnsLayerEnums.h:145
Definition: DnsLayerEnums.h:148
void setTTL(uint32_t newTTL)
Definition: DnsResource.h:128
virtual size_t getSize() const =0
Definition: DnsResource.h:150
Definition: DnsResourceData.h:93
Definition: DnsLayer.h:99