---
title: llarp::layers::platform::MappingStats
summary: stats on a specific addrmapper mapping. 

---

# llarp::layers::platform::MappingStats



stats on a specific addrmapper mapping. 


`#include <platform_stats.hpp>`

## Public Types

|                | Name           |
| -------------- | -------------- |
| using std::chrono::steady_clock | **[clock_t](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#using-clock-t)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[MappingStats](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-mappingstats)**() =default |
| | **[MappingStats](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-mappingstats)**(const [AddressMapping](Classes/structllarp_1_1layers_1_1platform_1_1AddressMapping.md) & ent, const [flow::FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md) & flow_layer) |
| constexpr bool | **[allows_transit](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-allows-transit)**() const<br>return true if this flow allows us to send routable ip traffic (exit traffic) over it.  |
| constexpr bool | **[is_ready](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-is-ready)**() const<br>return true if this flow is up and running.  |
| constexpr bool | **[traffic_permitted](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-traffic-permitted)**() const<br>return true if we have been permitted by the remote to transfer traffic.  |
| constexpr bool | **[has_authenticated](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-has-authenticated)**() const<br>return true if we have completed an authentication with the remote.  |
| constexpr bool | **[requires_authentication](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-requires-authentication)**() const<br>return true if the flow requires authentication to transfer traffic.  |
| constexpr bool | **[locally_initiated](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#function-locally-initiated)**() const<br>returns true if we were the end that initiated this mapping.  |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| [PlatformAddr](Classes/structllarp_1_1layers_1_1platform_1_1PlatformAddr.md) | **[src](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#variable-src)** <br>source and destination os addresses.  |
| [PlatformAddr](Classes/structllarp_1_1layers_1_1platform_1_1PlatformAddr.md) | **[dst](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#variable-dst)**  |
| [flow::FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md) | **[laddr](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#variable-laddr)** <br>local and remote flow layer addresses for this mapping.  |
| [flow::FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md) | **[raddr](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#variable-raddr)**  |
| clock_t::time_point | **[created_at](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#variable-created-at)** <br>when this mapping was created.  |
| std::optional< clock_t::time_point > | **[established_at](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#variable-established-at)** <br>when this mapping first established a flow to the remove.  |
| std::optional< clock_t::time_point > | **[last_active_at](Classes/structllarp_1_1layers_1_1platform_1_1MappingStats.md#variable-last-active-at)** <br>when this mapping was last active at.  |

## Public Types Documentation

### using clock_t

```cpp
using llarp::layers::platform::MappingStats::clock_t =  std::chrono::steady_clock;
```


## Public Functions Documentation

### function MappingStats

```cpp
MappingStats() =default
```


### function MappingStats

```cpp
MappingStats(
    const AddressMapping & ent,
    const flow::FlowLayer & flow_layer
)
```


### function allows_transit

```cpp
inline constexpr bool allows_transit() const
```

return true if this flow allows us to send routable ip traffic (exit traffic) over it. 

### function is_ready

```cpp
inline constexpr bool is_ready() const
```

return true if this flow is up and running. 

### function traffic_permitted

```cpp
inline constexpr bool traffic_permitted() const
```

return true if we have been permitted by the remote to transfer traffic. 

### function has_authenticated

```cpp
inline constexpr bool has_authenticated() const
```

return true if we have completed an authentication with the remote. 

### function requires_authentication

```cpp
inline constexpr bool requires_authentication() const
```

return true if the flow requires authentication to transfer traffic. 

### function locally_initiated

```cpp
inline constexpr bool locally_initiated() const
```

returns true if we were the end that initiated this mapping. 

## Public Attributes Documentation

### variable src

```cpp
PlatformAddr src;
```

source and destination os addresses. 

### variable dst

```cpp
PlatformAddr dst;
```


### variable laddr

```cpp
flow::FlowAddr laddr;
```

local and remote flow layer addresses for this mapping. 

### variable raddr

```cpp
flow::FlowAddr raddr;
```


### variable created_at

```cpp
clock_t::time_point created_at;
```

when this mapping was created. 

### variable established_at

```cpp
std::optional< clock_t::time_point > established_at;
```

when this mapping first established a flow to the remove. 

### variable last_active_at

```cpp
std::optional< clock_t::time_point > last_active_at;
```

when this mapping was last active at. 

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

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