---
title: llarp/layers/flow/flow_info.hpp

---

# llarp/layers/flow/flow_info.hpp



## Namespaces

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

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::layers::flow::FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md)**  |
| struct | **[std::hash< llarp::layers::flow::FlowInfo >](Classes/structstd_1_1hash_3_01llarp_1_1layers_1_1flow_1_1FlowInfo_01_4.md)**  |




## Source code

```cpp
#pragma once

#include "flow_addr.hpp"
#include "flow_tag.hpp"
#include "flow_constants.hpp"

namespace llarp::layers::flow
{

  struct FlowInfo
  {
    FlowAddr src, dst;
    FlowTag tag;
    uint16_t mtu{default_flow_mtu};

    std::string
    ToString() const;

    bool
    operator==(const FlowInfo& other) const;
  };
}  // namespace llarp::layers::flow

namespace llarp
{
  template <>
  inline constexpr bool IsToStringFormattable<llarp::layers::flow::FlowInfo> = true;

}

namespace std
{
  template <>
  struct hash<llarp::layers::flow::FlowInfo>
  {
    size_t
    operator()(const llarp::layers::flow::FlowInfo& info) const
    {
      return std::hash<llarp::layers::flow::FlowAddr>{}(info.src)
          ^ (std::hash<llarp::layers::flow::FlowAddr>{}(info.dst) << 3)
          ^ (std::hash<llarp::layers::flow::FlowTag>{}(info.tag) << 5);
    }
  };
}  // namespace std
```


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

Updated on 2023-03-06 at 20:36:34 +0000
