---
title: llarp::win32::VPNPlatform

---

# llarp::win32::VPNPlatform





Inherits from [llarp::vpn::Platform](Classes/classllarp_1_1vpn_1_1Platform.md), [llarp::vpn::IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-vpnplatform)**(const [VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md) & ) =delete |
| | **[VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-vpnplatform)**([VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md) && ) =delete |
| | **[VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-vpnplatform)**(llarp::Context * ctx) |
| | **[~VPNPlatform](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-~vpnplatform)**() override =default |
| virtual void | **[AddRoute](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-addroute)**(net::ipaddr_t ip, net::ipaddr_t gateway) override |
| virtual void | **[DelRoute](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-delroute)**(net::ipaddr_t ip, net::ipaddr_t gateway) override |
| virtual void | **[AddRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-addrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn, [IPRange](Classes/structllarp_1_1IPRange.md) range) override |
| virtual void | **[DelRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-delrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn, [IPRange](Classes/structllarp_1_1IPRange.md) range) override |
| virtual std::vector< net::ipaddr_t > | **[GetGatewaysNotOnInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-getgatewaysnotoninterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn) override |
| virtual void | **[AddDefaultRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-adddefaultrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn) override |
| virtual void | **[DelDefaultRouteViaInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-deldefaultrouteviainterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & vpn) override |
| virtual std::shared_ptr< [NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) > | **[ObtainInterface](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-obtaininterface)**([InterfaceInfo](Classes/structllarp_1_1vpn_1_1InterfaceInfo.md) info, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * router) override<br>get a new network interface fully configured given the interface info blocks until ready, throws on error  |
| std::shared_ptr< [I_Packet_IO](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md) > | **[create_packet_io](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-create-packet-io)**(unsigned int ifindex, const std::optional< [SockAddr](Classes/structllarp_1_1SockAddr.md) > & dns_upstream_src) override |
| virtual [IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md) & | **[RouteManager](Classes/classllarp_1_1win32_1_1VPNPlatform.md#function-routemanager)**() override<br>get owned ip route manager for managing routing table  |

## Additional inherited members

**Public Functions inherited from [llarp::vpn::Platform](Classes/classllarp_1_1vpn_1_1Platform.md)**

|                | Name           |
| -------------- | -------------- |
| | **[Platform](Classes/classllarp_1_1vpn_1_1Platform.md#function-platform)**() =default |
| | **[Platform](Classes/classllarp_1_1vpn_1_1Platform.md#function-platform)**(const [Platform](Classes/classllarp_1_1vpn_1_1Platform.md) & ) =delete |
| | **[Platform](Classes/classllarp_1_1vpn_1_1Platform.md#function-platform)**([Platform](Classes/classllarp_1_1vpn_1_1Platform.md) && ) =delete |
| virtual | **[~Platform](Classes/classllarp_1_1vpn_1_1Platform.md#function-~platform)**() =default |
| std::shared_ptr< [NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) > | **[CreateInterface](Classes/classllarp_1_1vpn_1_1Platform.md#function-createinterface)**([InterfaceInfo](Classes/structllarp_1_1vpn_1_1InterfaceInfo.md) info, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * router)<br>create and start a network interface  |

**Public Functions inherited from [llarp::vpn::IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md)**

|                | 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 |
| 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 VPNPlatform

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


### function VPNPlatform

```cpp
VPNPlatform(
    VPNPlatform && 
) =delete
```


### function VPNPlatform

```cpp
inline VPNPlatform(
    llarp::Context * ctx
)
```


### function ~VPNPlatform

```cpp
~VPNPlatform() override =default
```


### function AddRoute

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


**Reimplements**: [llarp::vpn::IRouteManager::AddRoute](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-addroute)


### function DelRoute

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


**Reimplements**: [llarp::vpn::IRouteManager::DelRoute](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-delroute)


### function AddRouteViaInterface

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


**Reimplements**: [llarp::vpn::IRouteManager::AddRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-addrouteviainterface)


### function DelRouteViaInterface

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


**Reimplements**: [llarp::vpn::IRouteManager::DelRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-delrouteviainterface)


### function GetGatewaysNotOnInterface

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


**Reimplements**: [llarp::vpn::IRouteManager::GetGatewaysNotOnInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-getgatewaysnotoninterface)


### function AddDefaultRouteViaInterface

```cpp
virtual void AddDefaultRouteViaInterface(
    NetworkInterface & vpn
) override
```


**Reimplements**: [llarp::vpn::IRouteManager::AddDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-adddefaultrouteviainterface)


### function DelDefaultRouteViaInterface

```cpp
virtual void DelDefaultRouteViaInterface(
    NetworkInterface & vpn
) override
```


**Reimplements**: [llarp::vpn::IRouteManager::DelDefaultRouteViaInterface](Classes/classllarp_1_1vpn_1_1IRouteManager.md#function-deldefaultrouteviainterface)


### function ObtainInterface

```cpp
virtual std::shared_ptr< NetworkInterface > ObtainInterface(
    InterfaceInfo info,
    AbstractRouter * router
) override
```

get a new network interface fully configured given the interface info blocks until ready, throws on error 

**Reimplements**: [llarp::vpn::Platform::ObtainInterface](Classes/classllarp_1_1vpn_1_1Platform.md#function-obtaininterface)


### function create_packet_io

```cpp
std::shared_ptr< I_Packet_IO > create_packet_io(
    unsigned int ifindex,
    const std::optional< SockAddr > & dns_upstream_src
) override
```


### function RouteManager

```cpp
inline virtual IRouteManager & RouteManager() override
```

get owned ip route manager for managing routing table 

**Reimplements**: [llarp::vpn::Platform::RouteManager](Classes/classllarp_1_1vpn_1_1Platform.md#function-routemanager)


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

Updated on 2023-01-24 at 18:23:43 +0000