---
title: llarp::handlers::TunEndpoint

---

# llarp::handlers::TunEndpoint





Inherits from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md), [llarp::dns::Resolver_Base](Classes/classllarp_1_1dns_1_1Resolver__Base.md), std::enable_shared_from_this< TunEndpoint >, [llarp::path::Builder](Classes/structllarp_1_1path_1_1Builder.md), [llarp::service::ILookupHolder](Classes/structllarp_1_1service_1_1ILookupHolder.md), [llarp::service::IDataHandler](Classes/structllarp_1_1service_1_1IDataHandler.md), [llarp::EndpointBase](Classes/classllarp_1_1EndpointBase.md), [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)

## Protected Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[WritePacket](Classes/structllarp_1_1handlers_1_1TunEndpoint_1_1WritePacket.md)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[TunEndpoint](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-tunendpoint)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r, [llarp::service::Context](Classes/structllarp_1_1service_1_1Context.md) * parent) |
| | **[~TunEndpoint](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-~tunendpoint)**() override |
| virtual [vpn::NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) * | **[GetVPNInterface](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-getvpninterface)**() override |
| virtual int | **[Rank](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-rank)**() const override<br>return the sorting order for this resolver lower means it will be tried first  |
| virtual std::string_view | **[ResolverName](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-resolvername)**() const override<br>get printable name  |
| virtual bool | **[MaybeHookDNS](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-maybehookdns)**(std::shared_ptr< [dns::PacketSource_Base](Classes/classllarp_1_1dns_1_1PacketSource__Base.md) > source, const [dns::Message](Classes/structllarp_1_1dns_1_1Message.md) & query, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & to, const [SockAddr](Classes/structllarp_1_1SockAddr.md) & from) override<br>attempt to handle a dns message returns true if we consumed this query and it should not be processed again  |
| virtual path::PathSet_ptr | **[GetSelf](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-getself)**() override<br>get a shared_ptr of ourself  |
| virtual std::weak_ptr< [path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md) > | **[GetWeak](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-getweak)**() override<br>get a weak_ptr of ourself  |
| virtual void | **[Thaw](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-thaw)**() override |
| void | **[ReconfigureDNS](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-reconfiguredns)**(std::vector< [SockAddr](Classes/structllarp_1_1SockAddr.md) > servers) |
| virtual bool | **[Configure](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-configure)**(const [NetworkConfig](Classes/structllarp_1_1NetworkConfig.md) & conf, const [DnsConfig](Classes/structllarp_1_1DnsConfig.md) & dnsConf) override |
| virtual void | **[SendPacketToRemote](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-sendpackettoremote)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & , service::ProtocolType ) override |
| virtual std::string | **[GetIfName](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-getifname)**() const override |
| virtual void | **[Tick](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-tick)**(llarp_time_t now) override<br>tick owned paths  |
| virtual util::StatusObject | **[ExtractStatus](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-extractstatus)**() const override |
| virtual std::unordered_map< std::string, std::string > | **[NotifyParams](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-notifyparams)**() const override<br>construct parameters for notify hooks  |
| virtual bool | **[SupportsV6](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-supportsv6)**() const override |
| bool | **[ShouldHookDNSMessage](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-shouldhookdnsmessage)**(const [dns::Message](Classes/structllarp_1_1dns_1_1Message.md) & msg) const |
| bool | **[HandleHookedDNSMessage](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-handlehookeddnsmessage)**([dns::Message](Classes/structllarp_1_1dns_1_1Message.md) query, std::function< void([dns::Message](Classes/structllarp_1_1dns_1_1Message.md))> sendreply) |
| void | **[TickTun](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-ticktun)**(llarp_time_t now) |
| bool | **[MapAddress](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-mapaddress)**(const [service::Address](Classes/structllarp_1_1service_1_1Address.md) & remote, [huint128_t](Classes/structllarp_1_1huint__t.md) ip, bool SNode) |
| virtual bool | **[Start](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-start)**() override |
| virtual bool | **[Stop](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-stop)**() override<br>stop this pathset and mark it as to be removed  |
| bool | **[IsSNode](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-issnode)**() const |
| bool | **[SetupTun](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-setuptun)**()<br>set up tun interface, blocking  |
| void | **[SetupDNS](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-setupdns)**() |
| virtual std::shared_ptr< [dns::Server](Classes/classllarp_1_1dns_1_1Server.md) > | **[DNS](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-dns)**() const override<br>overrides Endpoint  |
| virtual bool | **[SetupNetworking](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-setupnetworking)**() override<br>overrides Endpoint  |
| virtual bool | **[HandleInboundPacket](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-handleinboundpacket)**(const [service::ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag, const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & pkt, service::ProtocolType t, uint64_t seqno) override<br>overrides Endpoint  |
| bool | **[HandleWriteIPPacket](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-handlewriteippacket)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & buf, [huint128_t](Classes/structllarp_1_1huint__t.md) src, [huint128_t](Classes/structllarp_1_1huint__t.md) dst, uint64_t seqno)<br>handle inbound traffic  |
| void | **[HandleGotUserPacket](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-handlegotuserpacket)**([llarp::net::IPPacket](Classes/structllarp_1_1net_1_1IPPacket.md) pkt)<br>we got a packet from the user  |
| virtual [huint128_t](Classes/structllarp_1_1huint__t.md) | **[GetIfAddr](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-getifaddr)**() const override<br>get the local interface's address  |
| virtual bool | **[HasIfAddr](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-hasifaddr)**() const override<br>we have an interface addr  |
| bool | **[HasLocalIP](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-haslocalip)**(const [huint128_t](Classes/structllarp_1_1huint__t.md) & ip) const |
| virtual std::optional< [net::TrafficPolicy](Classes/structllarp_1_1net_1_1TrafficPolicy.md) > | **[GetExitPolicy](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-getexitpolicy)**() const override<br>get the exit policy for our exit if we have one override me  |
| virtual std::set< [IPRange](Classes/structllarp_1_1IPRange.md) > | **[GetOwnedRanges](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-getownedranges)**() const override<br>get the ip ranges we claim to own override me  |
| virtual llarp_time_t | **[PathAlignmentTimeout](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-pathalignmenttimeout)**() const override |
| bool | **[ShouldAllowTraffic](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-shouldallowtraffic)**(const [net::IPPacket](Classes/structllarp_1_1net_1_1IPPacket.md) & pkt) const<br>ip packet against any exit policies we have returns false if this traffic is disallowed by any of those policies returns true otherwise  |
| virtual std::optional< std::variant< [service::Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > > | **[ObtainAddrForIP](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-obtainaddrforip)**([huint128_t](Classes/structllarp_1_1huint__t.md) ip) const override<br>get a key for ip address  |
| bool | **[HasAddress](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-hasaddress)**(const [AlignedBuffer](Classes/structllarp_1_1AlignedBuffer.md)< 32 > & addr) const |
| [huint128_t](Classes/structllarp_1_1huint__t.md) | **[ObtainIPForAddr](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-obtainipforaddr)**(std::variant< [service::Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > addr) override<br>get ip address for key unconditionally  |
| virtual void | **[ResetInternalState](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-resetinternalstate)**() override<br>reset all cooldown timers  |

## Protected Functions

|                | Name           |
| -------------- | -------------- |
| virtual void | **[Pump](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-pump)**(llarp_time_t now) override<br>called on event loop pump  |
| bool | **[HasRemoteForIP](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-hasremoteforip)**([huint128_t](Classes/structllarp_1_1huint__t.md) ipv4) const<br>return true if we have a remote loki address for this ip address  |
| void | **[MarkIPActive](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-markipactive)**([huint128_t](Classes/structllarp_1_1huint__t.md) ip)<br>mark this address as active  |
| void | **[MarkIPActiveForever](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-markipactiveforever)**([huint128_t](Classes/structllarp_1_1huint__t.md) ip)<br>mark this address as active forever  |
| void | **[FlushWrite](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#function-flushwrite)**()<br>flush writing ip packets to interface  |

## Protected Attributes

|                | Name           |
| -------------- | -------------- |
| util::ascending_priority_queue< [WritePacket](Classes/structllarp_1_1handlers_1_1TunEndpoint_1_1WritePacket.md) > | **[m_NetworkToUserPktQueue](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#variable-m-networktouserpktqueue)** <br>queue for sending packets to user from network  |
| std::unordered_map< [huint128_t](Classes/structllarp_1_1huint__t.md), [AlignedBuffer](Classes/structllarp_1_1AlignedBuffer.md)< 32 > > | **[m_IPToAddr](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#variable-m-iptoaddr)** <br>maps ip to key (host byte order)  |
| std::unordered_map< [AlignedBuffer](Classes/structllarp_1_1AlignedBuffer.md)< 32 >, [huint128_t](Classes/structllarp_1_1huint__t.md) > | **[m_AddrToIP](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#variable-m-addrtoip)** <br>maps key to ip (host byte order)  |
| std::unordered_map< [AlignedBuffer](Classes/structllarp_1_1AlignedBuffer.md)< 32 >, bool > | **[m_SNodes](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#variable-m-snodes)** <br>maps key to true if key is a service node, maps key to false if key is a hidden service  |
| std::unordered_map< [huint128_t](Classes/structllarp_1_1huint__t.md), [service::Address](Classes/structllarp_1_1service_1_1Address.md) > | **[m_ExitIPToExitAddress](Classes/structllarp_1_1handlers_1_1TunEndpoint.md#variable-m-exitiptoexitaddress)** <br>maps ip address to an exit endpoint, useful when we have multiple exits on a range  |

## Additional inherited members

**Public Types inherited from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)**

|                | Name           |
| -------------- | -------------- |
| using std::deque< [PendingBuffer](Classes/structllarp_1_1service_1_1PendingBuffer.md) > | **[PendingBufferQueue](Classes/structllarp_1_1service_1_1Endpoint.md#using-pendingbufferqueue)**  |
| using std::function< void([Address](Classes/structllarp_1_1service_1_1Address.md), [OutboundContext](Classes/structllarp_1_1service_1_1OutboundContext.md) *)> | **[PathEnsureHook](Classes/structllarp_1_1service_1_1Endpoint.md#using-pathensurehook)**  |
| using std::function< void(const [RouterID](Classes/structllarp_1_1RouterID.md), exit::BaseSession_ptr, [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md))> | **[SNodeEnsureHook](Classes/structllarp_1_1service_1_1Endpoint.md#using-snodeensurehook)**  |

**Protected Types inherited from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)**

|                | Name           |
| -------------- | -------------- |
| using std::unordered_map< [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md), [Session](Classes/structllarp_1_1service_1_1Session.md) > | **[ConvoMap](Classes/structllarp_1_1service_1_1Endpoint.md#using-convomap)**  |

**Public Functions inherited from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)**

|                | Name           |
| -------------- | -------------- |
| | **[Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md#function-endpoint)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r, [Context](Classes/structllarp_1_1service_1_1Context.md) * parent) |
| | **[~Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md#function-~endpoint)**() override |
| bool | **[IsReady](Classes/structllarp_1_1service_1_1Endpoint.md#function-isready)**() const<br>return true if we are ready to recv packets from the void.  |
| virtual void | **[QueueRecvData](Classes/structllarp_1_1service_1_1Endpoint.md#function-queuerecvdata)**([RecvDataEvent](Classes/structllarp_1_1service_1_1RecvDataEvent.md) ev) override |
| bool | **[IntrosetIsStale](Classes/structllarp_1_1service_1_1Endpoint.md#function-introsetisstale)**() const<br>return true if our introset has expired intros  |
| void | **[SetHandler](Classes/structllarp_1_1service_1_1Endpoint.md#function-sethandler)**([IDataHandler](Classes/structllarp_1_1service_1_1IDataHandler.md) * h) |
| std::optional< [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) > | **[GetBestConvoTagFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getbestconvotagfor)**(std::variant< [Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > addr) const override |
| virtual const EventLoop_ptr & | **[Loop](Classes/structllarp_1_1service_1_1Endpoint.md#function-loop)**() override<br>loop (via router) use when sending any data on a path  |
| [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * | **[Router](Classes/structllarp_1_1service_1_1Endpoint.md#function-router)**() |
| virtual bool | **[LoadKeyFile](Classes/structllarp_1_1service_1_1Endpoint.md#function-loadkeyfile)**() |
| virtual std::string | **[Name](Classes/structllarp_1_1service_1_1Endpoint.md#function-name)**() const override<br>get the "name" of this pathset  |
| virtual AddressVariant_t | **[LocalAddress](Classes/structllarp_1_1service_1_1Endpoint.md#function-localaddress)**() const override<br>get our local address  |
| virtual std::optional< [SendStat](Classes/structllarp_1_1EndpointBase_1_1SendStat.md) > | **[GetStatFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getstatfor)**(AddressVariant_t remote) const override<br>get statistics about how much traffic we sent and recv'd to a remote endpoint  |
| virtual std::unordered_set< AddressVariant_t > | **[AllRemoteEndpoints](Classes/structllarp_1_1service_1_1Endpoint.md#function-allremoteendpoints)**() const override<br>list all remote endpoint addresses we have that are mapped  |
| virtual bool | **[ShouldPublishDescriptors](Classes/structllarp_1_1service_1_1Endpoint.md#function-shouldpublishdescriptors)**(llarp_time_t now) const override<br>return true if we should publish a new hidden service descriptor  |
| virtual void | **[SRVRecordsChanged](Classes/structllarp_1_1service_1_1Endpoint.md#function-srvrecordschanged)**() override<br>called when srv data changes in some way  |
| virtual void | **[HandlePathDied](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlepathdied)**(path::Path_ptr path) override<br>a path died now what?  |
| virtual [vpn::EgresPacketRouter](Classes/classllarp_1_1vpn_1_1EgresPacketRouter.md) * | **[EgresPacketRouter](Classes/structllarp_1_1service_1_1Endpoint.md#function-egrespacketrouter)**() |
| virtual bool | **[PublishIntroSet](Classes/structllarp_1_1service_1_1Endpoint.md#function-publishintroset)**(const [EncryptedIntroSet](Classes/structllarp_1_1service_1_1EncryptedIntroSet.md) & i, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| bool | **[PublishIntroSetVia](Classes/structllarp_1_1service_1_1Endpoint.md#function-publishintrosetvia)**(const [EncryptedIntroSet](Classes/structllarp_1_1service_1_1EncryptedIntroSet.md) & i, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r, path::Path_ptr p, uint64_t relayOrder) |
| virtual bool | **[HandleGotIntroMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlegotintromessage)**(std::shared_ptr< const [dht::GotIntroMessage](Classes/structllarp_1_1dht_1_1GotIntroMessage.md) > ) override<br>override me in subtype  |
| virtual bool | **[HandleGotRouterMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlegotroutermessage)**(std::shared_ptr< const [dht::GotRouterMessage](Classes/structllarp_1_1dht_1_1GotRouterMessage.md) > ) override<br>override me in subtype  |
| virtual bool | **[HandleGotNameMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlegotnamemessage)**(std::shared_ptr< const [dht::GotNameMessage](Classes/structllarp_1_1dht_1_1GotNameMessage.md) > ) override<br>override me in subtype  |
| bool | **[HandleHiddenServiceFrame](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlehiddenserviceframe)**(path::Path_ptr p, const [service::ProtocolFrame](Classes/structllarp_1_1service_1_1ProtocolFrame.md) & msg) |
| void | **[SetEndpointAuth](Classes/structllarp_1_1service_1_1Endpoint.md#function-setendpointauth)**(std::shared_ptr< [IAuthPolicy](Classes/structllarp_1_1service_1_1IAuthPolicy.md) > policy) |
| void | **[SetAuthInfoForEndpoint](Classes/structllarp_1_1service_1_1Endpoint.md#function-setauthinfoforendpoint)**([Address](Classes/structllarp_1_1service_1_1Address.md) remote, [AuthInfo](Classes/structllarp_1_1service_1_1AuthInfo.md) info)<br>sets how we authenticate with remote address  |
| bool | **[HasPendingPathToService](Classes/structllarp_1_1service_1_1Endpoint.md#function-haspendingpathtoservice)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & remote) const<br>return true if we have a pending job to build to a hidden service but it's not done yet  |
| virtual bool | **[HandleDataMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handledatamessage)**(path::Path_ptr path, const [PathID_t](Classes/structllarp_1_1PathID__t.md) from, std::shared_ptr< [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > msg) override |
| bool | **[ProcessDataMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-processdatamessage)**(std::shared_ptr< [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > msg) |
| void | **[EnsureRouterIsKnown](Classes/structllarp_1_1service_1_1Endpoint.md#function-ensurerouterisknown)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & router)<br>ensure that we know a router, looks up if it doesn't  |
| bool | **[LookupRouterAnon](Classes/structllarp_1_1service_1_1Endpoint.md#function-lookuprouteranon)**([RouterID](Classes/structllarp_1_1RouterID.md) router, RouterLookupHandler handler)<br>lookup a router via closest path  |
| void | **[LookupNameAsync](Classes/structllarp_1_1service_1_1Endpoint.md#function-lookupnameasync)**(std::string name, std::function< void(std::optional< std::variant< [Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > >)> resultHandler) override |
| virtual void | **[LookupServiceAsync](Classes/structllarp_1_1service_1_1Endpoint.md#function-lookupserviceasync)**(std::string name, std::string service, std::function< void(std::vector< [dns::SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) >)> resultHandler) override<br>lookup srv records async  |
| const [Identity](Classes/structllarp_1_1service_1_1Identity.md) & | **[GetIdentity](Classes/structllarp_1_1service_1_1Endpoint.md#function-getidentity)**() const |
| void | **[MapExitRange](Classes/structllarp_1_1service_1_1Endpoint.md#function-mapexitrange)**([IPRange](Classes/structllarp_1_1IPRange.md) range, [service::Address](Classes/structllarp_1_1service_1_1Address.md) exit) |
| void | **[UnmapExitRange](Classes/structllarp_1_1service_1_1Endpoint.md#function-unmapexitrange)**([IPRange](Classes/structllarp_1_1IPRange.md) range) |
| virtual void | **[PutLookup](Classes/structllarp_1_1service_1_1Endpoint.md#function-putlookup)**([IServiceLookup](Classes/structllarp_1_1service_1_1IServiceLookup.md) * lookup, uint64_t txid) override |
| virtual void | **[HandlePathBuilt](Classes/structllarp_1_1service_1_1Endpoint.md#function-handlepathbuilt)**(path::Path_ptr path) override |
| bool | **[HandleDataDrop](Classes/structllarp_1_1service_1_1Endpoint.md#function-handledatadrop)**(path::Path_ptr p, const [PathID_t](Classes/structllarp_1_1PathID__t.md) & dst, uint64_t s) |
| bool | **[CheckPathIsDead](Classes/structllarp_1_1service_1_1Endpoint.md#function-checkpathisdead)**(path::Path_ptr p, llarp_time_t latency) |
| size_t | **[RemoveAllConvoTagsFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-removeallconvotagsfor)**([service::Address](Classes/structllarp_1_1service_1_1Address.md) remote) |
| virtual bool | **[WantsOutboundSession](Classes/structllarp_1_1service_1_1Endpoint.md#function-wantsoutboundsession)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const override<br>do we want a session outbound to addr  |
| virtual void | **[MarkAddressOutbound](Classes/structllarp_1_1service_1_1Endpoint.md#function-markaddressoutbound)**(AddressVariant_t ) override<br>this MUST be called if you want to call EnsurePathTo on the given address  |
| virtual bool | **[ShouldBundleRC](Classes/structllarp_1_1service_1_1Endpoint.md#function-shouldbundlerc)**() const override<br>should we bundle RCs in builds?  |
| virtual void | **[BlacklistSNode](Classes/structllarp_1_1service_1_1Endpoint.md#function-blacklistsnode)**(const [RouterID](Classes/structllarp_1_1RouterID.md) snode) override |
| virtual std::optional< std::variant< [Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > > | **[GetEndpointWithConvoTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-getendpointwithconvotag)**([ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) t) const override<br>maybe get an endpoint variant given its convo tag  |
| virtual bool | **[HasConvoTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasconvotag)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & t) const override |
| virtual bool | **[ShouldBuildMore](Classes/structllarp_1_1service_1_1Endpoint.md#function-shouldbuildmore)**(llarp_time_t now) const override<br>return true if we should build another path  |
| bool | **[EnsurePathTo](Classes/structllarp_1_1service_1_1Endpoint.md#function-ensurepathto)**(std::variant< [Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > addr, std::function< void(std::optional< [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) >)> hook, llarp_time_t timeout) override |
| bool | **[EnsurePathToService](Classes/structllarp_1_1service_1_1Endpoint.md#function-ensurepathtoservice)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) remote, PathEnsureHook h, llarp_time_t timeoutMS =DefaultPathEnsureTimeout)<br>return false if we have already called this function before for this address  |
| void | **[InformPathToService](Classes/structllarp_1_1service_1_1Endpoint.md#function-informpathtoservice)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) remote, [OutboundContext](Classes/structllarp_1_1service_1_1OutboundContext.md) * ctx) |
| bool | **[EnsurePathToSNode](Classes/structllarp_1_1service_1_1Endpoint.md#function-ensurepathtosnode)**(const [RouterID](Classes/structllarp_1_1RouterID.md) remote, SNodeEnsureHook h)<br>ensure a path to a service node by public key  |
| bool | **[HasPendingRouterLookup](Classes/structllarp_1_1service_1_1Endpoint.md#function-haspendingrouterlookup)**(const [RouterID](Classes/structllarp_1_1RouterID.md) remote) const<br>return true if this endpoint is trying to lookup this router right now  |
| bool | **[HasPathToSNode](Classes/structllarp_1_1service_1_1Endpoint.md#function-haspathtosnode)**(const [RouterID](Classes/structllarp_1_1RouterID.md) remote) const |
| bool | **[HasFlowToService](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasflowtoservice)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) remote) const |
| virtual void | **[PutSenderFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putsenderfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag, const [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & info, bool inbound) override |
| virtual bool | **[HasInboundConvo](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasinboundconvo)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const override |
| virtual bool | **[HasOutboundConvo](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasoutboundconvo)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const override |
| virtual bool | **[GetCachedSessionKeyFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getcachedsessionkeyfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & secret) const override |
| virtual void | **[PutCachedSessionKeyFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putcachedsessionkeyfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & secret) override |
| virtual bool | **[GetSenderFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getsenderfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & si) const override |
| virtual void | **[PutIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) override |
| virtual bool | **[GetIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const override |
| virtual void | **[RemoveConvoTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-removeconvotag)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote) override |
| virtual void | **[ConvoTagTX](Classes/structllarp_1_1service_1_1Endpoint.md#function-convotagtx)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) override<br>called when we send data to remote on a convotag  |
| virtual void | **[ConvoTagRX](Classes/structllarp_1_1service_1_1Endpoint.md#function-convotagrx)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) override<br>called when we got data from remote on a convotag  |
| virtual void | **[PutReplyIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putreplyintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) override |
| virtual bool | **[GetReplyIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getreplyintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const override |
| virtual bool | **[GetConvoTagsForService](Classes/structllarp_1_1service_1_1Endpoint.md#function-getconvotagsforservice)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & si, std::set< [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) > & tag) const override |
| void | **[PutNewOutboundContext](Classes/structllarp_1_1service_1_1Endpoint.md#function-putnewoutboundcontext)**(const [IntroSet](Classes/structllarp_1_1service_1_1IntroSet.md) & introset, llarp_time_t timeLeftToAlign) |
| std::optional< uint64_t > | **[GetSeqNoForConvo](Classes/structllarp_1_1service_1_1Endpoint.md#function-getseqnoforconvo)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) |
| size_t | **[UniqueEndpoints](Classes/structllarp_1_1service_1_1Endpoint.md#function-uniqueendpoints)**() const<br>count unique endpoints we are talking to  |
| bool | **[HasExit](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasexit)**() const |
| virtual std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsForBuild](Classes/structllarp_1_1service_1_1Endpoint.md#function-gethopsforbuild)**() override |
| std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsForBuildWithEndpoint](Classes/structllarp_1_1service_1_1Endpoint.md#function-gethopsforbuildwithendpoint)**([RouterID](Classes/structllarp_1_1RouterID.md) endpoint) |
| virtual void | **[PathBuildStarted](Classes/structllarp_1_1service_1_1Endpoint.md#function-pathbuildstarted)**(path::Path_ptr path) override |
| virtual void | **[IntroSetPublishFail](Classes/structllarp_1_1service_1_1Endpoint.md#function-introsetpublishfail)**() |
| virtual void | **[IntroSetPublished](Classes/structllarp_1_1service_1_1Endpoint.md#function-introsetpublished)**() |
| void | **[AsyncProcessAuthMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-asyncprocessauthmessage)**(std::shared_ptr< [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > msg, std::function< void([AuthResult](Classes/structllarp_1_1service_1_1AuthResult.md))> hook) |
| void | **[SendAuthResult](Classes/structllarp_1_1service_1_1Endpoint.md#function-sendauthresult)**(path::Path_ptr path, [PathID_t](Classes/structllarp_1_1PathID__t.md) replyPath, [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag, [AuthResult](Classes/structllarp_1_1service_1_1AuthResult.md) st) |
| uint64_t | **[GenTXID](Classes/structllarp_1_1service_1_1Endpoint.md#function-gentxid)**() |
| void | **[ResetConvoTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-resetconvotag)**([ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag, path::Path_ptr path, [PathID_t](Classes/structllarp_1_1PathID__t.md) from) |
| const std::set< [RouterID](Classes/structllarp_1_1RouterID.md) > & | **[SnodeBlacklist](Classes/structllarp_1_1service_1_1Endpoint.md#function-snodeblacklist)**() const |
| virtual bool | **[SendToOrQueue](Classes/structllarp_1_1service_1_1Endpoint.md#function-sendtoorqueue)**([ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag, const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & payload, ProtocolType t) override |
| bool | **[SendToOrQueue](Classes/structllarp_1_1service_1_1Endpoint.md#function-sendtoorqueue)**(const std::variant< [Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > & addr, const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & payload, ProtocolType t) |
| bool | **[SendToOrQueue](Classes/structllarp_1_1service_1_1Endpoint.md#function-sendtoorqueue)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr, const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & payload, ProtocolType t) |
| bool | **[SendToOrQueue](Classes/structllarp_1_1service_1_1Endpoint.md#function-sendtoorqueue)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & addr, const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & payload, ProtocolType t) |
| std::optional< [AuthInfo](Classes/structllarp_1_1service_1_1AuthInfo.md) > | **[MaybeGetAuthInfoForEndpoint](Classes/structllarp_1_1service_1_1Endpoint.md#function-maybegetauthinfoforendpoint)**([service::Address](Classes/structllarp_1_1service_1_1Address.md) addr) |
| virtual [quic::TunnelManager](Classes/classllarp_1_1quic_1_1TunnelManager.md) * | **[GetQUICTunnel](Classes/structllarp_1_1service_1_1Endpoint.md#function-getquictunnel)**() override<br>Returns a pointer to the quic::Tunnel object handling quic connections for this endpoint.  |

**Protected Functions inherited from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)**

|                | Name           |
| -------------- | -------------- |
| void | **[RegenAndPublishIntroSet](Classes/structllarp_1_1service_1_1Endpoint.md#function-regenandpublishintroset)**() |
| [IServiceLookup](Classes/structllarp_1_1service_1_1IServiceLookup.md) * | **[GenerateLookupByTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-generatelookupbytag)**(const [Tag](Classes/structllarp_1_1service_1_1Tag.md) & tag) |
| void | **[PrefetchServicesByTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-prefetchservicesbytag)**(const [Tag](Classes/structllarp_1_1service_1_1Tag.md) & tag) |
| bool | **[ReadyToDoLookup](Classes/structllarp_1_1service_1_1Endpoint.md#function-readytodolookup)**(size_t num_paths) const |
| [path::Path::UniqueEndpointSet_t](Classes/structllarp_1_1path_1_1Path.md#using-uniqueendpointset-t) | **[GetUniqueEndpointsForLookup](Classes/structllarp_1_1service_1_1Endpoint.md#function-getuniqueendpointsforlookup)**() const |
| void | **[FlushRecvData](Classes/structllarp_1_1service_1_1Endpoint.md#function-flushrecvdata)**() |
| const [IntroSet](Classes/structllarp_1_1service_1_1IntroSet.md) & | **[introSet](Classes/structllarp_1_1service_1_1Endpoint.md#function-introset)**() const |
| [IntroSet](Classes/structllarp_1_1service_1_1IntroSet.md) & | **[introSet](Classes/structllarp_1_1service_1_1Endpoint.md#function-introset)**() |
| const ConvoMap & | **[Sessions](Classes/structllarp_1_1service_1_1Endpoint.md#function-sessions)**() const |
| ConvoMap & | **[Sessions](Classes/structllarp_1_1service_1_1Endpoint.md#function-sessions)**() |

**Public Attributes inherited from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)**

|                | Name           |
| -------------- | -------------- |
| constexpr auto | **[DefaultPathEnsureTimeout](Classes/structllarp_1_1service_1_1Endpoint.md#variable-defaultpathensuretimeout)**  |
| [SendMessageQueue_t](Classes/classllarp_1_1thread_1_1Queue.md) | **[m_SendQueue](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-sendqueue)**  |

**Protected Attributes inherited from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)**

|                | Name           |
| -------------- | -------------- |
| [Context](Classes/structllarp_1_1service_1_1Context.md) *const | **[context](Classes/structllarp_1_1service_1_1Endpoint.md#variable-context)** <br>parent context that owns this endpoint  |
| [IDataHandler](Classes/structllarp_1_1service_1_1IDataHandler.md) * | **[m_DataHandler](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-datahandler)**  |
| [Identity](Classes/structllarp_1_1service_1_1Identity.md) | **[m_Identity](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-identity)**  |
| [net::IPRangeMap](Classes/structllarp_1_1net_1_1IPRangeMap.md)< [service::Address](Classes/structllarp_1_1service_1_1Address.md) > | **[m_ExitMap](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-exitmap)**  |
| bool | **[m_PublishIntroSet](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-publishintroset)**  |
| std::unique_ptr< [EndpointState](Classes/structllarp_1_1service_1_1EndpointState.md) > | **[m_state](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-state)**  |
| std::shared_ptr< [IAuthPolicy](Classes/structllarp_1_1service_1_1IAuthPolicy.md) > | **[m_AuthPolicy](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-authpolicy)**  |
| std::unordered_map< [Address](Classes/structllarp_1_1service_1_1Address.md), [AuthInfo](Classes/structllarp_1_1service_1_1AuthInfo.md) > | **[m_RemoteAuthInfos](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-remoteauthinfos)**  |
| std::unique_ptr< [quic::TunnelManager](Classes/classllarp_1_1quic_1_1TunnelManager.md) > | **[m_quic](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-quic)**  |
| std::unordered_map< std::string, std::pair< std::optional< [IPRange](Classes/structllarp_1_1IPRange.md) >, std::optional< [AuthInfo](Classes/structllarp_1_1service_1_1AuthInfo.md) > > > | **[m_StartupLNSMappings](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-startuplnsmappings)** <br>(lns name, optional exit range, optional auth info) for looking up on startup  |
| [RecvPacketQueue_t](Classes/classllarp_1_1thread_1_1Queue.md) | **[m_InboundTrafficQueue](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-inboundtrafficqueue)**  |
| [thread::Queue](Classes/classllarp_1_1thread_1_1Queue.md)< [RecvDataEvent](Classes/structllarp_1_1service_1_1RecvDataEvent.md) > | **[m_RecvQueue](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-recvqueue)**  |
| [util::DecayingHashSet](Classes/structllarp_1_1util_1_1DecayingHashSet.md)< [Address](Classes/structllarp_1_1service_1_1Address.md) > | **[m_IntrosetLookupFilter](Classes/structllarp_1_1service_1_1Endpoint.md#variable-m-introsetlookupfilter)** <br>for rate limiting introset lookups  |

**Friends inherited from [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)**

|                | Name           |
| -------------- | -------------- |
| struct | **[EndpointUtil](Classes/structllarp_1_1service_1_1Endpoint.md#friend-endpointutil)**  |

**Public Functions inherited from [llarp::dns::Resolver_Base](Classes/classllarp_1_1dns_1_1Resolver__Base.md)**

|                | Name           |
| -------------- | -------------- |
| virtual | **[~Resolver_Base](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-~resolver-base)**() =default |
| bool | **[operator<](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-operator<)**(const [Resolver_Base](Classes/classllarp_1_1dns_1_1Resolver__Base.md) & other) const<br>less than via rank  |
| bool | **[operator>](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-operator>)**(const [Resolver_Base](Classes/classllarp_1_1dns_1_1Resolver__Base.md) & other) const<br>greater than via rank  |
| virtual std::optional< [SockAddr](Classes/structllarp_1_1SockAddr.md) > | **[GetLocalAddr](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-getlocaladdr)**() const<br>get local socket address that queries are sent from  |
| virtual void | **[ResetResolver](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-resetresolver)**(std::optional< std::vector< [SockAddr](Classes/structllarp_1_1SockAddr.md) > > replace_upstream =std::nullopt)<br>reset the resolver state, optionally replace upstream info with new info.  |
| virtual void | **[Down](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-down)**()<br>cancel all pending requests and cease further operation. Default operation is a no-op.  |

**Public Functions inherited from [llarp::path::Builder](Classes/structllarp_1_1path_1_1Builder.md)**

|                | Name           |
| -------------- | -------------- |
| | **[Builder](Classes/structllarp_1_1path_1_1Builder.md#function-builder)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * p_router, size_t numDesiredPaths, size_t numHops)<br>construct  |
| virtual | **[~Builder](Classes/structllarp_1_1path_1_1Builder.md#function-~builder)**() =default |
| virtual bool | **[ShouldBuildMore](Classes/structllarp_1_1path_1_1Builder.md#function-shouldbuildmore)**(llarp_time_t now) const override<br>return true if we should build another path  |
| virtual bool | **[ShouldBundleRC](Classes/structllarp_1_1path_1_1Builder.md#function-shouldbundlerc)**() const =0<br>should we bundle RCs in builds?  |
| bool | **[BuildCooldownHit](Classes/structllarp_1_1path_1_1Builder.md#function-buildcooldownhit)**(llarp_time_t now) const<br>return true if we hit our soft limit for building paths too fast  |
| virtual PathRole | **[GetRoles](Classes/structllarp_1_1path_1_1Builder.md#function-getroles)**() const<br>get roles for this path builder  |
| [BuildStats](Classes/structllarp_1_1path_1_1BuildStats.md) | **[CurrentBuildStats](Classes/structllarp_1_1path_1_1Builder.md#function-currentbuildstats)**() const |
| virtual bool | **[IsStopped](Classes/structllarp_1_1path_1_1Builder.md#function-isstopped)**() const override<br>return true if we are stopped  |
| virtual bool | **[ShouldRemove](Classes/structllarp_1_1path_1_1Builder.md#function-shouldremove)**() const override<br>return true if we can and should remove this pathset and underlying resources from its parent context  |
| virtual llarp_time_t | **[Now](Classes/structllarp_1_1path_1_1Builder.md#function-now)**() const override<br>get time from event loop  |
| virtual void | **[BuildOne](Classes/structllarp_1_1path_1_1Builder.md#function-buildone)**(PathRole roles =ePathRoleAny) override |
| virtual bool | **[BuildOneAlignedTo](Classes/structllarp_1_1path_1_1Builder.md#function-buildonealignedto)**(const [RouterID](Classes/structllarp_1_1RouterID.md) endpoint) override |
| std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsAlignedToForBuild](Classes/structllarp_1_1path_1_1Builder.md#function-gethopsalignedtoforbuild)**([RouterID](Classes/structllarp_1_1RouterID.md) endpoint, const std::set< [RouterID](Classes/structllarp_1_1RouterID.md) > & exclude ={}) |
| virtual void | **[Build](Classes/structllarp_1_1path_1_1Builder.md#function-build)**(std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > hops, PathRole roles =ePathRoleAny) override<br>manual build on these hops  |
| std::optional< [RouterContact](Classes/structllarp_1_1RouterContact.md) > | **[SelectFirstHop](Classes/structllarp_1_1path_1_1Builder.md#function-selectfirsthop)**(const std::set< [RouterID](Classes/structllarp_1_1RouterID.md) > & exclude ={}) const<br>pick a first hop  |
| virtual std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsForBuild](Classes/structllarp_1_1path_1_1Builder.md#function-gethopsforbuild)**() override |
| void | **[ManualRebuild](Classes/structllarp_1_1path_1_1Builder.md#function-manualrebuild)**(size_t N, PathRole roles =ePathRoleAny) |
| virtual const [SecretKey](Classes/structllarp_1_1SecretKey.md) & | **[GetTunnelEncryptionSecretKey](Classes/structllarp_1_1path_1_1Builder.md#function-gettunnelencryptionsecretkey)**() const |
| virtual void | **[HandlePathBuilt](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuilt)**(Path_ptr p) override |
| virtual void | **[HandlePathBuildTimeout](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuildtimeout)**(Path_ptr p) override |
| virtual void | **[HandlePathBuildFailedAt](Classes/structllarp_1_1path_1_1Builder.md#function-handlepathbuildfailedat)**(Path_ptr p, [RouterID](Classes/structllarp_1_1RouterID.md) hop) override |

**Protected Functions inherited from [llarp::path::Builder](Classes/structllarp_1_1path_1_1Builder.md)**

|                | Name           |
| -------------- | -------------- |
| virtual bool | **[UrgentBuild](Classes/structllarp_1_1path_1_1Builder.md#function-urgentbuild)**(llarp_time_t now) const |
| bool | **[BuildCooldownHit](Classes/structllarp_1_1path_1_1Builder.md#function-buildcooldownhit)**([RouterID](Classes/structllarp_1_1RouterID.md) edge) const<br>return true if we hit our soft limit for building paths too fast on a first hop  |

**Public Attributes inherited from [llarp::path::Builder](Classes/structllarp_1_1path_1_1Builder.md)**

|                | Name           |
| -------------- | -------------- |
| [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) *const | **[m_router](Classes/structllarp_1_1path_1_1Builder.md#variable-m-router)**  |
| [SecretKey](Classes/structllarp_1_1SecretKey.md) | **[enckey](Classes/structllarp_1_1path_1_1Builder.md#variable-enckey)**  |
| size_t | **[numHops](Classes/structllarp_1_1path_1_1Builder.md#variable-numhops)**  |
| llarp_time_t | **[lastBuild](Classes/structllarp_1_1path_1_1Builder.md#variable-lastbuild)**  |
| llarp_time_t | **[buildIntervalLimit](Classes/structllarp_1_1path_1_1Builder.md#variable-buildintervallimit)**  |

**Protected Attributes inherited from [llarp::path::Builder](Classes/structllarp_1_1path_1_1Builder.md)**

|                | Name           |
| -------------- | -------------- |
| std::atomic< bool > | **[_run](Classes/structllarp_1_1path_1_1Builder.md#variable--run)** <br>flag for [PathSet::Stop()]() |

**Public Functions inherited from [llarp::service::ILookupHolder](Classes/structllarp_1_1service_1_1ILookupHolder.md)**

|                | Name           |
| -------------- | -------------- |
| virtual void | **[PutLookup](Classes/structllarp_1_1service_1_1ILookupHolder.md#function-putlookup)**([IServiceLookup](Classes/structllarp_1_1service_1_1IServiceLookup.md) * l, uint64_t txid) =0 |

**Public Functions inherited from [llarp::service::IDataHandler](Classes/structllarp_1_1service_1_1IDataHandler.md)**

|                | Name           |
| -------------- | -------------- |
| virtual bool | **[HandleDataMessage](Classes/structllarp_1_1service_1_1IDataHandler.md#function-handledatamessage)**(path::Path_ptr path, const [PathID_t](Classes/structllarp_1_1PathID__t.md) from, std::shared_ptr< [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > msg) =0 |
| virtual bool | **[GetCachedSessionKeyFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getcachedsessionkeyfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & secret) const =0 |
| virtual void | **[PutCachedSessionKeyFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putcachedsessionkeyfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & secret) =0 |
| virtual void | **[ConvoTagTX](Classes/structllarp_1_1service_1_1IDataHandler.md#function-convotagtx)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) =0<br>called when we send data to remote on a convotag  |
| virtual void | **[ConvoTagRX](Classes/structllarp_1_1service_1_1IDataHandler.md#function-convotagrx)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) =0<br>called when we got data from remote on a convotag  |
| virtual void | **[RemoveConvoTag](Classes/structllarp_1_1service_1_1IDataHandler.md#function-removeconvotag)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote) =0 |
| virtual bool | **[HasConvoTag](Classes/structllarp_1_1service_1_1IDataHandler.md#function-hasconvotag)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote) const =0 |
| virtual void | **[PutSenderFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putsenderfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & si, bool inbound) =0 |
| virtual bool | **[GetSenderFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getsenderfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & si) const =0 |
| virtual void | **[PutIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) =0 |
| virtual bool | **[GetIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const =0 |
| virtual void | **[PutReplyIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putreplyintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) =0 |
| virtual bool | **[GetReplyIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getreplyintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const =0 |
| virtual bool | **[GetConvoTagsForService](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getconvotagsforservice)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & si, std::set< [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) > & tag) const =0 |
| virtual bool | **[HasInboundConvo](Classes/structllarp_1_1service_1_1IDataHandler.md#function-hasinboundconvo)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const =0 |
| virtual bool | **[HasOutboundConvo](Classes/structllarp_1_1service_1_1IDataHandler.md#function-hasoutboundconvo)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const =0 |
| virtual bool | **[WantsOutboundSession](Classes/structllarp_1_1service_1_1IDataHandler.md#function-wantsoutboundsession)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const =0<br>do we want a session outbound to addr  |
| virtual void | **[QueueRecvData](Classes/structllarp_1_1service_1_1IDataHandler.md#function-queuerecvdata)**([RecvDataEvent](Classes/structllarp_1_1service_1_1RecvDataEvent.md) ev) =0 |

**Public Classes inherited from [llarp::EndpointBase](Classes/classllarp_1_1EndpointBase.md)**

|                | Name           |
| -------------- | -------------- |
| struct | **[QUICMappingInfo](Classes/structllarp_1_1EndpointBase_1_1QUICMappingInfo.md)** <br>info about a quic mapping  |
| struct | **[SendStat](Classes/structllarp_1_1EndpointBase_1_1SendStat.md)**  |

**Public Types inherited from [llarp::EndpointBase](Classes/classllarp_1_1EndpointBase.md)**

|                | Name           |
| -------------- | -------------- |
| using std::variant< [service::Address](Classes/structllarp_1_1service_1_1Address.md), [RouterID](Classes/structllarp_1_1RouterID.md) > | **[AddressVariant_t](Classes/classllarp_1_1EndpointBase.md#using-addressvariant-t)**  |

**Public Functions inherited from [llarp::EndpointBase](Classes/classllarp_1_1EndpointBase.md)**

|                | Name           |
| -------------- | -------------- |
| virtual | **[~EndpointBase](Classes/classllarp_1_1EndpointBase.md#function-~endpointbase)**() =default |
| std::optional< [QUICMappingInfo](Classes/structllarp_1_1EndpointBase_1_1QUICMappingInfo.md) > | **[GetQUICMappingInfoByID](Classes/classllarp_1_1EndpointBase.md#function-getquicmappinginfobyid)**(int stream_id) const<br>maybe get quic mapping info given its stream id returns std::nullopt if we have no stream given that id  |
| void | **[PutSRVRecord](Classes/classllarp_1_1EndpointBase.md#function-putsrvrecord)**([dns::SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) srv)<br>add an srv record to this endpoint's descriptor  |
| virtual void | **[SRVRecordsChanged](Classes/classllarp_1_1EndpointBase.md#function-srvrecordschanged)**() =0<br>called when srv data changes in some way  |
| bool | **[DelSRVRecordIf](Classes/classllarp_1_1EndpointBase.md#function-delsrvrecordif)**(std::function< bool(const [dns::SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) &)> filter)<br>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](Classes/structllarp_1_1dns_1_1SRVData.md) > | **[SRVRecords](Classes/classllarp_1_1EndpointBase.md#function-srvrecords)**() const<br>get copy of all srv records  |
| virtual std::optional< [SendStat](Classes/structllarp_1_1EndpointBase_1_1SendStat.md) > | **[GetStatFor](Classes/classllarp_1_1EndpointBase.md#function-getstatfor)**(AddressVariant_t remote) const =0<br>get statistics about how much traffic we sent and recv'd to a remote endpoint  |
| virtual std::unordered_set< AddressVariant_t > | **[AllRemoteEndpoints](Classes/classllarp_1_1EndpointBase.md#function-allremoteendpoints)**() const =0<br>list all remote endpoint addresses we have that are mapped  |
| virtual AddressVariant_t | **[LocalAddress](Classes/classllarp_1_1EndpointBase.md#function-localaddress)**() const =0<br>get our local address  |
| virtual [quic::TunnelManager](Classes/classllarp_1_1quic_1_1TunnelManager.md) * | **[GetQUICTunnel](Classes/classllarp_1_1EndpointBase.md#function-getquictunnel)**() =0 |
| virtual std::optional< AddressVariant_t > | **[GetEndpointWithConvoTag](Classes/classllarp_1_1EndpointBase.md#function-getendpointwithconvotag)**([service::ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag) const =0 |
| virtual std::optional< [service::ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) > | **[GetBestConvoTagFor](Classes/classllarp_1_1EndpointBase.md#function-getbestconvotagfor)**(AddressVariant_t addr) const =0 |
| virtual bool | **[EnsurePathTo](Classes/classllarp_1_1EndpointBase.md#function-ensurepathto)**(AddressVariant_t addr, std::function< void(std::optional< [service::ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) >)> hook, llarp_time_t timeout) =0 |
| virtual void | **[LookupNameAsync](Classes/classllarp_1_1EndpointBase.md#function-lookupnameasync)**(std::string name, std::function< void(std::optional< AddressVariant_t >)> resultHandler) =0 |
| virtual const EventLoop_ptr & | **[Loop](Classes/classllarp_1_1EndpointBase.md#function-loop)**() =0 |
| virtual bool | **[SendToOrQueue](Classes/classllarp_1_1EndpointBase.md#function-sendtoorqueue)**([service::ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag, const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & payload, service::ProtocolType t) =0 |
| virtual void | **[LookupServiceAsync](Classes/classllarp_1_1EndpointBase.md#function-lookupserviceasync)**(std::string name, std::string service, std::function< void(std::vector< [dns::SRVData](Classes/structllarp_1_1dns_1_1SRVData.md) >)> resultHandler) =0<br>lookup srv records async  |
| virtual void | **[MarkAddressOutbound](Classes/classllarp_1_1EndpointBase.md#function-markaddressoutbound)**(AddressVariant_t remote) =0 |

**Protected Types inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | Name           |
| -------------- | -------------- |
| using [util::NullMutex](Classes/structllarp_1_1util_1_1NullMutex.md) | **[Mtx_t](Classes/structllarp_1_1path_1_1PathSet.md#using-mtx-t)**  |
| using [util::NullLock](Classes/structllarp_1_1util_1_1NullLock.md) | **[Lock_t](Classes/structllarp_1_1path_1_1PathSet.md#using-lock-t)**  |
| using std::unordered_map< std::pair< [RouterID](Classes/structllarp_1_1RouterID.md), [PathID_t](Classes/structllarp_1_1PathID__t.md) >, Path_ptr > | **[PathMap_t](Classes/structllarp_1_1path_1_1PathSet.md#using-pathmap-t)**  |

**Public Functions inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | Name           |
| -------------- | -------------- |
| | **[PathSet](Classes/structllarp_1_1path_1_1PathSet.md#function-pathset)**(size_t numDesiredPaths)<br>construct @params numDesiredPaths the number of paths to maintain  |
| virtual void | **[BuildOne](Classes/structllarp_1_1path_1_1PathSet.md#function-buildone)**(PathRole roles =ePathRoleAny) =0 |
| virtual void | **[Build](Classes/structllarp_1_1path_1_1PathSet.md#function-build)**(std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > hops, PathRole roles =ePathRoleAny) =0<br>manual build on these hops  |
| size_t | **[NumPathsExistingAt](Classes/structllarp_1_1path_1_1PathSet.md#function-numpathsexistingat)**(llarp_time_t futureTime) const<br>count the number of paths that will exist at this timestamp in future  |
| virtual void | **[HandlePathBuilt](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuilt)**(Path_ptr path) =0 |
| virtual void | **[HandlePathBuildTimeout](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuildtimeout)**(Path_ptr path) |
| virtual void | **[HandlePathBuildFailedAt](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathbuildfailedat)**(Path_ptr path, [RouterID](Classes/structllarp_1_1RouterID.md) hop) |
| virtual void | **[PathBuildStarted](Classes/structllarp_1_1path_1_1PathSet.md#function-pathbuildstarted)**(Path_ptr path) |
| virtual void | **[HandlePathDied](Classes/structllarp_1_1path_1_1PathSet.md#function-handlepathdied)**(Path_ptr path)<br>a path died now what?  |
| bool | **[GetNewestIntro](Classes/structllarp_1_1path_1_1PathSet.md#function-getnewestintro)**([service::Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const |
| void | **[AddPath](Classes/structllarp_1_1path_1_1PathSet.md#function-addpath)**(Path_ptr path) |
| Path_ptr | **[GetByUpstream](Classes/structllarp_1_1path_1_1PathSet.md#function-getbyupstream)**([RouterID](Classes/structllarp_1_1RouterID.md) remote, [PathID_t](Classes/structllarp_1_1PathID__t.md) rxid) const |
| void | **[ExpirePaths](Classes/structllarp_1_1path_1_1PathSet.md#function-expirepaths)**(llarp_time_t now, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * router) |
| size_t | **[NumInStatus](Classes/structllarp_1_1path_1_1PathSet.md#function-numinstatus)**(PathStatus st) const<br>get the number of paths in this status  |
| size_t | **[AvailablePaths](Classes/structllarp_1_1path_1_1PathSet.md#function-availablepaths)**(PathRole role) const<br>get the number of paths that match the role that are available  |
| virtual llarp_time_t | **[Now](Classes/structllarp_1_1path_1_1PathSet.md#function-now)**() const =0<br>get time from event loop  |
| virtual bool | **[IsStopped](Classes/structllarp_1_1path_1_1PathSet.md#function-isstopped)**() const =0<br>return true if we are stopped  |
| virtual std::string | **[Name](Classes/structllarp_1_1path_1_1PathSet.md#function-name)**() const =0<br>get the "name" of this pathset  |
| virtual bool | **[ShouldRemove](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldremove)**() const =0<br>return true if we can and should remove this pathset and underlying resources from its parent context  |
| virtual bool | **[ShouldBuildMore](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldbuildmore)**(llarp_time_t now) const<br>return true if we should build another path  |
| virtual bool | **[ShouldBuildMoreForRoles](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldbuildmoreforroles)**(llarp_time_t now, PathRole roles) const<br>return true if we need another path with the given path roles  |
| virtual size_t | **[MinRequiredForRoles](Classes/structllarp_1_1path_1_1PathSet.md#function-minrequiredforroles)**(PathRole roles) const<br>return the minimum number of paths we want for given roles  |
| virtual bool | **[ShouldPublishDescriptors](Classes/structllarp_1_1path_1_1PathSet.md#function-shouldpublishdescriptors)**(llarp_time_t now) const<br>return true if we should publish a new hidden service descriptor  |
| virtual void | **[BlacklistSNode](Classes/structllarp_1_1path_1_1PathSet.md#function-blacklistsnode)**(const RouterID) =0 |
| virtual bool | **[HandleGotIntroMessage](Classes/structllarp_1_1path_1_1PathSet.md#function-handlegotintromessage)**(std::shared_ptr< const [dht::GotIntroMessage](Classes/structllarp_1_1dht_1_1GotIntroMessage.md) > )<br>override me in subtype  |
| virtual bool | **[HandleGotRouterMessage](Classes/structllarp_1_1path_1_1PathSet.md#function-handlegotroutermessage)**(std::shared_ptr< const [dht::GotRouterMessage](Classes/structllarp_1_1dht_1_1GotRouterMessage.md) > )<br>override me in subtype  |
| virtual bool | **[HandleGotNameMessage](Classes/structllarp_1_1path_1_1PathSet.md#function-handlegotnamemessage)**(std::shared_ptr< const [dht::GotNameMessage](Classes/structllarp_1_1dht_1_1GotNameMessage.md) > )<br>override me in subtype  |
| virtual [routing::IMessageHandler](Classes/structllarp_1_1routing_1_1IMessageHandler.md) * | **[GetDHTHandler](Classes/structllarp_1_1path_1_1PathSet.md#function-getdhthandler)**() |
| Path_ptr | **[GetEstablishedPathClosestTo](Classes/structllarp_1_1path_1_1PathSet.md#function-getestablishedpathclosestto)**([RouterID](Classes/structllarp_1_1RouterID.md) router, std::unordered_set< [RouterID](Classes/structllarp_1_1RouterID.md) > excluding ={}, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[PickEstablishedPath](Classes/structllarp_1_1path_1_1PathSet.md#function-pickestablishedpath)**(PathRole roles =ePathRoleAny) const |
| Path_ptr | **[PickRandomEstablishedPath](Classes/structllarp_1_1path_1_1PathSet.md#function-pickrandomestablishedpath)**(PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetPathByRouter](Classes/structllarp_1_1path_1_1PathSet.md#function-getpathbyrouter)**([RouterID](Classes/structllarp_1_1RouterID.md) router, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetNewestPathByRouter](Classes/structllarp_1_1path_1_1PathSet.md#function-getnewestpathbyrouter)**([RouterID](Classes/structllarp_1_1RouterID.md) router, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetRandomPathByRouter](Classes/structllarp_1_1path_1_1PathSet.md#function-getrandompathbyrouter)**([RouterID](Classes/structllarp_1_1RouterID.md) router, PathRole roles =ePathRoleAny) const |
| Path_ptr | **[GetPathByID](Classes/structllarp_1_1path_1_1PathSet.md#function-getpathbyid)**([PathID_t](Classes/structllarp_1_1PathID__t.md) id) const |
| Path_ptr | **[GetByEndpointWithID](Classes/structllarp_1_1path_1_1PathSet.md#function-getbyendpointwithid)**([RouterID](Classes/structllarp_1_1RouterID.md) router, [PathID_t](Classes/structllarp_1_1PathID__t.md) id) const |
| std::optional< std::set< [service::Introduction](Classes/structllarp_1_1service_1_1Introduction.md) > > | **[GetCurrentIntroductionsWithFilter](Classes/structllarp_1_1path_1_1PathSet.md#function-getcurrentintroductionswithfilter)**(std::function< bool(const [service::Introduction](Classes/structllarp_1_1service_1_1Introduction.md) &)> filter) const |
| virtual bool | **[PublishIntroSet](Classes/structllarp_1_1path_1_1PathSet.md#function-publishintroset)**(const [service::EncryptedIntroSet](Classes/structllarp_1_1service_1_1EncryptedIntroSet.md) & , [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * ) |
| virtual bool | **[BuildOneAlignedTo](Classes/structllarp_1_1path_1_1PathSet.md#function-buildonealignedto)**(const [RouterID](Classes/structllarp_1_1RouterID.md) endpoint) =0 |
| virtual std::optional< std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > > | **[GetHopsForBuild](Classes/structllarp_1_1path_1_1PathSet.md#function-gethopsforbuild)**() =0 |
| void | **[ForEachPath](Classes/structllarp_1_1path_1_1PathSet.md#function-foreachpath)**(std::function< void(const Path_ptr &)> visit) const |
| void | **[UpstreamFlush](Classes/structllarp_1_1path_1_1PathSet.md#function-upstreamflush)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |
| void | **[DownstreamFlush](Classes/structllarp_1_1path_1_1PathSet.md#function-downstreamflush)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |

**Protected Functions inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | Name           |
| -------------- | -------------- |
| void | **[TickPaths](Classes/structllarp_1_1path_1_1PathSet.md#function-tickpaths)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |

**Public Attributes inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | Name           |
| -------------- | -------------- |
| constexpr size_t | **[max_paths](Classes/structllarp_1_1path_1_1PathSet.md#variable-max-paths)** <br>maximum number of paths a path set can maintain  |
| size_t | **[numDesiredPaths](Classes/structllarp_1_1path_1_1PathSet.md#variable-numdesiredpaths)**  |

**Protected Attributes inherited from [llarp::path::PathSet](Classes/structllarp_1_1path_1_1PathSet.md)**

|                | Name           |
| -------------- | -------------- |
| [BuildStats](Classes/structllarp_1_1path_1_1BuildStats.md) | **[m_BuildStats](Classes/structllarp_1_1path_1_1PathSet.md#variable-m-buildstats)**  |
| [Mtx_t](Classes/structllarp_1_1util_1_1NullMutex.md) | **[m_PathsMutex](Classes/structllarp_1_1path_1_1PathSet.md#variable-m-pathsmutex)**  |
| PathMap_t | **[m_Paths](Classes/structllarp_1_1path_1_1PathSet.md#variable-m-paths)**  |


## Public Functions Documentation

### function TunEndpoint

```cpp
TunEndpoint(
    AbstractRouter * r,
    llarp::service::Context * parent
)
```


### function ~TunEndpoint

```cpp
~TunEndpoint() override
```


### function GetVPNInterface

```cpp
inline virtual vpn::NetworkInterface * GetVPNInterface() override
```


**Reimplements**: [llarp::service::Endpoint::GetVPNInterface](Classes/structllarp_1_1service_1_1Endpoint.md#function-getvpninterface)


### function Rank

```cpp
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](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-rank)


### function ResolverName

```cpp
inline virtual std::string_view ResolverName() const override
```

get printable name 

**Reimplements**: [llarp::dns::Resolver_Base::ResolverName](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-resolvername)


### function MaybeHookDNS

```cpp
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](Classes/classllarp_1_1dns_1_1Resolver__Base.md#function-maybehookdns)


### function GetSelf

```cpp
inline virtual path::PathSet_ptr GetSelf() override
```

get a shared_ptr of ourself 

**Reimplements**: [llarp::path::PathSet::GetSelf](Classes/structllarp_1_1path_1_1PathSet.md#function-getself)


### function GetWeak

```cpp
inline virtual std::weak_ptr< path::PathSet > GetWeak() override
```

get a weak_ptr of ourself 

**Reimplements**: [llarp::path::PathSet::GetWeak](Classes/structllarp_1_1path_1_1PathSet.md#function-getweak)


### function Thaw

```cpp
virtual void Thaw() override
```


**Reimplements**: [llarp::service::Endpoint::Thaw](Classes/structllarp_1_1service_1_1Endpoint.md#function-thaw)


### function ReconfigureDNS

```cpp
void ReconfigureDNS(
    std::vector< SockAddr > servers
)
```


### function Configure

```cpp
virtual bool Configure(
    const NetworkConfig & conf,
    const DnsConfig & dnsConf
) override
```


**Reimplements**: [llarp::service::Endpoint::Configure](Classes/structllarp_1_1service_1_1Endpoint.md#function-configure)


### function SendPacketToRemote

```cpp
inline virtual void SendPacketToRemote(
    const llarp_buffer_t & ,
    service::ProtocolType 
) override
```


**Reimplements**: [llarp::path::PathSet::SendPacketToRemote](Classes/structllarp_1_1path_1_1PathSet.md#function-sendpackettoremote)


### function GetIfName

```cpp
virtual std::string GetIfName() const override
```


**Reimplements**: [llarp::service::Endpoint::GetIfName](Classes/structllarp_1_1service_1_1Endpoint.md#function-getifname)


### function Tick

```cpp
virtual void Tick(
    llarp_time_t now
) override
```

tick owned paths 

**Reimplements**: [llarp::path::Builder::Tick](Classes/structllarp_1_1path_1_1Builder.md#function-tick)


### function ExtractStatus

```cpp
virtual util::StatusObject ExtractStatus() const override
```


**Reimplements**: [llarp::service::Endpoint::ExtractStatus](Classes/structllarp_1_1service_1_1Endpoint.md#function-extractstatus)


### function NotifyParams

```cpp
virtual std::unordered_map< std::string, std::string > NotifyParams() const override
```

construct parameters for notify hooks 

**Reimplements**: [llarp::service::Endpoint::NotifyParams](Classes/structllarp_1_1service_1_1Endpoint.md#function-notifyparams)


### function SupportsV6

```cpp
virtual bool SupportsV6() const override
```


**Reimplements**: [llarp::service::Endpoint::SupportsV6](Classes/structllarp_1_1service_1_1Endpoint.md#function-supportsv6)


### function ShouldHookDNSMessage

```cpp
bool ShouldHookDNSMessage(
    const dns::Message & msg
) const
```


### function HandleHookedDNSMessage

```cpp
bool HandleHookedDNSMessage(
    dns::Message query,
    std::function< void(dns::Message)> sendreply
)
```


### function TickTun

```cpp
void TickTun(
    llarp_time_t now
)
```


### function MapAddress

```cpp
bool MapAddress(
    const service::Address & remote,
    huint128_t ip,
    bool SNode
)
```


### function Start

```cpp
virtual bool Start() override
```


**Reimplements**: [llarp::service::Endpoint::Start](Classes/structllarp_1_1service_1_1Endpoint.md#function-start)


### function Stop

```cpp
virtual bool Stop() override
```

stop this pathset and mark it as to be removed 

**Reimplements**: [llarp::path::PathSet::Stop](Classes/structllarp_1_1path_1_1PathSet.md#function-stop)


### function IsSNode

```cpp
bool IsSNode() const
```


### function SetupTun

```cpp
bool SetupTun()
```

set up tun interface, blocking 

### function SetupDNS

```cpp
void SetupDNS()
```


### function DNS

```cpp
inline virtual std::shared_ptr< dns::Server > DNS() const override
```

overrides Endpoint 

**Reimplements**: [llarp::EndpointBase::DNS](Classes/classllarp_1_1EndpointBase.md#function-dns)


### function SetupNetworking

```cpp
virtual bool SetupNetworking() override
```

overrides Endpoint 

**Reimplements**: [llarp::service::Endpoint::SetupNetworking](Classes/structllarp_1_1service_1_1Endpoint.md#function-setupnetworking)


### function HandleInboundPacket

```cpp
virtual bool HandleInboundPacket(
    const service::ConvoTag tag,
    const llarp_buffer_t & pkt,
    service::ProtocolType t,
    uint64_t seqno
) override
```

overrides Endpoint 

**Reimplements**: [llarp::service::Endpoint::HandleInboundPacket](Classes/structllarp_1_1service_1_1Endpoint.md#function-handleinboundpacket)


### function HandleWriteIPPacket

```cpp
bool HandleWriteIPPacket(
    const llarp_buffer_t & buf,
    huint128_t src,
    huint128_t dst,
    uint64_t seqno
)
```

handle inbound traffic 

### function HandleGotUserPacket

```cpp
void HandleGotUserPacket(
    llarp::net::IPPacket pkt
)
```

we got a packet from the user 

### function GetIfAddr

```cpp
virtual huint128_t GetIfAddr() const override
```

get the local interface's address 

**Reimplements**: [llarp::service::Endpoint::GetIfAddr](Classes/structllarp_1_1service_1_1Endpoint.md#function-getifaddr)


### function HasIfAddr

```cpp
inline virtual bool HasIfAddr() const override
```

we have an interface addr 

**Reimplements**: [llarp::service::Endpoint::HasIfAddr](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasifaddr)


### function HasLocalIP

```cpp
bool HasLocalIP(
    const huint128_t & ip
) const
```


### function GetExitPolicy

```cpp
inline virtual std::optional< net::TrafficPolicy > GetExitPolicy() const override
```

get the exit policy for our exit if we have one override me 

**Reimplements**: [llarp::service::Endpoint::GetExitPolicy](Classes/structllarp_1_1service_1_1Endpoint.md#function-getexitpolicy)


### function GetOwnedRanges

```cpp
inline virtual std::set< IPRange > GetOwnedRanges() const override
```

get the ip ranges we claim to own override me 

**Reimplements**: [llarp::service::Endpoint::GetOwnedRanges](Classes/structllarp_1_1service_1_1Endpoint.md#function-getownedranges)


### function PathAlignmentTimeout

```cpp
inline virtual llarp_time_t PathAlignmentTimeout() const override
```


**Reimplements**: [llarp::service::Endpoint::PathAlignmentTimeout](Classes/structllarp_1_1service_1_1Endpoint.md#function-pathalignmenttimeout)


### function ShouldAllowTraffic

```cpp
bool ShouldAllowTraffic(
    const net::IPPacket & pkt
) const
```

ip packet against any exit policies we have returns false if this traffic is disallowed by any of those policies returns true otherwise 

### function ObtainAddrForIP

```cpp
virtual std::optional< std::variant< service::Address, RouterID > > ObtainAddrForIP(
    huint128_t ip
) const override
```

get a key for ip address 

**Reimplements**: [llarp::service::Endpoint::ObtainAddrForIP](Classes/structllarp_1_1service_1_1Endpoint.md#function-obtainaddrforip)


### function HasAddress

```cpp
inline bool HasAddress(
    const AlignedBuffer< 32 > & addr
) const
```


### function ObtainIPForAddr

```cpp
huint128_t ObtainIPForAddr(
    std::variant< service::Address, RouterID > addr
) override
```

get ip address for key unconditionally 

### function ResetInternalState

```cpp
virtual void ResetInternalState() override
```

reset all cooldown timers 

**Reimplements**: [llarp::path::PathSet::ResetInternalState](Classes/structllarp_1_1path_1_1PathSet.md#function-resetinternalstate)


## Protected Functions Documentation

### function Pump

```cpp
virtual void Pump(
    llarp_time_t now
) override
```

called on event loop pump 

**Reimplements**: [llarp::service::Endpoint::Pump](Classes/structllarp_1_1service_1_1Endpoint.md#function-pump)


### function HasRemoteForIP

```cpp
bool HasRemoteForIP(
    huint128_t ipv4
) const
```

return true if we have a remote loki address for this ip address 

### function MarkIPActive

```cpp
void MarkIPActive(
    huint128_t ip
)
```

mark this address as active 

### function MarkIPActiveForever

```cpp
void MarkIPActiveForever(
    huint128_t ip
)
```

mark this address as active forever 

### function FlushWrite

```cpp
void FlushWrite()
```

flush writing ip packets to interface 

## Protected Attributes Documentation

### variable m_NetworkToUserPktQueue

```cpp
util::ascending_priority_queue< WritePacket > m_NetworkToUserPktQueue;
```

queue for sending packets to user from network 

### variable m_IPToAddr

```cpp
std::unordered_map< huint128_t, AlignedBuffer< 32 > > m_IPToAddr;
```

maps ip to key (host byte order) 

### variable m_AddrToIP

```cpp
std::unordered_map< AlignedBuffer< 32 >, huint128_t > m_AddrToIP;
```

maps key to ip (host byte order) 

### variable m_SNodes

```cpp
std::unordered_map< AlignedBuffer< 32 >, bool > m_SNodes;
```

maps key to true if key is a service node, maps key to false if key is a hidden service 

### variable m_ExitIPToExitAddress

```cpp
std::unordered_map< huint128_t, service::Address > m_ExitIPToExitAddress;
```

maps ip address to an exit endpoint, useful when we have multiple exits on a range 

-------------------------------

Updated on 2025-01-26 at 05:10:09 +0000