---
title: llarp::vpn::NetworkInterface
summary: a vpn network interface 

---

# llarp::vpn::NetworkInterface



a vpn network interface 


`#include <platform.hpp>`

Inherits from [llarp::vpn::I_Packet_IO](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md)

Inherited by [llarp::apple::VPNInterface](Classes/classllarp_1_1apple_1_1VPNInterface.md), [llarp::vpn::AndroidInterface](Classes/classllarp_1_1vpn_1_1AndroidInterface.md), [llarp::vpn::LinuxInterface](Classes/classllarp_1_1vpn_1_1LinuxInterface.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-networkinterface)**([InterfaceInfo](Classes/structllarp_1_1vpn_1_1InterfaceInfo.md) info) |
| | **[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 |
| const [InterfaceInfo](Classes/structllarp_1_1vpn_1_1InterfaceInfo.md) & | **[Info](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-info)**() const |
| virtual void | **[MaybeWakeUpperLayers](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#function-maybewakeupperlayers)**() const<br>idempotently wake up the upper layers as needed (platform dependant)  |

## Protected Attributes

|                | Name           |
| -------------- | -------------- |
| [InterfaceInfo](Classes/structllarp_1_1vpn_1_1InterfaceInfo.md) | **[m_Info](Classes/classllarp_1_1vpn_1_1NetworkInterface.md#variable-m-info)**  |

## Additional inherited members

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

|                | Name           |
| -------------- | -------------- |
| virtual | **[~I_Packet_IO](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md#function-~i-packet-io)**() =default |
| virtual void | **[Start](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md#function-start)**()<br>start any platform specific operations before running  |
| virtual void | **[Stop](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md#function-stop)**()<br>stop operation and tear down anything that [Start()](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md#function-start) set up.  |
| virtual [net::IPPacket](Classes/structllarp_1_1net_1_1IPPacket.md) | **[ReadNextPacket](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md#function-readnextpacket)**() =0<br>read next ip packet, return an empty packet if there are none ready.  |
| virtual bool | **[WritePacket](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md#function-writepacket)**([net::IPPacket](Classes/structllarp_1_1net_1_1IPPacket.md) pkt) =0<br>write a packet to the interface returns false if we dropped it  |
| virtual int | **[PollFD](Classes/classllarp_1_1vpn_1_1I__Packet__IO.md#function-pollfd)**() const =0<br>get pollable fd for reading  |


## Public Functions Documentation

### function NetworkInterface

```cpp
inline NetworkInterface(
    InterfaceInfo info
)
```


### function NetworkInterface

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


### function NetworkInterface

```cpp
NetworkInterface(
    NetworkInterface && 
) =delete
```


### function Info

```cpp
inline const InterfaceInfo & Info() const
```


### function MaybeWakeUpperLayers

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

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

**Reimplemented by**: [llarp::apple::VPNInterface::MaybeWakeUpperLayers](Classes/classllarp_1_1apple_1_1VPNInterface.md#function-maybewakeupperlayers)


## Protected Attributes Documentation

### variable m_Info

```cpp
InterfaceInfo m_Info;
```


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

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