---
title: llarp::vpn::IRouteManager

---

# llarp::vpn::IRouteManager





Inherited by [llarp::apple::RouteManager](Classes/classllarp_1_1apple_1_1RouteManager.md), [llarp::vpn::AndroidRouteManager](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md), [llarp::vpn::LinuxRouteManager](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md), [llarp::win32::VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-iroutemanager)**() =default |
| | **[IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-iroutemanager)**(const [IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md) & ) =delete |
| | **[IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-iroutemanager)**([IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md) && ) =delete |
| virtual | **[~IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-~iroutemanager)**() =default |
| virtual const [llarp::net::Platform](Classes/classllarp_1_1net_1_1Platform.md) * | **[Net_ptr](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-net-ptr)**() const |
| const [llarp::net::Platform](Classes/classllarp_1_1net_1_1Platform.md) & | **[Net](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-net)**() const |
| virtual void | **[AddRoute](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-addroute)**(net::ipaddr_t ip, net::ipaddr_t gateway) =0 |
| virtual void | **[DelRoute](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-delroute)**(net::ipaddr_t ip, net::ipaddr_t gateway) =0 |
| virtual void | **[AddDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-adddefaultrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn) =0 |
| virtual void | **[DelDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-deldefaultrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn) =0 |
| virtual void | **[AddRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-addrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn, [IPRange](Classes/structllarp_1_1IPRange.md) range) =0 |
| virtual void | **[DelRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-delrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn, [IPRange](Classes/structllarp_1_1IPRange.md) range) =0 |
| virtual std::vector< net::ipaddr_t > | **[GetGatewaysNotOnInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-getgatewaysnotoninterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn) =0 |
| virtual void | **[AddBlackhole](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-addblackhole)**() |
| virtual void | **[DelBlackhole](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-delblackhole)**() |

## Public Functions Documentation

### function IRouteManager

```cpp
IRouteManager() =default
```


### function IRouteManager

```cpp
IRouteManager(
    const IRouteManager & 
) =delete
```


### function IRouteManager

```cpp
IRouteManager(
    IRouteManager && 
) =delete
```


### function ~IRouteManager

```cpp
virtual ~IRouteManager() =default
```


### function Net_ptr

```cpp
virtual const llarp::net::Platform * Net_ptr() const
```


### function Net

```cpp
inline const llarp::net::Platform & Net() const
```


### function AddRoute

```cpp
virtual void AddRoute(
    net::ipaddr_t ip,
    net::ipaddr_t gateway
) =0
```


**Reimplemented by**: [llarp::vpn::LinuxRouteManager::AddRoute](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-addroute), [llarp::win32::VPNPlatform::AddRoute](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-addroute), [llarp::apple::RouteManager::AddRoute](Classes/classllarp_1_1apple_1_1RouteManager.md#function-addroute), [llarp::vpn::AndroidRouteManager::AddRoute](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md#function-addroute)


### function DelRoute

```cpp
virtual void DelRoute(
    net::ipaddr_t ip,
    net::ipaddr_t gateway
) =0
```


**Reimplemented by**: [llarp::vpn::LinuxRouteManager::DelRoute](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-delroute), [llarp::win32::VPNPlatform::DelRoute](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-delroute), [llarp::apple::RouteManager::DelRoute](Classes/classllarp_1_1apple_1_1RouteManager.md#function-delroute), [llarp::vpn::AndroidRouteManager::DelRoute](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md#function-delroute)


### function AddDefaultRouteViaInterface

```cpp
virtual void AddDefaultRouteViaInterface(
    NetworkInterface & vpn
) =0
```


**Reimplemented by**: [llarp::vpn::AndroidRouteManager::AddDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md#function-adddefaultrouteviainterface), [llarp::vpn::LinuxRouteManager::AddDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-adddefaultrouteviainterface), [llarp::win32::VPNPlatform::AddDefaultRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-adddefaultrouteviainterface), [llarp::apple::RouteManager::AddDefaultRouteViaInterface](Classes/classllarp_1_1apple_1_1RouteManager.md#function-adddefaultrouteviainterface)


### function DelDefaultRouteViaInterface

```cpp
virtual void DelDefaultRouteViaInterface(
    NetworkInterface & vpn
) =0
```


**Reimplemented by**: [llarp::vpn::AndroidRouteManager::DelDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md#function-deldefaultrouteviainterface), [llarp::vpn::LinuxRouteManager::DelDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-deldefaultrouteviainterface), [llarp::win32::VPNPlatform::DelDefaultRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-deldefaultrouteviainterface), [llarp::apple::RouteManager::DelDefaultRouteViaInterface](Classes/classllarp_1_1apple_1_1RouteManager.md#function-deldefaultrouteviainterface)


### function AddRouteViaInterface

```cpp
virtual void AddRouteViaInterface(
    NetworkInterface & vpn,
    IPRange range
) =0
```


**Reimplemented by**: [llarp::vpn::AndroidRouteManager::AddRouteViaInterface](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md#function-addrouteviainterface), [llarp::vpn::LinuxRouteManager::AddRouteViaInterface](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-addrouteviainterface), [llarp::win32::VPNPlatform::AddRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-addrouteviainterface), [llarp::apple::RouteManager::AddRouteViaInterface](Classes/classllarp_1_1apple_1_1RouteManager.md#function-addrouteviainterface)


### function DelRouteViaInterface

```cpp
virtual void DelRouteViaInterface(
    NetworkInterface & vpn,
    IPRange range
) =0
```


**Reimplemented by**: [llarp::vpn::AndroidRouteManager::DelRouteViaInterface](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md#function-delrouteviainterface), [llarp::vpn::LinuxRouteManager::DelRouteViaInterface](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-delrouteviainterface), [llarp::win32::VPNPlatform::DelRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-delrouteviainterface), [llarp::apple::RouteManager::DelRouteViaInterface](Classes/classllarp_1_1apple_1_1RouteManager.md#function-delrouteviainterface)


### function GetGatewaysNotOnInterface

```cpp
virtual std::vector< net::ipaddr_t > GetGatewaysNotOnInterface(
    NetworkInterface & vpn
) =0
```


**Reimplemented by**: [llarp::vpn::AndroidRouteManager::GetGatewaysNotOnInterface](Classes/classllarp_1_1vpn_1_1AndroidRouteManager.md#function-getgatewaysnotoninterface), [llarp::vpn::LinuxRouteManager::GetGatewaysNotOnInterface](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-getgatewaysnotoninterface), [llarp::win32::VPNPlatform::GetGatewaysNotOnInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-getgatewaysnotoninterface), [llarp::apple::RouteManager::GetGatewaysNotOnInterface](Classes/classllarp_1_1apple_1_1RouteManager.md#function-getgatewaysnotoninterface)


### function AddBlackhole

```cpp
inline virtual void AddBlackhole()
```


**Reimplemented by**: [llarp::vpn::LinuxRouteManager::AddBlackhole](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-addblackhole)


### function DelBlackhole

```cpp
inline virtual void DelBlackhole()
```


**Reimplemented by**: [llarp::vpn::LinuxRouteManager::DelBlackhole](Classes/classllarp_1_1vpn_1_1LinuxRouteManager.md#function-delblackhole)


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

Updated on 2023-01-27 at 23:09:26 +0000