llarp::RouterContact

RouterContact.

#include <router_contact.hpp>

Public Functions

Name
RouterContact()
std::string ToString() const
bool BEncode(llarp_buffer_t * buf) const
bool BEncodeSignedSection(llarp_buffer_t * buf) const
std::string ToTXTRecord() const
bool operator==(const RouterContact & other) const
bool operator<(const RouterContact & other) const
bool operator!=(const RouterContact & other) const
void Clear()
bool IsExit() const
bool BDecode(llarp_buffer_t * buf)
bool DecodeKey(const llarp_buffer_t & k, llarp_buffer_t * buf)
bool HasNick() const
std::string Nick() const
bool IsPublicRouter() const
void SetNick(std::string_view nick)
bool Verify(llarp_time_t now, bool allowExpired =true) const
bool Sign(const llarp::SecretKey & secret)
bool ExpiresSoon(llarp_time_t now, llarp_time_t dlt =1min) const
does this RC expire soon? default delta is 1 minute
bool IsExpired(llarp_time_t now) const
returns true if this RC is expired and should be removed
llarp_time_t TimeUntilExpires(llarp_time_t now) const
returns time in ms until we expire or 0 if we have expired
llarp_time_t Age(llarp_time_t now) const
get the age of this RC in ms
bool OtherIsNewer(const RouterContact & other) const
bool Read(const fs::path & fname)
bool Write(const fs::path & fname) const
bool VerifySignature() const
bool FromOurNetwork() const
return true if the netid in this rc is for the network id we are using
bool IsObsoleteBootstrap() const

Public Attributes

Name
bool BlockBogons
for unit tests
llarp_time_t Lifetime
llarp_time_t UpdateInterval
llarp_time_t StaleInsertionAge
const bool serializeExit
should we serialize the exit info?
std::vector< AddressInfo > addrs
NetID netID
llarp::PubKey enckey
llarp::PubKey pubkey
llarp::Signature signature
llarp::AlignedBuffer<(32) > nickname
node nickname, yw kee
llarp_time_t last_updated
uint64_t version
std::optional< RouterVersion > routerVersion
std::string signed_bt_dict
std::vector< dns::SRVData > srvRecords

Public Functions Documentation

function RouterContact

inline RouterContact()

function ToString

std::string ToString() const

function BEncode

bool BEncode(
    llarp_buffer_t * buf
) const

function BEncodeSignedSection

bool BEncodeSignedSection(
    llarp_buffer_t * buf
) const

function ToTXTRecord

std::string ToTXTRecord() const

function operator==

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

function operator<

inline bool operator<(
    const RouterContact & other
) const

function operator!=

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

function Clear

void Clear()

function IsExit

inline bool IsExit() const

function BDecode

bool BDecode(
    llarp_buffer_t * buf
)

function DecodeKey

bool DecodeKey(
    const llarp_buffer_t & k,
    llarp_buffer_t * buf
)

function HasNick

bool HasNick() const

function Nick

std::string Nick() const

function IsPublicRouter

bool IsPublicRouter() const

function SetNick

void SetNick(
    std::string_view nick
)

function Verify

bool Verify(
    llarp_time_t now,
    bool allowExpired =true
) const

function Sign

bool Sign(
    const llarp::SecretKey & secret
)

function ExpiresSoon

bool ExpiresSoon(
    llarp_time_t now,
    llarp_time_t dlt =1min
) const

does this RC expire soon? default delta is 1 minute

function IsExpired

bool IsExpired(
    llarp_time_t now
) const

returns true if this RC is expired and should be removed

function TimeUntilExpires

llarp_time_t TimeUntilExpires(
    llarp_time_t now
) const

returns time in ms until we expire or 0 if we have expired

function Age

llarp_time_t Age(
    llarp_time_t now
) const

get the age of this RC in ms

function OtherIsNewer

inline bool OtherIsNewer(
    const RouterContact & other
) const

function Read

bool Read(
    const fs::path & fname
)

function Write

bool Write(
    const fs::path & fname
) const

function VerifySignature

bool VerifySignature() const

function FromOurNetwork

bool FromOurNetwork() const

return true if the netid in this rc is for the network id we are using

function IsObsoleteBootstrap

bool IsObsoleteBootstrap() const

Public Attributes Documentation

variable BlockBogons

static bool BlockBogons;

for unit tests

variable Lifetime

static llarp_time_t Lifetime;

variable UpdateInterval

static llarp_time_t UpdateInterval;

variable StaleInsertionAge

static llarp_time_t StaleInsertionAge;

variable serializeExit

static const bool serializeExit = true;

should we serialize the exit info?

variable addrs

std::vector< AddressInfo > addrs;

variable netID

NetID netID;

variable enckey

llarp::PubKey enckey;

variable pubkey

llarp::PubKey pubkey;

variable signature

llarp::Signature signature;

variable nickname

llarp::AlignedBuffer<(32) > nickname;

node nickname, yw kee

variable last_updated

llarp_time_t last_updated = 0s;

variable version

uint64_t version = llarp::constants::proto_version;

variable routerVersion

std::optional< RouterVersion > routerVersion;

variable signed_bt_dict

std::string signed_bt_dict;

variable srvRecords

std::vector< dns::SRVData > srvRecords;

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