llarp::handlers::ExitEndpoint
Inherits from llarp::dns::Resolver_Base, llarp::EndpointBase
Public Functions
| Name | |
|---|---|
| virtual int | Rank() const override return the sorting order for this resolver lower means it will be tried first |
| virtual std::string_view | ResolverName() const override get printable name |
| virtual bool | MaybeHookDNS(std::shared_ptr< dns::PacketSource_Base > source, const dns::Message & query, const SockAddr & to, const SockAddr & from) override attempt to handle a dns message returns true if we consumed this query and it should not be processed again |
| ExitEndpoint(std::string name, AbstractRouter * r) | |
| ~ExitEndpoint() override | |
| virtual std::optional< AddressVariant_t > | GetEndpointWithConvoTag(service::ConvoTag tag) const override |
| virtual std::optional< service::ConvoTag > | GetBestConvoTagFor(AddressVariant_t addr) const override |
| virtual bool | EnsurePathTo(AddressVariant_t addr, std::function< void(std::optional< service::ConvoTag >)> hook, llarp_time_t timeout) override |
| virtual void | LookupNameAsync(std::string name, std::function< void(std::optional< AddressVariant_t >)> resultHandler) override |
| virtual const EventLoop_ptr & | Loop() override |
| virtual std::unordered_set< EndpointBase::AddressVariant_t > | AllRemoteEndpoints() const override list all remote endpoint addresses we have that are mapped |
| virtual void | SRVRecordsChanged() override called when srv data changes in some way |
| virtual void | MarkAddressOutbound(AddressVariant_t ) override |
| virtual bool | SendToOrQueue(service::ConvoTag tag, const llarp_buffer_t & payload, service::ProtocolType t) override |
| void | Tick(llarp_time_t now) |
| void | Configure(const NetworkConfig & networkConfig, const DnsConfig & dnsConfig) |
| std::string | Name() const |
| bool | VisitEndpointsFor(const PubKey & pk, std::function< bool(exit::Endpoint *const)> visit) const |
| bool | SupportsV6() const |
| bool | ShouldHookDNSMessage(const dns::Message & msg) const |
| bool | HandleHookedDNSMessage(dns::Message msg, std::function< void(dns::Message)> ) |
| virtual void | LookupServiceAsync(std::string name, std::string service, std::function< void(std::vector< dns::SRVData >)> resultHandler) override lookup srv records async |
| bool | AllocateNewExit(const PubKey pk, const PathID_t & path, bool permitInternet) |
| exit::Endpoint * | FindEndpointByPath(const PathID_t & path) |
| exit::Endpoint * | FindEndpointByIP(huint32_t ip) |
| bool | UpdateEndpointPath(const PubKey & remote, const PathID_t & next) |
| void | OnInetPacket(net::IPPacket buf) handle ip packet from outside |
| AbstractRouter * | GetRouter() |
| llarp_time_t | Now() const |
| template <typename Stats > void |
CalculateTrafficStats(Stats & stats) |
| void | DelEndpointInfo(const PathID_t & path) DO NOT CALL ME. |
| void | RemoveExit(const exit::Endpoint * ep) DO NOT CALL ME. |
| bool | QueueOutboundTraffic(net::IPPacket pkt) |
| virtual AddressVariant_t | LocalAddress() const override get our local address |
| virtual std::optional< SendStat > | GetStatFor(AddressVariant_t remote) const override get statistics about how much traffic we sent and recv'd to a remote endpoint |
| bool | Start() sets up networking and starts traffic |
| bool | Stop() |
| bool | ShouldRemove() const |
| bool | HasLocalMappedAddrFor(const PubKey & pk) const |
| net::ipv6addr_t | GetIfAddr() const |
| void | Flush() |
| net::ipv6addr_t | GetIPForIdent(const PubKey pk) |
| void | ObtainSNodeSession(const RouterID & router, exit::SessionReadyFunc obtainCb) async obtain snode session and call callback when it's ready to send |
Additional inherited members
Public Functions inherited from llarp::dns::Resolver_Base
| Name | |
|---|---|
| virtual | ~Resolver_Base() =default |
| bool | operator<(const Resolver_Base & other) const less than via rank |
| bool | operator>(const Resolver_Base & other) const greater than via rank |
| virtual std::optional< SockAddr > | GetLocalAddr() const get local socket address that queries are sent from |
| virtual void | ResetResolver(std::optional< std::vector< SockAddr > > replace_upstream =std::nullopt) reset the resolver state, optionally replace upstream info with new info. |
| virtual void | Down() cancel all pending requests and cease further operation. Default operation is a no-op. |
Public Classes inherited from llarp::EndpointBase
| Name | |
|---|---|
| struct | SendStat |
Public Types inherited from llarp::EndpointBase
| Name | |
|---|---|
| using std::variant< service::Address, RouterID > | AddressVariant_t |
Public Functions inherited from llarp::EndpointBase
| 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 |
| 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 |
Public Functions Documentation
function Rank
inline virtual int Rank() const override
return the sorting order for this resolver lower means it will be tried first
Reimplements: llarp::dns::Resolver_Base::Rank
function ResolverName
inline virtual std::string_view ResolverName() const override
get printable name
Reimplements: llarp::dns::Resolver_Base::ResolverName
function MaybeHookDNS
virtual bool MaybeHookDNS(
std::shared_ptr< dns::PacketSource_Base > source,
const dns::Message & query,
const SockAddr & to,
const SockAddr & from
) override
attempt to handle a dns message returns true if we consumed this query and it should not be processed again
Reimplements: llarp::dns::Resolver_Base::MaybeHookDNS
function ExitEndpoint
ExitEndpoint(
std::string name,
AbstractRouter * r
)
function ~ExitEndpoint
~ExitEndpoint() override
function GetEndpointWithConvoTag
virtual std::optional< AddressVariant_t > GetEndpointWithConvoTag(
service::ConvoTag tag
) const override
Reimplements: llarp::EndpointBase::GetEndpointWithConvoTag
function GetBestConvoTagFor
virtual std::optional< service::ConvoTag > GetBestConvoTagFor(
AddressVariant_t addr
) const override
Reimplements: llarp::EndpointBase::GetBestConvoTagFor
function EnsurePathTo
virtual bool EnsurePathTo(
AddressVariant_t addr,
std::function< void(std::optional< service::ConvoTag >)> hook,
llarp_time_t timeout
) override
Reimplements: llarp::EndpointBase::EnsurePathTo
function LookupNameAsync
virtual void LookupNameAsync(
std::string name,
std::function< void(std::optional< AddressVariant_t >)> resultHandler
) override
Reimplements: llarp::EndpointBase::LookupNameAsync
function Loop
virtual const EventLoop_ptr & Loop() override
Reimplements: llarp::EndpointBase::Loop
function AllRemoteEndpoints
virtual std::unordered_set< EndpointBase::AddressVariant_t > AllRemoteEndpoints() const override
list all remote endpoint addresses we have that are mapped
Reimplements: llarp::EndpointBase::AllRemoteEndpoints
function SRVRecordsChanged
virtual void SRVRecordsChanged() override
called when srv data changes in some way
Reimplements: llarp::EndpointBase::SRVRecordsChanged
function MarkAddressOutbound
inline virtual void MarkAddressOutbound(
AddressVariant_t
) override
Reimplements: llarp::EndpointBase::MarkAddressOutbound
function SendToOrQueue
virtual bool SendToOrQueue(
service::ConvoTag tag,
const llarp_buffer_t & payload,
service::ProtocolType t
) override
Reimplements: llarp::EndpointBase::SendToOrQueue
function Tick
void Tick(
llarp_time_t now
)
function Configure
void Configure(
const NetworkConfig & networkConfig,
const DnsConfig & dnsConfig
)
function Name
std::string Name() const
function VisitEndpointsFor
bool VisitEndpointsFor(
const PubKey & pk,
std::function< bool(exit::Endpoint *const)> visit
) const
function SupportsV6
bool SupportsV6() const
function ShouldHookDNSMessage
bool ShouldHookDNSMessage(
const dns::Message & msg
) const
function HandleHookedDNSMessage
bool HandleHookedDNSMessage(
dns::Message msg,
std::function< void(dns::Message)>
)
function LookupServiceAsync
virtual void LookupServiceAsync(
std::string name,
std::string service,
std::function< void(std::vector< dns::SRVData >)> resultHandler
) override
lookup srv records async
Reimplements: llarp::EndpointBase::LookupServiceAsync
function AllocateNewExit
bool AllocateNewExit(
const PubKey pk,
const PathID_t & path,
bool permitInternet
)
function FindEndpointByPath
exit::Endpoint * FindEndpointByPath(
const PathID_t & path
)
function FindEndpointByIP
exit::Endpoint * FindEndpointByIP(
huint32_t ip
)
function UpdateEndpointPath
bool UpdateEndpointPath(
const PubKey & remote,
const PathID_t & next
)
function OnInetPacket
void OnInetPacket(
net::IPPacket buf
)
handle ip packet from outside
function GetRouter
AbstractRouter * GetRouter()
function Now
llarp_time_t Now() const
function CalculateTrafficStats
template <typename Stats >
inline void CalculateTrafficStats(
Stats & stats
)
function DelEndpointInfo
void DelEndpointInfo(
const PathID_t & path
)
DO NOT CALL ME.
function RemoveExit
void RemoveExit(
const exit::Endpoint * ep
)
DO NOT CALL ME.
function QueueOutboundTraffic
bool QueueOutboundTraffic(
net::IPPacket pkt
)
function LocalAddress
virtual AddressVariant_t LocalAddress() const override
get our local address
Reimplements: llarp::EndpointBase::LocalAddress
function GetStatFor
virtual std::optional< SendStat > GetStatFor(
AddressVariant_t remote
) const override
get statistics about how much traffic we sent and recv'd to a remote endpoint
Reimplements: llarp::EndpointBase::GetStatFor
function Start
bool Start()
sets up networking and starts traffic
function Stop
bool Stop()
function ShouldRemove
bool ShouldRemove() const
function HasLocalMappedAddrFor
bool HasLocalMappedAddrFor(
const PubKey & pk
) const
function GetIfAddr
net::ipv6addr_t GetIfAddr() const
function Flush
void Flush()
function GetIPForIdent
net::ipv6addr_t GetIPForIdent(
const PubKey pk
)
function ObtainSNodeSession
void ObtainSNodeSession(
const RouterID & router,
exit::SessionReadyFunc obtainCb
)
async obtain snode session and call callback when it's ready to send
Updated on 2026-01-10 at 22:49:45 +0000