llarp::EndpointBase
Inherited by llarp::handlers::ExitEndpoint, llarp::service::Endpoint
Public Classes
| Name | |
|---|---|
| struct | SendStat |
Public Types
| Name | |
|---|---|
| using std::variant< service::Address, RouterID > | AddressVariant_t |
Public Functions
| Name | |
|---|---|
| virtual | ~EndpointBase() =default |
| void | PutSRVRecord(dns::SRVData srv) add an srv record to this endpoint's descriptor |
| virtual std::shared_ptr< dns::Server > | DNS() const get dns serverr if we have on on this endpoint |
| virtual void | SRVRecordsChanged() =0 called when srv data changes in some way |
| bool | DelSRVRecordIf(std::function< bool(const dns::SRVData &)> filter) remove srv records from this endpoint that match a filter for each srv record call it with filter, remove if filter returns true return if we removed any srv records |
| std::set< dns::SRVData > | SRVRecords() const get copy of all srv records |
| virtual std::optional< SendStat > | GetStatFor(AddressVariant_t remote) const =0 get statistics about how much traffic we sent and recv'd to a remote endpoint |
| virtual std::unordered_set< AddressVariant_t > | AllRemoteEndpoints() const =0 list all remote endpoint addresses we have that are mapped |
| virtual AddressVariant_t | LocalAddress() const =0 get our local address |
| virtual std::optional< AddressVariant_t > | GetEndpointWithConvoTag(service::ConvoTag tag) const =0 |
| virtual std::optional< service::ConvoTag > | GetBestConvoTagFor(AddressVariant_t addr) const =0 |
| virtual bool | EnsurePathTo(AddressVariant_t addr, std::function< void(std::optional< service::ConvoTag >)> hook, llarp_time_t timeout) =0 |
| virtual void | LookupNameAsync(std::string name, std::function< void(std::optional< AddressVariant_t >)> resultHandler) =0 |
| virtual const EventLoop_ptr & | Loop() =0 |
| virtual bool | SendToOrQueue(service::ConvoTag tag, const llarp_buffer_t & payload, service::ProtocolType t) =0 |
| virtual void | LookupServiceAsync(std::string name, std::string service, std::function< void(std::vector< dns::SRVData >)> resultHandler) =0 lookup srv records async |
| virtual void | MarkAddressOutbound(AddressVariant_t remote) =0 |
Public Types Documentation
using AddressVariant_t
using llarp::EndpointBase::AddressVariant_t = std::variant<service::Address, RouterID>;
Public Functions Documentation
function ~EndpointBase
virtual ~EndpointBase() =default
function PutSRVRecord
void PutSRVRecord(
dns::SRVData srv
)
add an srv record to this endpoint's descriptor
function DNS
inline virtual std::shared_ptr< dns::Server > DNS() const
get dns serverr if we have on on this endpoint
Reimplemented by: llarp::handlers::TunEndpoint::DNS
function SRVRecordsChanged
virtual void SRVRecordsChanged() =0
called when srv data changes in some way
Reimplemented by: llarp::handlers::ExitEndpoint::SRVRecordsChanged, llarp::service::Endpoint::SRVRecordsChanged
function DelSRVRecordIf
bool DelSRVRecordIf(
std::function< bool(const dns::SRVData &)> filter
)
remove srv records from this endpoint that match a filter for each srv record call it with filter, remove if filter returns true return if we removed any srv records
function SRVRecords
std::set< dns::SRVData > SRVRecords() const
get copy of all srv records
function GetStatFor
virtual std::optional< SendStat > GetStatFor(
AddressVariant_t remote
) const =0
get statistics about how much traffic we sent and recv'd to a remote endpoint
Reimplemented by: llarp::handlers::ExitEndpoint::GetStatFor, llarp::service::Endpoint::GetStatFor
function AllRemoteEndpoints
virtual std::unordered_set< AddressVariant_t > AllRemoteEndpoints() const =0
list all remote endpoint addresses we have that are mapped
Reimplemented by: llarp::handlers::ExitEndpoint::AllRemoteEndpoints, llarp::service::Endpoint::AllRemoteEndpoints
function LocalAddress
virtual AddressVariant_t LocalAddress() const =0
get our local address
Reimplemented by: llarp::handlers::ExitEndpoint::LocalAddress, llarp::service::Endpoint::LocalAddress
function GetEndpointWithConvoTag
virtual std::optional< AddressVariant_t > GetEndpointWithConvoTag(
service::ConvoTag tag
) const =0
Reimplemented by: llarp::service::Endpoint::GetEndpointWithConvoTag, llarp::handlers::ExitEndpoint::GetEndpointWithConvoTag
function GetBestConvoTagFor
virtual std::optional< service::ConvoTag > GetBestConvoTagFor(
AddressVariant_t addr
) const =0
Reimplemented by: llarp::handlers::ExitEndpoint::GetBestConvoTagFor
function EnsurePathTo
virtual bool EnsurePathTo(
AddressVariant_t addr,
std::function< void(std::optional< service::ConvoTag >)> hook,
llarp_time_t timeout
) =0
Reimplemented by: llarp::handlers::ExitEndpoint::EnsurePathTo
function LookupNameAsync
virtual void LookupNameAsync(
std::string name,
std::function< void(std::optional< AddressVariant_t >)> resultHandler
) =0
Reimplemented by: llarp::handlers::ExitEndpoint::LookupNameAsync
function Loop
virtual const EventLoop_ptr & Loop() =0
Reimplemented by: llarp::handlers::ExitEndpoint::Loop, llarp::service::Endpoint::Loop
function SendToOrQueue
virtual bool SendToOrQueue(
service::ConvoTag tag,
const llarp_buffer_t & payload,
service::ProtocolType t
) =0
Reimplemented by: llarp::service::Endpoint::SendToOrQueue, llarp::handlers::ExitEndpoint::SendToOrQueue
function LookupServiceAsync
virtual void LookupServiceAsync(
std::string name,
std::string service,
std::function< void(std::vector< dns::SRVData >)> resultHandler
) =0
lookup srv records async
Reimplemented by: llarp::handlers::ExitEndpoint::LookupServiceAsync, llarp::service::Endpoint::LookupServiceAsync
function MarkAddressOutbound
virtual void MarkAddressOutbound(
AddressVariant_t remote
) =0
Reimplemented by: llarp::handlers::ExitEndpoint::MarkAddressOutbound, llarp::service::Endpoint::MarkAddressOutbound
Updated on 2026-01-10 at 22:49:45 +0000