llarp::service::Address

Snapp Address.

#include <address.hpp>

Inherits from llarp::AlignedBuffer< 32 >

Public Functions

Name
bool PermitTLD(const char * tld)
return true if we permit using this tld otherwise return false
std::string ToString(const char * tld =".loki") const
bool FromString(std::string_view str, const char * tld =".loki")
Address()
Address(const std::string & str)
Address(const Data & buf)
Address(const Address & other)
Address(const AlignedBuffer< 32 > & other)
bool operator<(const Address & other) const
bool operator==(const Address & other) const
bool operator!=(const Address & other) const
Address & operator=(const Address & other) =default
dht::Key_t ToKey() const
RouterID ToRouter() const

Public Attributes

Name
std::string subdomain
if parsed using FromString this contains the subdomain this member is not used when comparing it's extra data for dns
const std::set< std::string > AllowedTLDs
list of whitelisted gtld to permit

Additional inherited members

Public Types inherited from llarp::AlignedBuffer< 32 >

Name
using std::array< byte_t, SIZE > Data

Public Functions inherited from llarp::AlignedBuffer< 32 >

Name
virtual ~AlignedBuffer() =default
AlignedBuffer()
AlignedBuffer(const byte_t * data)
AlignedBuffer(const Data & buf)
AlignedBuffer< sz > operator~() const
bitwise NOT
bool operator>(const AlignedBuffer & other) const
bool operator<=(const AlignedBuffer & other) const
bool operator>=(const AlignedBuffer & other) const
AlignedBuffer operator^(const AlignedBuffer & other) const
AlignedBuffer & operator^=(const AlignedBuffer & other)
byte_t & operator[](size_t idx)
const byte_t & operator[](size_t idx) const
void Fill(byte_t f)
Data & as_array()
const Data & as_array() const
byte_t * data()
const byte_t * data() const
bool IsZero() const
void Zero()
virtual void Randomize()
Data::iterator begin()
Data::iterator end()
Data::const_iterator begin() const
Data::const_iterator end() const
bool FromBytestring(llarp_buffer_t * buf)
bool BEncode(llarp_buffer_t * buf) const
bool BDecode(llarp_buffer_t * buf)
std::string_view ToView() const
std::string ToHex() const
std::string ShortHex() const
bool FromHex(std::string_view str)
constexpr size_t size()

Public Attributes inherited from llarp::AlignedBuffer< 32 >

Name
constexpr size_t SIZE

Public Functions Documentation

function PermitTLD

static bool PermitTLD(
    const char * tld
)

return true if we permit using this tld otherwise return false

function ToString

std::string ToString(
    const char * tld =".loki"
) const

function FromString

bool FromString(
    std::string_view str,
    const char * tld =".loki"
)

function Address

inline Address()

function Address

inline explicit Address(
    const std::string & str
)

function Address

inline explicit Address(
    const Data & buf
)

function Address

inline Address(
    const Address & other
)

function Address

inline explicit Address(
    const AlignedBuffer< 32 > & other
)

function operator<

inline bool operator<(
    const Address & other
) const

function operator==

inline bool operator==(
    const Address & other
) const

function operator!=

inline bool operator!=(
    const Address & other
) const

function operator=

Address & operator=(
    const Address & other
) =default

function ToKey

dht::Key_t ToKey() const

function ToRouter

inline RouterID ToRouter() const

Public Attributes Documentation

variable subdomain

std::string subdomain;

if parsed using FromString this contains the subdomain this member is not used when comparing it's extra data for dns

variable AllowedTLDs

static const std::set< std::string > AllowedTLDs;

list of whitelisted gtld to permit


Updated on 2026-01-10 at 22:49:45 +0000