---
title: llarp::dht::FindRouterMessage

---

# llarp::dht::FindRouterMessage





Inherits from [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)

Inherited by [llarp::dht::RelayedFindRouterMessage](Classes/structllarp_1_1dht_1_1RelayedFindRouterMessage.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-findroutermessage)**(const [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & from) |
| | **[FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-findroutermessage)**(uint64_t id, const [RouterID](Classes/structllarp_1_1RouterID.md) & target) |
| | **[FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-findroutermessage)**(uint64_t id) |
| | **[~FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-~findroutermessage)**() override |
| virtual bool | **[BEncode](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const override |
| virtual bool | **[DecodeKey](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-decodekey)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & key, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * val) override |
| bool | **[HandleMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#function-handlemessage)**([llarp_dht_context](Classes/structllarp__dht__context.md) * ctx, std::vector< std::unique_ptr< [IMessage](Classes/structllarp_1_1dht_1_1IMessage.md) >> & replies) const override |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| [RouterID](Classes/structllarp_1_1RouterID.md) | **[targetKey](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-targetkey)**  |
| bool | **[iterative](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-iterative)**  |
| bool | **[exploritory](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-exploritory)**  |
| uint64_t | **[txid](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-txid)**  |
| uint64_t | **[version](Classes/structllarp_1_1dht_1_1FindRouterMessage.md#variable-version)**  |

## Additional inherited members

**Public Types inherited from [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)**

|                | Name           |
| -------------- | -------------- |
| using std::unique_ptr< [IMessage](Classes/structllarp_1_1dht_1_1IMessage.md) > | **[Ptr_t](Classes/structllarp_1_1dht_1_1IMessage.md#using-ptr-t)**  |

**Public Functions inherited from [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)**

|                | Name           |
| -------------- | -------------- |
| virtual | **[~IMessage](Classes/structllarp_1_1dht_1_1IMessage.md#function-~imessage)**() =default |
| | **[IMessage](Classes/structllarp_1_1dht_1_1IMessage.md#function-imessage)**(const [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & from)<br>construct  |

**Public Attributes inherited from [llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)**

|                | Name           |
| -------------- | -------------- |
| [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) | **[From](Classes/structllarp_1_1dht_1_1IMessage.md#variable-from)**  |
| [PathID_t](Classes/structllarp_1_1PathID__t.md) | **[pathID](Classes/structllarp_1_1dht_1_1IMessage.md#variable-pathid)**  |


## Public Functions Documentation

### function FindRouterMessage

```cpp
inline FindRouterMessage(
    const Key_t & from
)
```


### function FindRouterMessage

```cpp
inline FindRouterMessage(
    uint64_t id,
    const RouterID & target
)
```


### function FindRouterMessage

```cpp
inline FindRouterMessage(
    uint64_t id
)
```


### function ~FindRouterMessage

```cpp
~FindRouterMessage() override
```


### function BEncode

```cpp
virtual bool BEncode(
    llarp_buffer_t * buf
) const override
```


**Reimplements**: [llarp::dht::IMessage::BEncode](Classes/structllarp_1_1dht_1_1IMessage.md#function-bencode)


### function DecodeKey

```cpp
virtual bool DecodeKey(
    const llarp_buffer_t & key,
    llarp_buffer_t * val
) override
```


**Reimplements**: [llarp::dht::IMessage::DecodeKey](Classes/structllarp_1_1dht_1_1IMessage.md#function-decodekey)


### function HandleMessage

```cpp
bool HandleMessage(
    llarp_dht_context * ctx,
    std::vector< std::unique_ptr< IMessage >> & replies
) const override
```


## Public Attributes Documentation

### variable targetKey

```cpp
RouterID targetKey;
```


### variable iterative

```cpp
bool iterative = false;
```


### variable exploritory

```cpp
bool exploritory = false;
```


### variable txid

```cpp
uint64_t txid = 0;
```


### variable version

```cpp
uint64_t version = 0;
```


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

Updated on 2022-10-06 at 19:25:18 +0000