---
title: llarp::service::HiddenServiceAddressLookup

---

# llarp::service::HiddenServiceAddressLookup





Inherits from [llarp::service::IServiceLookup](Classes/structllarp_1_1service_1_1IServiceLookup.md)

## Public Types

|                | Name           |
| -------------- | -------------- |
| using std::function< bool(const [Address](Classes/structllarp_1_1service_1_1Address.md) &, std::optional< [IntroSet](Classes/structllarp_1_1service_1_1IntroSet.md) >, const [RouterID](Classes/structllarp_1_1RouterID.md) &, llarp_time_t, uint64_t)> | **[HandlerFunc](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#using-handlerfunc)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[HiddenServiceAddressLookup](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#function-hiddenserviceaddresslookup)**([Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md) * p, HandlerFunc h, const [dht::Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & location, const [PubKey](Classes/structllarp_1_1PubKey.md) & rootkey, const [RouterID](Classes/structllarp_1_1RouterID.md) & routerAsked, uint64_t relayOrder, uint64_t tx, llarp_time_t timeout) |
| | **[~HiddenServiceAddressLookup](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#function-~hiddenserviceaddresslookup)**() override =default |
| virtual bool | **[IsFor](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#function-isfor)**(EndpointBase::AddressVariant_t ) const override<br>return true if this lookup is for a remote address  |
| virtual bool | **[HandleIntrosetResponse](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#function-handleintrosetresponse)**(const std::set< [EncryptedIntroSet](Classes/structllarp_1_1service_1_1EncryptedIntroSet.md) > & ) override<br>handle lookup result for introsets  |
| virtual std::shared_ptr< [routing::IMessage](Classes/structllarp_1_1routing_1_1IMessage.md) > | **[BuildRequestMessage](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#function-buildrequestmessage)**() override<br>build request message for service lookup  |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| const [PubKey](Classes/structllarp_1_1PubKey.md) | **[rootkey](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#variable-rootkey)**  |
| uint64_t | **[relayOrder](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#variable-relayorder)**  |
| const [dht::Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) | **[location](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#variable-location)**  |
| HandlerFunc | **[handle](Classes/structllarp_1_1service_1_1HiddenServiceAddressLookup.md#variable-handle)**  |

## Additional inherited members

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

|                | Name           |
| -------------- | -------------- |
| | **[IServiceLookup](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-iservicelookup)**() =delete |
| virtual | **[~IServiceLookup](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-~iservicelookup)**() =default |
| virtual bool | **[HandleNameResponse](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-handlenameresponse)**(std::optional< [Address](Classes/structllarp_1_1service_1_1Address.md) > )<br>handle lookup result for introsets  |
| virtual void | **[HandleTimeout](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-handletimeout)**() |
| bool | **[IsTimedOut](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-istimedout)**(llarp_time_t now) const<br>determine if this request has timed out  |
| llarp_time_t | **[TimeLeft](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-timeleft)**(llarp_time_t now) const<br>return how long this request has left to be fufilled  |
| virtual bool | **[SendRequestViaPath](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-sendrequestviapath)**(path::Path_ptr p, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r)<br>build a new request message and send it via a path  |
| util::StatusObject | **[ExtractStatus](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-extractstatus)**() const |

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

|                | Name           |
| -------------- | -------------- |
| | **[IServiceLookup](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-iservicelookup)**([ILookupHolder](Classes/structllarp_1_1service_1_1ILookupHolder.md) * parent, uint64_t tx, std::string name, llarp_time_t timeout =10s) |

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

|                | Name           |
| -------------- | -------------- |
| [ILookupHolder](Classes/structllarp_1_1service_1_1ILookupHolder.md) * | **[m_parent](Classes/structllarp_1_1service_1_1IServiceLookup.md#variable-m-parent)**  |
| uint64_t | **[txid](Classes/structllarp_1_1service_1_1IServiceLookup.md#variable-txid)**  |
| const std::string | **[name](Classes/structllarp_1_1service_1_1IServiceLookup.md#variable-name)**  |
| [RouterID](Classes/structllarp_1_1RouterID.md) | **[endpoint](Classes/structllarp_1_1service_1_1IServiceLookup.md#variable-endpoint)**  |

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

|                | Name           |
| -------------- | -------------- |
| const llarp_time_t | **[m_created](Classes/structllarp_1_1service_1_1IServiceLookup.md#variable-m-created)**  |
| const llarp_time_t | **[m_timeout](Classes/structllarp_1_1service_1_1IServiceLookup.md#variable-m-timeout)**  |


## Public Types Documentation

### using HandlerFunc

```cpp
using llarp::service::HiddenServiceAddressLookup::HandlerFunc =  std::function<bool( const Address&, std::optional<IntroSet>, const RouterID&, llarp_time_t, uint64_t)>;
```


## Public Functions Documentation

### function HiddenServiceAddressLookup

```cpp
HiddenServiceAddressLookup(
    Endpoint * p,
    HandlerFunc h,
    const dht::Key_t & location,
    const PubKey & rootkey,
    const RouterID & routerAsked,
    uint64_t relayOrder,
    uint64_t tx,
    llarp_time_t timeout
)
```


### function ~HiddenServiceAddressLookup

```cpp
~HiddenServiceAddressLookup() override =default
```


### function IsFor

```cpp
inline virtual bool IsFor(
    EndpointBase::AddressVariant_t 
) const override
```

return true if this lookup is for a remote address 

**Reimplements**: [llarp::service::IServiceLookup::IsFor](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-isfor)


### function HandleIntrosetResponse

```cpp
virtual bool HandleIntrosetResponse(
    const std::set< EncryptedIntroSet > & 
) override
```

handle lookup result for introsets 

**Reimplements**: [llarp::service::IServiceLookup::HandleIntrosetResponse](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-handleintrosetresponse)


### function BuildRequestMessage

```cpp
virtual std::shared_ptr< routing::IMessage > BuildRequestMessage() override
```

build request message for service lookup 

**Reimplements**: [llarp::service::IServiceLookup::BuildRequestMessage](Classes/structllarp_1_1service_1_1IServiceLookup.md#function-buildrequestmessage)


## Public Attributes Documentation

### variable rootkey

```cpp
const PubKey rootkey;
```


### variable relayOrder

```cpp
uint64_t relayOrder;
```


### variable location

```cpp
const dht::Key_t location;
```


### variable handle

```cpp
HandlerFunc handle;
```


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

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