---
title: llarp::layers::platform::AddressMappingEntry
summary: container that holds an addressmapping and extra metadata we need in the addrmapper. 

---

# llarp::layers::platform::AddressMappingEntry



container that holds an addressmapping and extra metadata we need in the addrmapper. 


`#include <addr_mapper.hpp>`

## Public Functions

|                | Name           |
| -------------- | -------------- |
| bool | **[has_addr](Classes/classllarp_1_1layers_1_1platform_1_1AddressMappingEntry.md#function-has-addr)**(const [PlatformAddr](Classes/structllarp_1_1layers_1_1platform_1_1PlatformAddr.md) & src, const [PlatformAddr](Classes/structllarp_1_1layers_1_1platform_1_1PlatformAddr.md) & dst) const<br>return true if we match this src and dst address.  |
| bool | **[routes_addr](Classes/classllarp_1_1layers_1_1platform_1_1AddressMappingEntry.md#function-routes-addr)**(const [PlatformAddr](Classes/structllarp_1_1layers_1_1platform_1_1PlatformAddr.md) & dst) const<br>return true if we can route to this destination address.  |
| bool | **[has_flow_info](Classes/classllarp_1_1layers_1_1platform_1_1AddressMappingEntry.md#function-has-flow-info)**(const [flow::FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md) & flow_info) const<br>return true if this entry is for this flow info.  |
| auto | **[idle_for](Classes/classllarp_1_1layers_1_1platform_1_1AddressMappingEntry.md#function-idle-for)**() const<br>a helper that returns how long since we last used this entry.  |
| constexpr const auto & | **[last_used_at](Classes/classllarp_1_1layers_1_1platform_1_1AddressMappingEntry.md#function-last-used-at)**() const<br>readonly accessor for _last_used_at.  |
| [AddressMapping](Classes/structllarp_1_1layers_1_1platform_1_1AddressMapping.md) & | **[access](Classes/classllarp_1_1layers_1_1platform_1_1AddressMappingEntry.md#function-access)**()<br>update last used and access the entry.  |
| const [AddressMapping](Classes/structllarp_1_1layers_1_1platform_1_1AddressMapping.md) & | **[view](Classes/classllarp_1_1layers_1_1platform_1_1AddressMappingEntry.md#function-view)**() const<br>view address mapping without updating last use.  |

## Public Functions Documentation

### function has_addr

```cpp
bool has_addr(
    const PlatformAddr & src,
    const PlatformAddr & dst
) const
```

return true if we match this src and dst address. 

### function routes_addr

```cpp
bool routes_addr(
    const PlatformAddr & dst
) const
```

return true if we can route to this destination address. 

### function has_flow_info

```cpp
bool has_flow_info(
    const flow::FlowInfo & flow_info
) const
```

return true if this entry is for this flow info. 

### function idle_for

```cpp
inline auto idle_for() const
```

a helper that returns how long since we last used this entry. 

### function last_used_at

```cpp
inline constexpr const auto & last_used_at() const
```

readonly accessor for _last_used_at. 

### function access

```cpp
AddressMapping & access()
```

update last used and access the entry. 

### function view

```cpp
const AddressMapping & view() const
```

view address mapping without updating last use. 

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

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