mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
46ad8d4058
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use - shuffled around some cmake linking to simplify dependency graph - superfluous files removed
26 lines
532 B
C++
26 lines
532 B
C++
#pragma once
|
|
|
|
#include <llarp/net/net_int.hpp>
|
|
#include <llarp/util/buffer.hpp>
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace llarp::dns
|
|
{
|
|
/// decode name from buffer; return nullopt on failure
|
|
std::optional<std::string>
|
|
DecodeName(llarp_buffer_t* buf, bool trimTrailingDot = false);
|
|
|
|
/// encode name to buffer
|
|
bool
|
|
EncodeNameTo(llarp_buffer_t* buf, std::string_view name);
|
|
|
|
std::optional<huint128_t>
|
|
DecodePTR(std::string_view name);
|
|
|
|
bool
|
|
NameIsReserved(std::string_view name);
|
|
|
|
} // namespace llarp::dns
|