---
title: llarp/service/convotag.hpp

---

# llarp/service/convotag.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::service](Namespaces/namespacellarp_1_1service.md)**  |
| **[std](Namespaces/namespacestd.md)** <br>STL namespace.  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::service::ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md)**  |
| struct | **[std::hash< llarp::service::ConvoTag >](Classes/structstd_1_1hash_3_01llarp_1_1service_1_1ConvoTag_01_4.md)**  |




## Source code

```cpp
#pragma once

#include <llarp/util/aligned.hpp>
#include <llarp/net/net_int.hpp>

#include <llarp/net/net.hpp>

namespace llarp::service
{
  struct ConvoTag final : AlignedBuffer<16>
  {
    using AlignedBuffer<16>::AlignedBuffer;

    void
    Randomize() override;

    sockaddr_in6
    ToV6() const;

    void
    FromV6(sockaddr_in6 saddr);
  };
}  // namespace llarp::service

namespace std
{
  template <>
  struct hash<llarp::service::ConvoTag>
  {
    size_t
    operator()(const llarp::service::ConvoTag& tag) const
    {
      std::hash<std::string_view> h{};
      return h(std::string_view{reinterpret_cast<const char*>(tag.data()), tag.size()});
    }
  };
}  // namespace std
```


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

Updated on 2022-10-17 at 13:14:50 +0000
