llarp::dns
Namespaces
| Name |
|---|
| llarp::dns::nm |
| llarp::dns::sd |
Classes
| Name | |
|---|---|
| class | llarp::dns::I_Platform sets dns settings in a platform dependant way |
| struct | llarp::dns::Message |
| struct | llarp::dns::MessageHeader |
| class | llarp::dns::Multi_Platform a collection of dns platforms that are tried in order when setting dns |
| class | llarp::dns::Null_Platform a dns platform does silently does nothing, successfully |
| class | llarp::dns::PacketSource_Base |
| class | llarp::dns::PacketSource_Wrapper a packet source which will override the sendto function of an wrapped packet source to construct a raw ip packet as a reply |
| class | llarp::dns::QueryJob non complex implementation of QueryJob_Base for use in things that only ever called on the mainloop thread |
| class | llarp::dns::QueryJob_Base a job handling 1 dns query |
| struct | llarp::dns::Question |
| class | llarp::dns::Resolver_Base handler of dns query hooking intercepts dns for internal processing |
| struct | llarp::dns::ResourceRecord |
| struct | llarp::dns::Serialize base type for serializable dns entities |
| class | llarp::dns::Server |
| struct | llarp::dns::SRVData |
Types
| Name | |
|---|---|
| using uint16_t | MsgID_t |
| using uint16_t | Fields_t |
| using uint16_t | Count_t |
| using std::conditional_t< false, nm::Platform, Null_Platform > | NM_Platform_t |
| using uint16_t | QType_t |
| using uint16_t | QClass_t |
| using uint16_t | RRClass_t |
| using uint16_t | RRType_t |
| using std::vector< byte_t > | RR_RData_t |
| using uint32_t | RR_TTL_t |
| using std::conditional_t< llarp::platform::has_systemd, sd::Platform, Null_Platform > | SD_Platform_t |
| using std::tuple< std::string, uint16_t, uint16_t, uint16_t, std::string > | SRVTuple |
| using std::string | name_t |
Functions
| Name | |
|---|---|
| std::optional< Message > | MaybeParseDNSMessage(llarp_buffer_t buf) |
| std::optional< std::string > | DecodeName(llarp_buffer_t * buf, bool trimTrailingDot =false) decode name from buffer; return nullopt on failure |
| bool | EncodeNameTo(llarp_buffer_t * buf, std::string_view name) encode name to buffer |
| std::optional< huint128_t > | DecodePTR(std::string_view name) |
| bool | NameIsReserved(std::string_view name) |
| bool | EncodeRData(llarp_buffer_t * buf, const std::vector< byte_t > & rdata) |
| bool | DecodeRData(llarp_buffer_t * buf, std::vector< byte_t > & rdata) |
| bool | decode_name(llarp_buffer_t * buf, name_t & name) decode name from buffer |
| bool | encode_name(llarp_buffer_t * buf, const name_t & name) encode name to buffer |
Attributes
| Name | |
|---|---|
| constexpr uint16_t | qTypeSRV |
| constexpr uint16_t | qTypeAAAA |
| constexpr uint16_t | qTypeTXT |
| constexpr uint16_t | qTypeMX |
| constexpr uint16_t | qTypePTR |
| constexpr uint16_t | qTypeCNAME |
| constexpr uint16_t | qTypeNS |
| constexpr uint16_t | qTypeA |
| constexpr uint16_t | qClassIN |
| constexpr uint16_t | flags_QR |
| constexpr uint16_t | flags_AA |
| constexpr uint16_t | flags_TC |
| constexpr uint16_t | flags_RD |
| constexpr uint16_t | flags_RA |
| constexpr uint16_t | flags_RCODENameError |
| constexpr uint16_t | flags_RCODEServFail |
| constexpr uint16_t | flags_RCODENoError |
Types Documentation
using MsgID_t
using llarp::dns::MsgID_t = typedef uint16_t;
using Fields_t
using llarp::dns::Fields_t = typedef uint16_t;
using Count_t
using llarp::dns::Count_t = typedef uint16_t;
using NM_Platform_t
using llarp::dns::NM_Platform_t = typedef std::conditional_t<false, nm::Platform, Null_Platform>;
using QType_t
using llarp::dns::QType_t = typedef uint16_t;
using QClass_t
using llarp::dns::QClass_t = typedef uint16_t;
using RRClass_t
using llarp::dns::RRClass_t = typedef uint16_t;
using RRType_t
using llarp::dns::RRType_t = typedef uint16_t;
using RR_RData_t
using llarp::dns::RR_RData_t = typedef std::vector<byte_t>;
using RR_TTL_t
using llarp::dns::RR_TTL_t = typedef uint32_t;
using SD_Platform_t
using llarp::dns::SD_Platform_t = typedef std::conditional_t<llarp::platform::has_systemd, sd::Platform, Null_Platform>;
using SRVTuple
using llarp::dns::SRVTuple = typedef std::tuple<std::string, uint16_t, uint16_t, uint16_t, std::string>;
using name_t
using llarp::dns::name_t = typedef std::string;
Functions Documentation
function MaybeParseDNSMessage
std::optional< Message > MaybeParseDNSMessage(
llarp_buffer_t buf
)
function DecodeName
std::optional< std::string > DecodeName(
llarp_buffer_t * buf,
bool trimTrailingDot =false
)
decode name from buffer; return nullopt on failure
function EncodeNameTo
bool EncodeNameTo(
llarp_buffer_t * buf,
std::string_view name
)
encode name to buffer
function DecodePTR
std::optional< huint128_t > DecodePTR(
std::string_view name
)
function NameIsReserved
bool NameIsReserved(
std::string_view name
)
function EncodeRData
bool EncodeRData(
llarp_buffer_t * buf,
const std::vector< byte_t > & rdata
)
function DecodeRData
bool DecodeRData(
llarp_buffer_t * buf,
std::vector< byte_t > & rdata
)
function decode_name
bool decode_name(
llarp_buffer_t * buf,
name_t & name
)
decode name from buffer
function encode_name
bool encode_name(
llarp_buffer_t * buf,
const name_t & name
)
encode name to buffer
Attributes Documentation
variable qTypeSRV
constexpr uint16_t qTypeSRV = 33;
variable qTypeAAAA
constexpr uint16_t qTypeAAAA = 28;
variable qTypeTXT
constexpr uint16_t qTypeTXT = 16;
variable qTypeMX
constexpr uint16_t qTypeMX = 15;
variable qTypePTR
constexpr uint16_t qTypePTR = 12;
variable qTypeCNAME
constexpr uint16_t qTypeCNAME = 5;
variable qTypeNS
constexpr uint16_t qTypeNS = 2;
variable qTypeA
constexpr uint16_t qTypeA = 1;
variable qClassIN
constexpr uint16_t qClassIN = 1;
variable flags_QR
constexpr uint16_t flags_QR = (1 << 15);
variable flags_AA
constexpr uint16_t flags_AA = (1 << 10);
variable flags_TC
constexpr uint16_t flags_TC = (1 << 9);
variable flags_RD
constexpr uint16_t flags_RD = (1 << 8);
variable flags_RA
constexpr uint16_t flags_RA = (1 << 7);
variable flags_RCODENameError
constexpr uint16_t flags_RCODENameError = (3);
variable flags_RCODEServFail
constexpr uint16_t flags_RCODEServFail = (2);
variable flags_RCODENoError
constexpr uint16_t flags_RCODENoError = (0);
Updated on 2026-01-10 at 22:49:45 +0000