DNS Package Object.
More...
#include <DnsPackage.h>
|
static std::string | decodeWords (const uint8_t *buffer, size_t length, size_t &offset) |
|
static bool | decodeAnswers (std::vector< Answer > &answers, size_t expect_size, const uint8_t *buffer, size_t length, size_t &pos) |
|
static std::string | encodeWords (const std::string &fullname) |
|
static bool | encodeQuestions (const std::vector< Question > &questions, void *buffer, size_t &length, Index &index, size_t offset) |
|
static bool | encodeAnswers (const std::vector< Answer > &answers, void *buffer, size_t &length, Index &index, size_t offset) |
|
◆ Additional
◆ Authority
◆ Ptr
◆ DnsPackage()
sese::net::dns::DnsPackage::DnsPackage |
( |
| ) |
|
|
privatedefault |
◆ buildIndex()
◆ decode()
DnsPackage::Ptr DnsPackage::decode |
( |
const uint8_t * | buffer, |
|
|
size_t | length ) |
|
static |
◆ decodeAnswers()
bool DnsPackage::decodeAnswers |
( |
std::vector< Answer > & | answers, |
|
|
size_t | expect_size, |
|
|
const uint8_t * | buffer, |
|
|
size_t | length, |
|
|
size_t & | pos ) |
|
staticprivate |
◆ decodeWords()
std::string DnsPackage::decodeWords |
( |
const uint8_t * | buffer, |
|
|
size_t | length, |
|
|
size_t & | offset ) |
|
staticprivate |
◆ encode()
bool DnsPackage::encode |
( |
void * | buffer, |
|
|
size_t & | length, |
|
|
Index & | index ) const |
Encode DNS package to buffer
- Parameters
-
buffer | Output buffer |
length | Output buffer size, returns actual size used on success; if input is 0, calculates required buffer size without actual packaging |
index | DNS Package Compression Index |
- Returns
- Whether encoding was successful
References additionals, answers, authorities, sese::net::dns::DnsPackage::Index::clearPos(), encodeAnswers(), encodeQuestions(), sese::net::dns::DnsPackage::DnsHeader::flags, header, sese::net::dns::DnsPackage::DnsHeader::id, questions, and ToBigEndian16().
◆ encodeAnswers()
bool DnsPackage::encodeAnswers |
( |
const std::vector< Answer > & | answers, |
|
|
void * | buffer, |
|
|
size_t & | length, |
|
|
Index & | index, |
|
|
size_t | offset ) |
|
staticprivate |
◆ encodeQuestions()
bool DnsPackage::encodeQuestions |
( |
const std::vector< Question > & | questions, |
|
|
void * | buffer, |
|
|
size_t & | length, |
|
|
Index & | index, |
|
|
size_t | offset ) |
|
staticprivate |
◆ encodeWords()
std::string DnsPackage::encodeWords |
( |
const std::string & | fullname | ) |
|
|
staticprivate |
◆ getAdditionals()
std::vector< Additional > & sese::net::dns::DnsPackage::getAdditionals |
( |
| ) |
|
|
inlinenodiscard |
◆ getAnswers()
std::vector< Answer > & sese::net::dns::DnsPackage::getAnswers |
( |
| ) |
|
|
inlinenodiscard |
◆ getAuthorities()
std::vector< Authority > & sese::net::dns::DnsPackage::getAuthorities |
( |
| ) |
|
|
inlinenodiscard |
◆ getFlags()
auto sese::net::dns::DnsPackage::getFlags |
( |
| ) |
const |
|
inlinenodiscard |
◆ getId()
auto sese::net::dns::DnsPackage::getId |
( |
| ) |
const |
|
inlinenodiscard |
◆ getQuestions()
std::vector< Question > & sese::net::dns::DnsPackage::getQuestions |
( |
| ) |
|
|
inlinenodiscard |
◆ new_()
◆ setFlags()
void sese::net::dns::DnsPackage::setFlags |
( |
uint16_t | flags | ) |
|
|
inline |
◆ setId()
void sese::net::dns::DnsPackage::setId |
( |
uint16_t | id | ) |
|
|
inline |
◆ additionals
std::vector<Additional> sese::net::dns::DnsPackage::additionals |
|
private |
◆ answers
std::vector<Answer> sese::net::dns::DnsPackage::answers |
|
private |
◆ authorities
std::vector<Authority> sese::net::dns::DnsPackage::authorities |
|
private |
◆ header
◆ questions
std::vector<Question> sese::net::dns::DnsPackage::questions |
|
private |
The documentation for this class was generated from the following files: