---
title: llarp::RouterVersion

---

# llarp::RouterVersion





## Public Types

|                | Name           |
| -------------- | -------------- |
| using std::array< uint16_t, 3 > | **[Version_t](Classes/structllarp_1_1RouterVersion.md#using-version-t)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[RouterVersion](Classes/structllarp_1_1RouterVersion.md#function-routerversion)**() =default |
| | **[RouterVersion](Classes/structllarp_1_1RouterVersion.md#function-routerversion)**(const Version_t & routerVersion, uint64_t protoVersion) |
| bool | **[BEncode](Classes/structllarp_1_1RouterVersion.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const |
| bool | **[BDecode](Classes/structllarp_1_1RouterVersion.md#function-bdecode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) |
| bool | **[IsEmpty](Classes/structllarp_1_1RouterVersion.md#function-isempty)**() const<br>return true if this router version is all zeros  |
| void | **[Clear](Classes/structllarp_1_1RouterVersion.md#function-clear)**()<br>set to be empty  |
| std::string | **[ToString](Classes/structllarp_1_1RouterVersion.md#function-tostring)**() const |
| bool | **[IsCompatableWith](Classes/structllarp_1_1RouterVersion.md#function-iscompatablewith)**(const [RouterVersion](Classes/structllarp_1_1RouterVersion.md) & other) const<br>return true if the other router version is compatible with ours  |
| bool | **[operator<](Classes/structllarp_1_1RouterVersion.md#function-operator<)**(const [RouterVersion](Classes/structllarp_1_1RouterVersion.md) & other) const<br>compare router versions  |
| bool | **[operator!=](Classes/structllarp_1_1RouterVersion.md#function-operator!=)**(const [RouterVersion](Classes/structllarp_1_1RouterVersion.md) & other) const |
| bool | **[operator==](Classes/structllarp_1_1RouterVersion.md#function-operator==)**(const [RouterVersion](Classes/structllarp_1_1RouterVersion.md) & other) const |

## Public Types Documentation

### using Version_t

```cpp
using llarp::RouterVersion::Version_t =  std::array<uint16_t, 3>;
```


## Public Functions Documentation

### function RouterVersion

```cpp
RouterVersion() =default
```


### function RouterVersion

```cpp
explicit RouterVersion(
    const Version_t & routerVersion,
    uint64_t protoVersion
)
```


### function BEncode

```cpp
bool BEncode(
    llarp_buffer_t * buf
) const
```


### function BDecode

```cpp
bool BDecode(
    llarp_buffer_t * buf
)
```


### function IsEmpty

```cpp
bool IsEmpty() const
```

return true if this router version is all zeros 

### function Clear

```cpp
void Clear()
```

set to be empty 

### function ToString

```cpp
std::string ToString() const
```


### function IsCompatableWith

```cpp
bool IsCompatableWith(
    const RouterVersion & other
) const
```

return true if the other router version is compatible with ours 

### function operator<

```cpp
inline bool operator<(
    const RouterVersion & other
) const
```

compare router versions 

### function operator!=

```cpp
inline bool operator!=(
    const RouterVersion & other
) const
```


### function operator==

```cpp
inline bool operator==(
    const RouterVersion & other
) const
```


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

Updated on 2022-10-17 at 13:14:48 +0000