---
title: llarp::layers::flow

---

# llarp::layers::flow



## Classes

|                | Name           |
| -------------- | -------------- |
| class | **[llarp::layers::flow::FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md)** <br>a long form .snode or .loki address  |
| class | **[llarp::layers::flow::FlowEstablish](Classes/classllarp_1_1layers_1_1flow_1_1FlowEstablish.md)** <br>handles informing an observer at each step of obtaining a flow on the flow layer.  |
| struct | **[llarp::layers::flow::FlowIdentityPrivateKeys](Classes/structllarp_1_1layers_1_1flow_1_1FlowIdentityPrivateKeys.md)** <br>private keys used at the flow layer that are persistable.  |
| class | **[llarp::layers::flow::FlowIdentity](Classes/classllarp_1_1layers_1_1flow_1_1FlowIdentity.md)** <br>the local end of a one to one flow to a remote given a flow isolation metric (flow_tag) flows do not change their source/destination address but may change their flow tag/convo tag.  |
| struct | **[llarp::layers::flow::FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md)** <br>information about our flow identity.  |
| class | **[llarp::layers::flow::FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md)** <br>flow layer's context that holds all the things in the flow layer  |
| struct | **[llarp::layers::flow::FlowStateInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowStateInfo.md)** <br>immutable snapshot of a flow's state.  |
| class | **[llarp::layers::flow::FlowState](Classes/classllarp_1_1layers_1_1flow_1_1FlowState.md)** <br>internal state of a flow on the flow layer.  |
| 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)**  |
| struct | **[llarp::layers::flow::FlowTag](Classes/structllarp_1_1layers_1_1flow_1_1FlowTag.md)** <br>a flow layer tag that indicates a distinct convo between us and other entity on the flow layer.  |
| struct | **[llarp::layers::flow::FlowTraffic](Classes/structllarp_1_1layers_1_1flow_1_1FlowTraffic.md)**  |
| class | **[llarp::layers::flow::NameCache](Classes/classllarp_1_1layers_1_1flow_1_1NameCache.md)** <br>cache for in network names (ONS records) with static TTL.  |
| class | **[llarp::layers::flow::NameResolver](Classes/classllarp_1_1layers_1_1flow_1_1NameResolver.md)**  |

## Types

|                | Name           |
| -------------- | -------------- |
| enum class| **[FlowAuthPhase](Namespaces/namespacellarp_1_1layers_1_1flow.md#enum-flowauthphase)** { auth_req_not_sent, auth_req_sent, auth_nack, auth_more, auth_ok}<br>which phase in authentication a flow is in while establishing.  |
| enum class| **[FlowDataKind](Namespaces/namespacellarp_1_1layers_1_1flow.md#enum-flowdatakind)** { unknown, direct_ip_unicast, exit_ip_unicast, auth, stream_unicast} |
| enum class| **[FlowInfoState](Namespaces/namespacellarp_1_1layers_1_1flow.md#enum-flowinfostate)** { good, active, idle, stalled} |

## Functions

|                | Name           |
| -------------- | -------------- |
| template <typename T \> <br>[FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md) | **[to_flow_addr](Namespaces/namespacellarp_1_1layers_1_1flow.md#function-to-flow-addr)**(const T & addr)<br>convert to flow addr  |
| std::string_view | **[ToString](Namespaces/namespacellarp_1_1layers_1_1flow.md#function-tostring)**(FlowAuthPhase phase) |
| std::string_view | **[ToString](Namespaces/namespacellarp_1_1layers_1_1flow.md#function-tostring)**(FlowDataKind kind) |

## Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr uint16_t | **[default_flow_mtu](Namespaces/namespacellarp_1_1layers_1_1flow.md#variable-default-flow-mtu)** <br>the mtu of plaintext data we transport via the flow layer.  |
| constexpr uint16_t | **[max_flow_mtu](Namespaces/namespacellarp_1_1layers_1_1flow.md#variable-max-flow-mtu)** <br>maximum mtu we can carry of the flow layer  |

## Types Documentation

### enum FlowAuthPhase

| Enumerator | Value | Description |
| ---------- | ----- | ----------- |
| auth_req_not_sent | | we have not sent the auth to the remote yet.   |
| auth_req_sent | | we sent our auth to the remote.   |
| auth_nack | | the remote explicitly rejected our auth.   |
| auth_more | | the remote asked for auth.   |
| auth_ok | | the remote accepted our auth.   |



which phase in authentication a flow is in while establishing. 

### enum FlowDataKind

| Enumerator | Value | Description |
| ---------- | ----- | ----------- |
| unknown | |   |
| direct_ip_unicast | | unicast ip traffic that does NOT exit lokinet.   |
| exit_ip_unicast | | unicast ip traffic that does exit lokinet.   |
| auth | | auth data.   |
| stream_unicast | | unicast stream data.   |




### enum FlowInfoState

| Enumerator | Value | Description |
| ---------- | ----- | ----------- |
| good | |   |
| active | |   |
| idle | |   |
| stalled | |   |





## Functions Documentation

### function to_flow_addr

```cpp
template <typename T >
static FlowAddr to_flow_addr(
    const T & addr
)
```

convert to flow addr 

### function ToString

```cpp
std::string_view ToString(
    FlowAuthPhase phase
)
```


### function ToString

```cpp
std::string_view ToString(
    FlowDataKind kind
)
```



## Attributes Documentation

### variable default_flow_mtu

```cpp
static constexpr uint16_t default_flow_mtu = 1500;
```

the mtu of plaintext data we transport via the flow layer. 

### variable max_flow_mtu

```cpp
static constexpr uint16_t max_flow_mtu = 4096;
```

maximum mtu we can carry of the flow layer 




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

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