---
title: llarp::path::Path
summary: A path we made. 

---

# llarp::path::Path



A path we made. 


`#include <path.hpp>`

Inherits from [llarp::path::IHopHandler](Classes/structllarp_1_1path_1_1IHopHandler.md), [llarp::routing::IMessageHandler](Classes/structllarp_1_1routing_1_1IMessageHandler.md), std::enable_shared_from_this< Path >

## Public Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[Endpoint_Equals](Classes/structllarp_1_1path_1_1Path_1_1Endpoint__Equals.md)** <br>comparision for equal endpoints  |
| struct | **[Endpoint_Hash](Classes/structllarp_1_1path_1_1Path_1_1Endpoint__Hash.md)** <br>hash for std::shared_ptr<Path> by path endpoint  |
| struct | **[Hash](Classes/structllarp_1_1path_1_1Path_1_1Hash.md)**  |
| struct | **[Ptr_Hash](Classes/structllarp_1_1path_1_1Path_1_1Ptr__Hash.md)** <br>hash for std::shared_ptr<Path>  |

## Public Types

|                | Name           |
| -------------- | -------------- |
| using std::function< void(Path_ptr)> | **[BuildResultHookFunc](Classes/structllarp_1_1path_1_1Path.md#using-buildresulthookfunc)**  |
| using std::function< bool(Path_ptr, llarp_time_t)> | **[CheckForDeadFunc](Classes/structllarp_1_1path_1_1Path.md#using-checkfordeadfunc)**  |
| using std::function< bool(Path_ptr, const [PathID_t](Classes/structllarp_1_1PathID__t.md) &, uint64_t)> | **[DropHandlerFunc](Classes/structllarp_1_1path_1_1Path.md#using-drophandlerfunc)**  |
| using std::vector< [PathHopConfig](Classes/structllarp_1_1path_1_1PathHopConfig.md) > | **[HopList](Classes/structllarp_1_1path_1_1Path.md#using-hoplist)**  |
| using std::function< bool(Path_ptr, const [service::ProtocolFrame](Classes/structllarp_1_1service_1_1ProtocolFrame.md) &)> | **[DataHandlerFunc](Classes/structllarp_1_1path_1_1Path.md#using-datahandlerfunc)**  |
| using std::function< bool(Path_ptr)> | **[ExitUpdatedFunc](Classes/structllarp_1_1path_1_1Path.md#using-exitupdatedfunc)**  |
| using std::function< bool(Path_ptr)> | **[ExitClosedFunc](Classes/structllarp_1_1path_1_1Path.md#using-exitclosedfunc)**  |
| using std::function< bool(Path_ptr, const [llarp_buffer_t](Classes/structllarp__buffer__t.md) &, uint64_t, service::ProtocolType)> | **[ExitTrafficHandlerFunc](Classes/structllarp_1_1path_1_1Path.md#using-exittraffichandlerfunc)**  |
| using std::function< bool(Path_ptr, llarp_time_t)> | **[ObtainedExitHandler](Classes/structllarp_1_1path_1_1Path.md#using-obtainedexithandler)** <br>(path, backoff) backoff is 0 on success  |
| using std::unordered_set< Path_ptr, [Endpoint_Hash](Classes/structllarp_1_1path_1_1Path_1_1Endpoint__Hash.md), [Endpoint_Equals](Classes/structllarp_1_1path_1_1Path_1_1Endpoint__Equals.md) > | **[UniqueEndpointSet_t](Classes/structllarp_1_1path_1_1Path.md#using-uniqueendpointset-t)** <br>unordered set of paths with unique endpoints  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[Path](Classes/structllarp_1_1path_1_1Path.md#function-path)**(const std::vector< [RouterContact](Classes/structllarp_1_1RouterContact.md) > & routers, std::weak_ptr< [PathSet](Classes/structllarp_1_1path_1_1PathSet.md) > parent, PathRole startingRoles, std::string shortName) |
| util::StatusObject | **[ExtractStatus](Classes/structllarp_1_1path_1_1Path.md#function-extractstatus)**() const |
| PathRole | **[Role](Classes/structllarp_1_1path_1_1Path.md#function-role)**() const |
| bool | **[operator<](Classes/structllarp_1_1path_1_1Path.md#function-operator<)**(const [Path](Classes/structllarp_1_1path_1_1Path.md) & other) const |
| void | **[MarkActive](Classes/structllarp_1_1path_1_1Path.md#function-markactive)**(llarp_time_t now) |
| bool | **[SupportsAllRoles](Classes/structllarp_1_1path_1_1Path.md#function-supportsallroles)**(PathRole roles) const<br>return true if ALL of the specified roles are supported  |
| bool | **[SupportsAnyRoles](Classes/structllarp_1_1path_1_1Path.md#function-supportsanyroles)**(PathRole roles) const<br>return true if ANY of the specified roles are supported  |
| void | **[ClearRoles](Classes/structllarp_1_1path_1_1Path.md#function-clearroles)**(PathRole roles)<br>clear role bits  |
| PathStatus | **[Status](Classes/structllarp_1_1path_1_1Path.md#function-status)**() const |
| virtual bool | **[HandleUpstream](Classes/structllarp_1_1path_1_1Path.md#function-handleupstream)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & X, const [TunnelNonce](Classes/structllarp_1_1AlignedBuffer.md) & Y, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * ) override |
| virtual bool | **[HandleDownstream](Classes/structllarp_1_1path_1_1Path.md#function-handledownstream)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & X, const [TunnelNonce](Classes/structllarp_1_1AlignedBuffer.md) & Y, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * ) override |
| const std::string & | **[ShortName](Classes/structllarp_1_1path_1_1Path.md#function-shortname)**() const |
| std::string | **[HopsString](Classes/structllarp_1_1path_1_1Path.md#function-hopsstring)**() const |
| virtual llarp_time_t | **[LastRemoteActivityAt](Classes/structllarp_1_1path_1_1Path.md#function-lastremoteactivityat)**() const override<br>return timestamp last remote activity happened at  |
| virtual bool | **[HandleLRSM](Classes/structllarp_1_1path_1_1Path.md#function-handlelrsm)**(uint64_t status, std::array< [EncryptedFrame](Classes/structllarp_1_1EncryptedFrame.md), 8 > & frames, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| void | **[SetBuildResultHook](Classes/structllarp_1_1path_1_1Path.md#function-setbuildresulthook)**(BuildResultHookFunc func) |
| void | **[SetExitTrafficHandler](Classes/structllarp_1_1path_1_1Path.md#function-setexittraffichandler)**(ExitTrafficHandlerFunc handler) |
| void | **[SetCloseExitFunc](Classes/structllarp_1_1path_1_1Path.md#function-setcloseexitfunc)**(ExitClosedFunc handler) |
| void | **[SetUpdateExitFunc](Classes/structllarp_1_1path_1_1Path.md#function-setupdateexitfunc)**(ExitUpdatedFunc handler) |
| void | **[SetDataHandler](Classes/structllarp_1_1path_1_1Path.md#function-setdatahandler)**(DataHandlerFunc func) |
| void | **[SetDropHandler](Classes/structllarp_1_1path_1_1Path.md#function-setdrophandler)**(DropHandlerFunc func) |
| void | **[SetDeadChecker](Classes/structllarp_1_1path_1_1Path.md#function-setdeadchecker)**(CheckForDeadFunc func) |
| void | **[EnterState](Classes/structllarp_1_1path_1_1Path.md#function-enterstate)**(PathStatus st, llarp_time_t now) |
| llarp_time_t | **[ExpireTime](Classes/structllarp_1_1path_1_1Path.md#function-expiretime)**() const |
| virtual bool | **[ExpiresSoon](Classes/structllarp_1_1path_1_1Path.md#function-expiressoon)**(llarp_time_t now, llarp_time_t dlt =5s) const override |
| virtual bool | **[Expired](Classes/structllarp_1_1path_1_1Path.md#function-expired)**(llarp_time_t now) const override |
| void | **[Rebuild](Classes/structllarp_1_1path_1_1Path.md#function-rebuild)**()<br>build a new path on the same set of hops as us regenerates keys  |
| void | **[Tick](Classes/structllarp_1_1path_1_1Path.md#function-tick)**(llarp_time_t now, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |
| virtual bool | **[SendRoutingMessage](Classes/structllarp_1_1path_1_1Path.md#function-sendroutingmessage)**(const [routing::IMessage](Classes/structllarp_1_1routing_1_1IMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override<br>send routing message and increment sequence number  |
| virtual bool | **[HandleObtainExitMessage](Classes/structllarp_1_1path_1_1Path.md#function-handleobtainexitmessage)**(const [routing::ObtainExitMessage](Classes/structllarp_1_1routing_1_1ObtainExitMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleUpdateExitVerifyMessage](Classes/structllarp_1_1path_1_1Path.md#function-handleupdateexitverifymessage)**(const [routing::UpdateExitVerifyMessage](Classes/structllarp_1_1routing_1_1UpdateExitVerifyMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleTransferTrafficMessage](Classes/structllarp_1_1path_1_1Path.md#function-handletransfertrafficmessage)**(const [routing::TransferTrafficMessage](Classes/structllarp_1_1routing_1_1TransferTrafficMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleUpdateExitMessage](Classes/structllarp_1_1path_1_1Path.md#function-handleupdateexitmessage)**(const [routing::UpdateExitMessage](Classes/structllarp_1_1routing_1_1UpdateExitMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleCloseExitMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlecloseexitmessage)**(const [routing::CloseExitMessage](Classes/structllarp_1_1routing_1_1CloseExitMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleGrantExitMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlegrantexitmessage)**(const [routing::GrantExitMessage](Classes/structllarp_1_1routing_1_1GrantExitMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleRejectExitMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlerejectexitmessage)**(const [routing::RejectExitMessage](Classes/structllarp_1_1routing_1_1RejectExitMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleDataDiscardMessage](Classes/structllarp_1_1path_1_1Path.md#function-handledatadiscardmessage)**(const [routing::DataDiscardMessage](Classes/structllarp_1_1routing_1_1DataDiscardMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| bool | **[HandlePathConfirmMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlepathconfirmmessage)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |
| virtual bool | **[HandlePathConfirmMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlepathconfirmmessage)**(const [routing::PathConfirmMessage](Classes/structllarp_1_1routing_1_1PathConfirmMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandlePathLatencyMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlepathlatencymessage)**(const [routing::PathLatencyMessage](Classes/structllarp_1_1routing_1_1PathLatencyMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandlePathTransferMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlepathtransfermessage)**(const [routing::PathTransferMessage](Classes/structllarp_1_1routing_1_1PathTransferMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual bool | **[HandleHiddenServiceFrame](Classes/structllarp_1_1path_1_1Path.md#function-handlehiddenserviceframe)**(const [service::ProtocolFrame](Classes/structllarp_1_1service_1_1ProtocolFrame.md) & frame) override |
| bool | **[HandleGotIntroMessage](Classes/structllarp_1_1path_1_1Path.md#function-handlegotintromessage)**(const [dht::GotIntroMessage](Classes/structllarp_1_1dht_1_1GotIntroMessage.md) & msg) |
| virtual bool | **[HandleDHTMessage](Classes/structllarp_1_1path_1_1Path.md#function-handledhtmessage)**(const [dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| bool | **[HandleRoutingMessage](Classes/structllarp_1_1path_1_1Path.md#function-handleroutingmessage)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & buf, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |
| bool | **[IsReady](Classes/structllarp_1_1path_1_1Path.md#function-isready)**() const |
| [PathID_t](Classes/structllarp_1_1PathID__t.md) | **[TXID](Classes/structllarp_1_1path_1_1Path.md#function-txid)**() const |
| [RouterID](Classes/structllarp_1_1RouterID.md) | **[Endpoint](Classes/structllarp_1_1path_1_1Path.md#function-endpoint)**() const |
| [PubKey](Classes/structllarp_1_1PubKey.md) | **[EndpointPubKey](Classes/structllarp_1_1path_1_1Path.md#function-endpointpubkey)**() const |
| bool | **[IsEndpoint](Classes/structllarp_1_1path_1_1Path.md#function-isendpoint)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & router, const [PathID_t](Classes/structllarp_1_1PathID__t.md) & path) const |
| virtual [PathID_t](Classes/structllarp_1_1PathID__t.md) | **[RXID](Classes/structllarp_1_1path_1_1Path.md#function-rxid)**() const override |
| [RouterID](Classes/structllarp_1_1RouterID.md) | **[Upstream](Classes/structllarp_1_1path_1_1Path.md#function-upstream)**() const |
| std::string | **[Name](Classes/structllarp_1_1path_1_1Path.md#function-name)**() const |
| void | **[AddObtainExitHandler](Classes/structllarp_1_1path_1_1Path.md#function-addobtainexithandler)**([ObtainedExitHandler](Classes/structllarp_1_1path_1_1Path.md#using-obtainedexithandler) handler) |
| bool | **[SendExitRequest](Classes/structllarp_1_1path_1_1Path.md#function-sendexitrequest)**(const [routing::ObtainExitMessage](Classes/structllarp_1_1routing_1_1ObtainExitMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |
| bool | **[SendExitClose](Classes/structllarp_1_1path_1_1Path.md#function-sendexitclose)**(const [routing::CloseExitMessage](Classes/structllarp_1_1routing_1_1CloseExitMessage.md) & msg, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) |
| virtual void | **[FlushUpstream](Classes/structllarp_1_1path_1_1Path.md#function-flushupstream)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual void | **[FlushDownstream](Classes/structllarp_1_1path_1_1Path.md#function-flushdownstream)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |

## Protected Functions

|                | Name           |
| -------------- | -------------- |
| virtual void | **[UpstreamWork](Classes/structllarp_1_1path_1_1Path.md#function-upstreamwork)**(TrafficQueue_t queue, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual void | **[DownstreamWork](Classes/structllarp_1_1path_1_1Path.md#function-downstreamwork)**(TrafficQueue_t queue, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual void | **[HandleAllUpstream](Classes/structllarp_1_1path_1_1Path.md#function-handleallupstream)**(std::vector< [RelayUpstreamMessage](Classes/structllarp_1_1RelayUpstreamMessage.md) > msgs, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |
| virtual void | **[HandleAllDownstream](Classes/structllarp_1_1path_1_1Path.md#function-handlealldownstream)**(std::vector< [RelayDownstreamMessage](Classes/structllarp_1_1RelayDownstreamMessage.md) > msgs, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) override |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| HopList | **[hops](Classes/structllarp_1_1path_1_1Path.md#variable-hops)**  |
| std::weak_ptr< [PathSet](Classes/structllarp_1_1path_1_1PathSet.md) > | **[m_PathSet](Classes/structllarp_1_1path_1_1Path.md#variable-m-pathset)**  |
| [service::Introduction](Classes/structllarp_1_1service_1_1Introduction.md) | **[intro](Classes/structllarp_1_1path_1_1Path.md#variable-intro)**  |
| llarp_time_t | **[buildStarted](Classes/structllarp_1_1path_1_1Path.md#variable-buildstarted)**  |

## Additional inherited members

**Public Types inherited from [llarp::path::IHopHandler](Classes/structllarp_1_1path_1_1IHopHandler.md)**

|                | Name           |
| -------------- | -------------- |
| using std::pair< std::vector< byte_t >, [TunnelNonce](Classes/structllarp_1_1AlignedBuffer.md) > | **[TrafficEvent_t](Classes/structllarp_1_1path_1_1IHopHandler.md#using-trafficevent-t)**  |
| using std::list< TrafficEvent_t > | **[TrafficQueue_t](Classes/structllarp_1_1path_1_1IHopHandler.md#using-trafficqueue-t)**  |

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

|                | Name           |
| -------------- | -------------- |
| virtual | **[~IHopHandler](Classes/structllarp_1_1path_1_1IHopHandler.md#function-~ihophandler)**() =default |
| void | **[DecayFilters](Classes/structllarp_1_1path_1_1IHopHandler.md#function-decayfilters)**(llarp_time_t now) |
| uint64_t | **[NextSeqNo](Classes/structllarp_1_1path_1_1IHopHandler.md#function-nextseqno)**() |

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

|                | Name           |
| -------------- | -------------- |
| uint64_t | **[m_SequenceNum](Classes/structllarp_1_1path_1_1IHopHandler.md#variable-m-sequencenum)**  |
| TrafficQueue_t | **[m_UpstreamQueue](Classes/structllarp_1_1path_1_1IHopHandler.md#variable-m-upstreamqueue)**  |
| TrafficQueue_t | **[m_DownstreamQueue](Classes/structllarp_1_1path_1_1IHopHandler.md#variable-m-downstreamqueue)**  |
| [util::DecayingHashSet](Classes/structllarp_1_1util_1_1DecayingHashSet.md)< [TunnelNonce](Classes/structllarp_1_1AlignedBuffer.md) > | **[m_UpstreamReplayFilter](Classes/structllarp_1_1path_1_1IHopHandler.md#variable-m-upstreamreplayfilter)**  |
| [util::DecayingHashSet](Classes/structllarp_1_1util_1_1DecayingHashSet.md)< [TunnelNonce](Classes/structllarp_1_1AlignedBuffer.md) > | **[m_DownstreamReplayFilter](Classes/structllarp_1_1path_1_1IHopHandler.md#variable-m-downstreamreplayfilter)**  |


## Public Types Documentation

### using BuildResultHookFunc

```cpp
using llarp::path::Path::BuildResultHookFunc =  std::function<void(Path_ptr)>;
```


### using CheckForDeadFunc

```cpp
using llarp::path::Path::CheckForDeadFunc =  std::function<bool(Path_ptr, llarp_time_t)>;
```


### using DropHandlerFunc

```cpp
using llarp::path::Path::DropHandlerFunc =  std::function<bool(Path_ptr, const PathID_t&, uint64_t)>;
```


### using HopList

```cpp
using llarp::path::Path::HopList =  std::vector<PathHopConfig>;
```


### using DataHandlerFunc

```cpp
using llarp::path::Path::DataHandlerFunc =  std::function<bool(Path_ptr, const service::ProtocolFrame&)>;
```


### using ExitUpdatedFunc

```cpp
using llarp::path::Path::ExitUpdatedFunc =  std::function<bool(Path_ptr)>;
```


### using ExitClosedFunc

```cpp
using llarp::path::Path::ExitClosedFunc =  std::function<bool(Path_ptr)>;
```


### using ExitTrafficHandlerFunc

```cpp
using llarp::path::Path::ExitTrafficHandlerFunc =  std::function<bool(Path_ptr, const llarp_buffer_t&, uint64_t, service::ProtocolType)>;
```


### using ObtainedExitHandler

```cpp
using llarp::path::Path::ObtainedExitHandler =  std::function<bool(Path_ptr, llarp_time_t)>;
```

(path, backoff) backoff is 0 on success 

### using UniqueEndpointSet_t

```cpp
using llarp::path::Path::UniqueEndpointSet_t =  std::unordered_set<Path_ptr, Endpoint_Hash, Endpoint_Equals>;
```

unordered set of paths with unique endpoints 

## Public Functions Documentation

### function Path

```cpp
Path(
    const std::vector< RouterContact > & routers,
    std::weak_ptr< PathSet > parent,
    PathRole startingRoles,
    std::string shortName
)
```


### function ExtractStatus

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


### function Role

```cpp
inline PathRole Role() const
```


### function operator<

```cpp
inline bool operator<(
    const Path & other
) const
```


### function MarkActive

```cpp
inline void MarkActive(
    llarp_time_t now
)
```


### function SupportsAllRoles

```cpp
inline bool SupportsAllRoles(
    PathRole roles
) const
```

return true if ALL of the specified roles are supported 

### function SupportsAnyRoles

```cpp
inline bool SupportsAnyRoles(
    PathRole roles
) const
```

return true if ANY of the specified roles are supported 

### function ClearRoles

```cpp
inline void ClearRoles(
    PathRole roles
)
```

clear role bits 

### function Status

```cpp
inline PathStatus Status() const
```


### function HandleUpstream

```cpp
virtual bool HandleUpstream(
    const llarp_buffer_t & X,
    const TunnelNonce & Y,
    AbstractRouter * 
) override
```


**Reimplements**: [llarp::path::IHopHandler::HandleUpstream](Classes/structllarp_1_1path_1_1IHopHandler.md#function-handleupstream)


### function HandleDownstream

```cpp
virtual bool HandleDownstream(
    const llarp_buffer_t & X,
    const TunnelNonce & Y,
    AbstractRouter * 
) override
```


**Reimplements**: [llarp::path::IHopHandler::HandleDownstream](Classes/structllarp_1_1path_1_1IHopHandler.md#function-handledownstream)


### function ShortName

```cpp
const std::string & ShortName() const
```


### function HopsString

```cpp
std::string HopsString() const
```


### function LastRemoteActivityAt

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

return timestamp last remote activity happened at 

**Reimplements**: [llarp::path::IHopHandler::LastRemoteActivityAt](Classes/structllarp_1_1path_1_1IHopHandler.md#function-lastremoteactivityat)


### function HandleLRSM

```cpp
virtual bool HandleLRSM(
    uint64_t status,
    std::array< EncryptedFrame, 8 > & frames,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::path::IHopHandler::HandleLRSM](Classes/structllarp_1_1path_1_1IHopHandler.md#function-handlelrsm)


### function SetBuildResultHook

```cpp
void SetBuildResultHook(
    BuildResultHookFunc func
)
```


### function SetExitTrafficHandler

```cpp
inline void SetExitTrafficHandler(
    ExitTrafficHandlerFunc handler
)
```


### function SetCloseExitFunc

```cpp
inline void SetCloseExitFunc(
    ExitClosedFunc handler
)
```


### function SetUpdateExitFunc

```cpp
inline void SetUpdateExitFunc(
    ExitUpdatedFunc handler
)
```


### function SetDataHandler

```cpp
inline void SetDataHandler(
    DataHandlerFunc func
)
```


### function SetDropHandler

```cpp
inline void SetDropHandler(
    DropHandlerFunc func
)
```


### function SetDeadChecker

```cpp
inline void SetDeadChecker(
    CheckForDeadFunc func
)
```


### function EnterState

```cpp
void EnterState(
    PathStatus st,
    llarp_time_t now
)
```


### function ExpireTime

```cpp
inline llarp_time_t ExpireTime() const
```


### function ExpiresSoon

```cpp
inline virtual bool ExpiresSoon(
    llarp_time_t now,
    llarp_time_t dlt =5s
) const override
```


**Reimplements**: [llarp::path::IHopHandler::ExpiresSoon](Classes/structllarp_1_1path_1_1IHopHandler.md#function-expiressoon)


### function Expired

```cpp
virtual bool Expired(
    llarp_time_t now
) const override
```


**Reimplements**: [llarp::path::IHopHandler::Expired](Classes/structllarp_1_1path_1_1IHopHandler.md#function-expired)


### function Rebuild

```cpp
void Rebuild()
```

build a new path on the same set of hops as us regenerates keys 

### function Tick

```cpp
void Tick(
    llarp_time_t now,
    AbstractRouter * r
)
```


### function SendRoutingMessage

```cpp
virtual bool SendRoutingMessage(
    const routing::IMessage & msg,
    AbstractRouter * r
) override
```

send routing message and increment sequence number 

**Reimplements**: [llarp::path::IHopHandler::SendRoutingMessage](Classes/structllarp_1_1path_1_1IHopHandler.md#function-sendroutingmessage)


### function HandleObtainExitMessage

```cpp
virtual bool HandleObtainExitMessage(
    const routing::ObtainExitMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleObtainExitMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handleobtainexitmessage)


### function HandleUpdateExitVerifyMessage

```cpp
virtual bool HandleUpdateExitVerifyMessage(
    const routing::UpdateExitVerifyMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleUpdateExitVerifyMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handleupdateexitverifymessage)


### function HandleTransferTrafficMessage

```cpp
virtual bool HandleTransferTrafficMessage(
    const routing::TransferTrafficMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleTransferTrafficMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handletransfertrafficmessage)


### function HandleUpdateExitMessage

```cpp
virtual bool HandleUpdateExitMessage(
    const routing::UpdateExitMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleUpdateExitMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handleupdateexitmessage)


### function HandleCloseExitMessage

```cpp
virtual bool HandleCloseExitMessage(
    const routing::CloseExitMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleCloseExitMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handlecloseexitmessage)


### function HandleGrantExitMessage

```cpp
virtual bool HandleGrantExitMessage(
    const routing::GrantExitMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleGrantExitMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handlegrantexitmessage)


### function HandleRejectExitMessage

```cpp
virtual bool HandleRejectExitMessage(
    const routing::RejectExitMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleRejectExitMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handlerejectexitmessage)


### function HandleDataDiscardMessage

```cpp
virtual bool HandleDataDiscardMessage(
    const routing::DataDiscardMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleDataDiscardMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handledatadiscardmessage)


### function HandlePathConfirmMessage

```cpp
bool HandlePathConfirmMessage(
    AbstractRouter * r
)
```


### function HandlePathConfirmMessage

```cpp
virtual bool HandlePathConfirmMessage(
    const routing::PathConfirmMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandlePathConfirmMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handlepathconfirmmessage)


### function HandlePathLatencyMessage

```cpp
virtual bool HandlePathLatencyMessage(
    const routing::PathLatencyMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandlePathLatencyMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handlepathlatencymessage)


### function HandlePathTransferMessage

```cpp
virtual bool HandlePathTransferMessage(
    const routing::PathTransferMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandlePathTransferMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handlepathtransfermessage)


### function HandleHiddenServiceFrame

```cpp
virtual bool HandleHiddenServiceFrame(
    const service::ProtocolFrame & frame
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleHiddenServiceFrame](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handlehiddenserviceframe)


### function HandleGotIntroMessage

```cpp
bool HandleGotIntroMessage(
    const dht::GotIntroMessage & msg
)
```


### function HandleDHTMessage

```cpp
virtual bool HandleDHTMessage(
    const dht::IMessage & msg,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::routing::IMessageHandler::HandleDHTMessage](Classes/structllarp_1_1routing_1_1IMessageHandler.md#function-handledhtmessage)


### function HandleRoutingMessage

```cpp
bool HandleRoutingMessage(
    const llarp_buffer_t & buf,
    AbstractRouter * r
)
```


### function IsReady

```cpp
bool IsReady() const
```


### function TXID

```cpp
PathID_t TXID() const
```


### function Endpoint

```cpp
RouterID Endpoint() const
```


### function EndpointPubKey

```cpp
PubKey EndpointPubKey() const
```


### function IsEndpoint

```cpp
bool IsEndpoint(
    const RouterID & router,
    const PathID_t & path
) const
```


### function RXID

```cpp
virtual PathID_t RXID() const override
```


**Reimplements**: [llarp::path::IHopHandler::RXID](Classes/structllarp_1_1path_1_1IHopHandler.md#function-rxid)


### function Upstream

```cpp
RouterID Upstream() const
```


### function Name

```cpp
std::string Name() const
```


### function AddObtainExitHandler

```cpp
inline void AddObtainExitHandler(
    ObtainedExitHandler handler
)
```


### function SendExitRequest

```cpp
bool SendExitRequest(
    const routing::ObtainExitMessage & msg,
    AbstractRouter * r
)
```


### function SendExitClose

```cpp
bool SendExitClose(
    const routing::CloseExitMessage & msg,
    AbstractRouter * r
)
```


### function FlushUpstream

```cpp
virtual void FlushUpstream(
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::path::IHopHandler::FlushUpstream](Classes/structllarp_1_1path_1_1IHopHandler.md#function-flushupstream)


### function FlushDownstream

```cpp
virtual void FlushDownstream(
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::path::IHopHandler::FlushDownstream](Classes/structllarp_1_1path_1_1IHopHandler.md#function-flushdownstream)


## Protected Functions Documentation

### function UpstreamWork

```cpp
virtual void UpstreamWork(
    TrafficQueue_t queue,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::path::IHopHandler::UpstreamWork](Classes/structllarp_1_1path_1_1IHopHandler.md#function-upstreamwork)


### function DownstreamWork

```cpp
virtual void DownstreamWork(
    TrafficQueue_t queue,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::path::IHopHandler::DownstreamWork](Classes/structllarp_1_1path_1_1IHopHandler.md#function-downstreamwork)


### function HandleAllUpstream

```cpp
virtual void HandleAllUpstream(
    std::vector< RelayUpstreamMessage > msgs,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::path::IHopHandler::HandleAllUpstream](Classes/structllarp_1_1path_1_1IHopHandler.md#function-handleallupstream)


### function HandleAllDownstream

```cpp
virtual void HandleAllDownstream(
    std::vector< RelayDownstreamMessage > msgs,
    AbstractRouter * r
) override
```


**Reimplements**: [llarp::path::IHopHandler::HandleAllDownstream](Classes/structllarp_1_1path_1_1IHopHandler.md#function-handlealldownstream)


## Public Attributes Documentation

### variable hops

```cpp
HopList hops;
```


### variable m_PathSet

```cpp
std::weak_ptr< PathSet > m_PathSet;
```


### variable intro

```cpp
service::Introduction intro;
```


### variable buildStarted

```cpp
llarp_time_t buildStarted = 0s;
```


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

Updated on 2022-10-26 at 17:18:03 +0000