---
title: llarp::vpn::Win32Interface

---

# llarp::vpn::Win32Interface





Inherits from [llarp::vpn::NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md)

## Public Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[asio_evt_pkt](Classes/structllarp_1_1vpn_1_1Win32Interface_1_1asio__evt__pkt.md)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| std::string | **[RouteCommand](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-routecommand)**() |
| | **[Win32Interface](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-win32interface)**([InterfaceInfo](Classes/structllarp_1_1vpn_1_1InterfaceInfo.md) info, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * router) |
| | **[~Win32Interface](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-~win32interface)**() |
| virtual void | **[MaybeWakeUpperLayers](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-maybewakeupperlayers)**() const override<br>idempotently wake up the upper layers as needed (platform dependant)  |
| virtual int | **[PollFD](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-pollfd)**() const override<br>get pollable fd for reading  |
| virtual std::string | **[IfName](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-ifname)**() const override<br>the interface's name  |
| void | **[Start](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-start)**() |
| virtual [net::IPPacket](Classes/structllarp_1_1net_1_1IPPacket.md) | **[ReadNextPacket](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-readnextpacket)**() override<br>read next ip packet, return an empty packet if there are none ready.  |
| virtual bool | **[WritePacket](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-writepacket)**([net::IPPacket](Classes/structllarp_1_1net_1_1IPPacket.md) pkt)<br>write a packet to the interface returns false if we dropped it  |
| void | **[ReadLoop](Classes/classllarp_1_1vpn_1_1Win32Interface.md#function-readloop)**(size_t packetIndex) |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| std::vector< std::unique_ptr< [asio_evt_pkt](Classes/structllarp_1_1vpn_1_1Win32Interface_1_1asio__evt__pkt.md) > > | **[m_Packets](Classes/classllarp_1_1vpn_1_1Win32Interface.md#variable-m-packets)**  |

## Additional inherited members

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

|                | Name           |
| -------------- | -------------- |
| | **[NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-networkinterface)**() =default |
| | **[NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-networkinterface)**(const [NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) & ) =delete |
| | **[NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-networkinterface)**([NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) && ) =delete |
| virtual | **[~NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-~networkinterface)**() =default |


## Public Functions Documentation

### function RouteCommand

```cpp
static inline std::string RouteCommand()
```


### function Win32Interface

```cpp
inline Win32Interface(
    InterfaceInfo info,
    AbstractRouter * router
)
```


### function ~Win32Interface

```cpp
inline ~Win32Interface()
```


### function MaybeWakeUpperLayers

```cpp
inline virtual void MaybeWakeUpperLayers() const override
```

idempotently wake up the upper layers as needed (platform dependant) 

**Reimplements**: [llarp::vpn::NetworkInterface::MaybeWakeUpperLayers](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-maybewakeupperlayers)


### function PollFD

```cpp
inline virtual int PollFD() const override
```

get pollable fd for reading 

**Reimplements**: [llarp::vpn::NetworkInterface::PollFD](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-pollfd)


### function IfName

```cpp
inline virtual std::string IfName() const override
```

the interface's name 

**Reimplements**: [llarp::vpn::NetworkInterface::IfName](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-ifname)


### function Start

```cpp
inline void Start()
```


### function ReadNextPacket

```cpp
inline virtual net::IPPacket ReadNextPacket() override
```

read next ip packet, return an empty packet if there are none ready. 

**Reimplements**: [llarp::vpn::NetworkInterface::ReadNextPacket](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-readnextpacket)


### function WritePacket

```cpp
inline virtual bool WritePacket(
    net::IPPacket pkt
)
```

write a packet to the interface returns false if we dropped it 

**Reimplements**: [llarp::vpn::NetworkInterface::WritePacket](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-writepacket)


### function ReadLoop

```cpp
inline void ReadLoop(
    size_t packetIndex
)
```


## Public Attributes Documentation

### variable m_Packets

```cpp
std::vector< std::unique_ptr< asio_evt_pkt > > m_Packets;
```


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

Updated on 2022-08-30 at 18:09:28 +0000