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

---

# llarp/layers/flow/flow_stats.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)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::layers::flow::FlowInfoStats](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfoStats.md)** <br>informational data about a flow we have  |
| struct | **[llarp::layers::flow::FlowStats](Classes/structllarp_1_1layers_1_1flow_1_1FlowStats.md)**  |




## Source code

```cpp
#pragma once

#include <functional>
#include <unordered_set>
#include "flow_addr.hpp"
#include "flow_info.hpp"

namespace llarp::layers::flow
{

  enum class FlowInfoState
  {
    good,
    active,
    idle,
    stalled
  };

  struct FlowInfoStats
  {
    FlowInfoState state;
  };

  struct FlowStats
  {
    std::unordered_map<FlowInfo, FlowInfoStats> all_flows;

    FlowAddr local_addr;

    std::vector<FlowAddr>
    local_addrs() const;

    std::unordered_set<FlowInfo>
    good_flows() const;

    bool
    has_good_flow_to(const FlowAddr& remote) const;

    std::unordered_map<FlowAddr, std::string>
    auth_map() const;
  };

}  // namespace llarp::layers::flow
```


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

Updated on 2023-04-27 at 04:17:17 +0000
