llarp::exit::Endpoint

persistant exit state for 1 identity on the exit node

#include <endpoint.hpp>

Public Functions

Name
Endpoint(const llarp::PubKey & remoteIdent, const llarp::path::HopHandler_ptr & path, bool rewriteIP, net::ipv6addr_t ip, llarp::handlers::ExitEndpoint * parent)
~Endpoint()
void Close()
close ourselves
bool IsExpired(llarp_time_t now) const
return true if we are expired right now
bool ExpiresSoon(llarp_time_t now, llarp_time_t dlt =5s) const
bool LooksDead(llarp_time_t now, llarp_time_t timeout =10s) const
return true if this endpoint looks dead right now
void Tick(llarp_time_t now)
tick ourself, reset tx/rx rates
bool QueueInboundTraffic(std::vector< byte_t > data, service::ProtocolType t)
queue traffic from service node / internet to be transmitted
bool Flush()
flush inbound and outbound traffic queues
bool QueueOutboundTraffic(PathID_t txid, std::vector< byte_t > data, uint64_t counter, service::ProtocolType t)
queue outbound traffic does ip rewrite here
bool UpdateLocalPath(const llarp::PathID_t & nextPath)
update local path id and cascade information to parent return true if success
llarp::path::HopHandler_ptr GetCurrentPath() const
const llarp::PubKey & PubKey() const
uint64_t TxRate() const
uint64_t RxRate() const
net::ipv6addr_t LocalIP() const

Public Attributes

Name
constexpr size_t MaxUpstreamQueueSize
const llarp_time_t createdAt

Public Functions Documentation

function Endpoint

explicit Endpoint(
    const llarp::PubKey & remoteIdent,
    const llarp::path::HopHandler_ptr & path,
    bool rewriteIP,
    net::ipv6addr_t ip,
    llarp::handlers::ExitEndpoint * parent
)

function ~Endpoint

~Endpoint()

function Close

void Close()

close ourselves

function IsExpired

bool IsExpired(
    llarp_time_t now
) const

return true if we are expired right now

function ExpiresSoon

bool ExpiresSoon(
    llarp_time_t now,
    llarp_time_t dlt =5s
) const

function LooksDead

bool LooksDead(
    llarp_time_t now,
    llarp_time_t timeout =10s
) const

return true if this endpoint looks dead right now

function Tick

void Tick(
    llarp_time_t now
)

tick ourself, reset tx/rx rates

function QueueInboundTraffic

bool QueueInboundTraffic(
    std::vector< byte_t > data,
    service::ProtocolType t
)

queue traffic from service node / internet to be transmitted

function Flush

bool Flush()

flush inbound and outbound traffic queues

function QueueOutboundTraffic

bool QueueOutboundTraffic(
    PathID_t txid,
    std::vector< byte_t > data,
    uint64_t counter,
    service::ProtocolType t
)

queue outbound traffic does ip rewrite here

function UpdateLocalPath

bool UpdateLocalPath(
    const llarp::PathID_t & nextPath
)

update local path id and cascade information to parent return true if success

function GetCurrentPath

inline llarp::path::HopHandler_ptr GetCurrentPath() const

function PubKey

inline const llarp::PubKey & PubKey() const

function TxRate

inline uint64_t TxRate() const

function RxRate

inline uint64_t RxRate() const

function LocalIP

inline net::ipv6addr_t LocalIP() const

Public Attributes Documentation

variable MaxUpstreamQueueSize

static constexpr size_t MaxUpstreamQueueSize = 256;

variable createdAt

const llarp_time_t createdAt;

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