---
title: llarp::apple::AppleOSTraffic_IO
summary: applies os traffic io quarks for apple platform 

---

# llarp::apple::AppleOSTraffic_IO



applies os traffic io quarks for apple platform 


`#include <context.hpp>`

Inherits from [llarp::layers::platform::OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| virtual std::vector< [layers::platform::OSTraffic](Classes/structllarp_1_1layers_1_1platform_1_1OSTraffic.md) > | **[read_platform_traffic](Classes/classllarp_1_1apple_1_1AppleOSTraffic__IO.md#function-read-platform-traffic)**() override<br>read from the os.  |

## Additional inherited members

**Public Functions inherited from [llarp::layers::platform::OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md)**

|                | Name           |
| -------------- | -------------- |
| | **[OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-ostraffic-io-base)**(const EventLoop_ptr & ) |
| virtual | **[~OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-~ostraffic-io-base)**() =default |
| constexpr const [PlatformAddr](Classes/structllarp_1_1layers_1_1platform_1_1PlatformAddr.md) & | **[our_platform_addr](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-our-platform-addr)**() const<br>get the platform address of the underlying device managed.  |
| void | **[attach](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-attach)**(std::shared_ptr< [vpn::NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) > netif, std::shared_ptr< [EventLoopWakeup](Classes/classllarp_1_1EventLoopWakeup.md) > wakeup_recv)<br>attach to a vpn interface.  |
| void | **[attach](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-attach)**(std::shared_ptr< [quic::TunnelManager](Classes/classllarp_1_1quic_1_1TunnelManager.md) > quic_tun, std::shared_ptr< [EventLoopWakeup](Classes/classllarp_1_1EventLoopWakeup.md) > wakeup_recv)<br>attach to a quic handler.  |
| virtual void | **[write_platform_traffic](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-write-platform-traffic)**(std::vector< [OSTraffic](Classes/structllarp_1_1layers_1_1platform_1_1OSTraffic.md) > && traff)<br>write traffic to the os.  |
| void | **[detach](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-detach)**()<br>stop all future io and detach from event loop.  |

**Protected Functions inherited from [llarp::layers::platform::OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md)**

|                | Name           |
| -------------- | -------------- |
| virtual void | **[got_ip_packet](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-got-ip-packet)**([net::IPPacket](Classes/structllarp_1_1net_1_1IPPacket.md) ) |

**Protected Attributes inherited from [llarp::layers::platform::OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md)**

|                | Name           |
| -------------- | -------------- |
| std::weak_ptr< [EventLoop](Classes/classllarp_1_1EventLoop.md) > | **[_loop](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#variable--loop)**  |
| std::shared_ptr< [vpn::NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) > | **[_netif](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#variable--netif)**  |
| std::shared_ptr< [quic::TunnelManager](Classes/classllarp_1_1quic_1_1TunnelManager.md) > | **[_quic](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#variable--quic)**  |


## Public Functions Documentation

### function read_platform_traffic

```cpp
inline virtual std::vector< layers::platform::OSTraffic > read_platform_traffic() override
```

read from the os. 

**Reimplements**: [llarp::layers::platform::OSTraffic_IO_Base::read_platform_traffic](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md#function-read-platform-traffic)


this MUST NOT have any internal userland buffering from previous calls to [read_platform_traffic()](Classes/classllarp_1_1apple_1_1AppleOSTraffic__IO.md#function-read-platform-traffic). 


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

Updated on 2023-04-27 at 04:17:17 +0000