---
title: llarp::dht

---

# llarp::dht



## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::dht::Bucket](Classes/structllarp_1_1dht_1_1Bucket.md)**  |
| struct | **[llarp::dht::AbstractContext](Classes/structllarp_1_1dht_1_1AbstractContext.md)**  |
| struct | **[llarp::dht::ExploreNetworkJob](Classes/structllarp_1_1dht_1_1ExploreNetworkJob.md)**  |
| struct | **[llarp::dht::XorMetric](Classes/structllarp_1_1dht_1_1XorMetric.md)**  |
| struct | **[llarp::dht::Key_t](Classes/structllarp_1_1dht_1_1Key__t.md)**  |
| struct | **[llarp::dht::LocalRouterLookup](Classes/structllarp_1_1dht_1_1LocalRouterLookup.md)**  |
| struct | **[llarp::dht::LocalServiceAddressLookup](Classes/structllarp_1_1dht_1_1LocalServiceAddressLookup.md)**  |
| struct | **[llarp::dht::LocalTagLookup](Classes/structllarp_1_1dht_1_1LocalTagLookup.md)**  |
| struct | **[llarp::dht::IMessage](Classes/structllarp_1_1dht_1_1IMessage.md)**  |
| struct | **[llarp::dht::ConsensusMessage](Classes/structllarp_1_1dht_1_1ConsensusMessage.md)**  |
| struct | **[llarp::dht::FindIntroMessage](Classes/structllarp_1_1dht_1_1FindIntroMessage.md)**  |
| struct | **[llarp::dht::FindNameMessage](Classes/structllarp_1_1dht_1_1FindNameMessage.md)**  |
| struct | **[llarp::dht::FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md)**  |
| struct | **[llarp::dht::RelayedFindRouterMessage](Classes/structllarp_1_1dht_1_1RelayedFindRouterMessage.md)** <br>variant of [FindRouterMessage](Classes/structllarp_1_1dht_1_1FindRouterMessage.md) relayed via path  |
| struct | **[llarp::dht::GotIntroMessage](Classes/structllarp_1_1dht_1_1GotIntroMessage.md)** <br>acknowledgement to [PublishIntroMessage]() or reply to [FindIntroMessage](Classes/structllarp_1_1dht_1_1FindIntroMessage.md) |
| struct | **[llarp::dht::RelayedGotIntroMessage](Classes/structllarp_1_1dht_1_1RelayedGotIntroMessage.md)**  |
| struct | **[llarp::dht::GotNameMessage](Classes/structllarp_1_1dht_1_1GotNameMessage.md)**  |
| struct | **[llarp::dht::GotRouterMessage](Classes/structllarp_1_1dht_1_1GotRouterMessage.md)**  |
| struct | **[llarp::dht::PublishIntroMessage](Classes/structllarp_1_1dht_1_1PublishIntroMessage.md)**  |
| struct | **[llarp::dht::RCNode](Classes/structllarp_1_1dht_1_1RCNode.md)**  |
| struct | **[llarp::dht::ISNode](Classes/structllarp_1_1dht_1_1ISNode.md)**  |
| struct | **[llarp::dht::PublishServiceJob](Classes/structllarp_1_1dht_1_1PublishServiceJob.md)**  |
| struct | **[llarp::dht::LocalPublishServiceJob](Classes/structllarp_1_1dht_1_1LocalPublishServiceJob.md)**  |
| struct | **[llarp::dht::RecursiveRouterLookup](Classes/structllarp_1_1dht_1_1RecursiveRouterLookup.md)**  |
| struct | **[llarp::dht::ServiceAddressLookup](Classes/structllarp_1_1dht_1_1ServiceAddressLookup.md)**  |
| struct | **[llarp::dht::TagLookup](Classes/structllarp_1_1dht_1_1TagLookup.md)**  |
| struct | **[llarp::dht::TX](Classes/structllarp_1_1dht_1_1TX.md)**  |
| struct | **[llarp::dht::TXHolder](Classes/structllarp_1_1dht_1_1TXHolder.md)**  |
| struct | **[llarp::dht::TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md)**  |

## Types

|                | Name           |
| -------------- | -------------- |
| using std::shared_ptr< const [GotIntroMessage](Classes/structllarp_1_1dht_1_1GotIntroMessage.md) > | **[GotIntroMessage_constptr](Namespaces/namespacellarp_1_1dht.md#using-gotintromessage-constptr)**  |
| using std::shared_ptr< const [GotRouterMessage](Classes/structllarp_1_1dht_1_1GotRouterMessage.md) > | **[GotRouterMessage_constptr](Namespaces/namespacellarp_1_1dht.md#using-gotroutermessage-constptr)**  |

## Functions

|                | Name           |
| -------------- | -------------- |
| std::unique_ptr< [AbstractContext](Classes/structllarp_1_1dht_1_1AbstractContext.md) > | **[makeContext](Namespaces/namespacellarp_1_1dht.md#function-makecontext)**() |
| IMessage::Ptr_t | **[DecodeMessage](Namespaces/namespacellarp_1_1dht.md#function-decodemessage)**(const [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) & from, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf, bool relayed =false) |
| bool | **[DecodeMesssageList](Namespaces/namespacellarp_1_1dht.md#function-decodemesssagelist)**([Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) from, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf, std::vector< IMessage::Ptr_t > & dst, bool relayed =false) |

## Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr size_t | **[IntroSetRelayRedundancy](Namespaces/namespacellarp_1_1dht.md#variable-introsetrelayredundancy)** <br>number of routers to publish to  |
| constexpr size_t | **[IntroSetRequestsPerRelay](Namespaces/namespacellarp_1_1dht.md#variable-introsetrequestsperrelay)** <br>number of dht locations handled per relay  |
| constexpr size_t | **[IntroSetStorageRedundancy](Namespaces/namespacellarp_1_1dht.md#variable-introsetstorageredundancy)**  |
| constexpr size_t | **[MAX_MSG_SIZE](Namespaces/namespacellarp_1_1dht.md#variable-max-msg-size)**  |

## Types Documentation

### using GotIntroMessage_constptr

```cpp
using llarp::dht::GotIntroMessage_constptr = typedef std::shared_ptr<const GotIntroMessage>;
```


### using GotRouterMessage_constptr

```cpp
using llarp::dht::GotRouterMessage_constptr = typedef std::shared_ptr<const GotRouterMessage>;
```



## Functions Documentation

### function makeContext

```cpp
std::unique_ptr< AbstractContext > makeContext()
```


### function DecodeMessage

```cpp
IMessage::Ptr_t DecodeMessage(
    const Key_t & from,
    llarp_buffer_t * buf,
    bool relayed =false
)
```


### function DecodeMesssageList

```cpp
bool DecodeMesssageList(
    Key_t from,
    llarp_buffer_t * buf,
    std::vector< IMessage::Ptr_t > & dst,
    bool relayed =false
)
```



## Attributes Documentation

### variable IntroSetRelayRedundancy

```cpp
static constexpr size_t IntroSetRelayRedundancy = 2;
```

number of routers to publish to 

### variable IntroSetRequestsPerRelay

```cpp
static constexpr size_t IntroSetRequestsPerRelay = 2;
```

number of dht locations handled per relay 

### variable IntroSetStorageRedundancy

```cpp
static constexpr size_t IntroSetStorageRedundancy =
        (IntroSetRelayRedundancy * IntroSetRequestsPerRelay);
```


### variable MAX_MSG_SIZE

```cpp
constexpr size_t MAX_MSG_SIZE = 2048;
```





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

Updated on 2023-01-24 at 18:23:42 +0000