---
title: llarp::apple::ApplePlatformLayer
summary: applies quarks for apple for the platform layer. 

---

# llarp::apple::ApplePlatformLayer



applies quarks for apple for the platform layer. 


`#include <context.hpp>`

Inherits from [llarp::layers::platform::PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md)

## Protected Functions

|                | Name           |
| -------------- | -------------- |
| virtual std::unique_ptr< [layers::platform::OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md) > | **[make_io](Classes/classllarp_1_1apple_1_1ApplePlatformLayer.md#function-make-io)**() const override<br>make platform specific io with quarks.  |

## Additional inherited members

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

|                | Name           |
| -------------- | -------------- |
| | **[PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-platformlayer)**(const [PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md) & ) =delete |
| | **[PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-platformlayer)**([PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md) && ) =delete |
| | **[PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-platformlayer)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) & router, [flow::FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md) & flow_layer, const [NetworkConfig](Classes/structllarp_1_1NetworkConfig.md) & netconf) |
| void | **[start](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-start)**() |
| void | **[stop](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-stop)**() |
| std::shared_ptr< [vpn::NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) > | **[vpn_interface](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-vpn-interface)**() const |
| [vpn::IRouteManager](Classes/classllarp_1_1vpn_1_1IRouteManager.md) * | **[route_manager](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-route-manager)**() const |
| [DNSZone](Classes/classllarp_1_1layers_1_1platform_1_1DNSZone.md) & | **[local_dns_zone](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-local-dns-zone)**()<br>return the dns zone for our local self.  |
| void | **[os_traffic](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-os-traffic)**(std::vector< [OSTraffic](Classes/structllarp_1_1layers_1_1platform_1_1OSTraffic.md) > && pkts)<br>called each time we get a bunch of os traffic.  |
| void | **[flow_traffic](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-flow-traffic)**(std::vector< [flow::FlowTraffic](Classes/structllarp_1_1layers_1_1flow_1_1FlowTraffic.md) > && traff)<br>give the platform layer flow layer traffic to write to the os.  |
| void | **[async_obtain_dns_zone](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-async-obtain-dns-zone)**(std::string name, std::function< void(std::optional< [DNSZone](Classes/classllarp_1_1layers_1_1platform_1_1DNSZone.md) >)> result_handler)<br>async resolve dns zone given a flow level name.  |
| void | **[map_remote](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-map-remote)**(std::string name, std::string auth, std::vector< [IPRange](Classes/structllarp_1_1IPRange.md) > ranges, std::optional< [PlatformAddr](Classes/structllarp_1_1layers_1_1platform_1_1PlatformAddr.md) > src =std::nullopt, std::function< void(std::optional< [flow::FlowInfo](Classes/structllarp_1_1layers_1_1flow_1_1FlowInfo.md) >, std::string)> result_handler =nullptr) |
| void | **[map_exit](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-map-exit)**(std::string name, std::string auth, std::vector< [IPRange](Classes/structllarp_1_1IPRange.md) > ranges, std::function< void(bool, std::string)> result_handler)<br>calls map_remote() for exits  |
| void | **[unmap_exit](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-unmap-exit)**([flow::FlowAddr](Classes/classllarp_1_1layers_1_1flow_1_1FlowAddr.md) remote, std::optional< [IPRange](Classes/structllarp_1_1IPRange.md) > range =std::nullopt)<br>unmap an exit from a range  |
| void | **[unmap_all_exits_on_range](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-unmap-all-exits-on-range)**([IPRange](Classes/structllarp_1_1IPRange.md) range)<br>unmap every exit that is mapped to this range.  |
| [PlatformStats](Classes/structllarp_1_1layers_1_1platform_1_1PlatformStats.md) | **[current_stats](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-current-stats)**() const |

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

|                | Name           |
| -------------- | -------------- |
| void | **[on_io](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-on-io)**()<br>called once per event loop tick after platform layer event loop polled for and consumed io.  |

**Public Attributes inherited from [llarp::layers::platform::PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md)**

|                | Name           |
| -------------- | -------------- |
| [AddrMapper](Classes/classllarp_1_1layers_1_1platform_1_1AddrMapper.md) | **[addr_mapper](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable-addr-mapper)** <br>holds address mapping state.  |
| const std::unique_ptr< [OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md) > & | **[io](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable-io)** <br>underlying io.  |
| const std::shared_ptr< [EventLoopWakeup](Classes/classllarp_1_1EventLoopWakeup.md) > & | **[wakeup](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable-wakeup)** <br>wake this up when the event loop reads ip packets.  |

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

|                | Name           |
| -------------- | -------------- |
| [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) & | **[_router](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--router)**  |
| [flow::FlowLayer](Classes/classllarp_1_1layers_1_1flow_1_1FlowLayer.md) & | **[_flow_layer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--flow-layer)**  |
| std::shared_ptr< [EventLoopWakeup](Classes/classllarp_1_1EventLoopWakeup.md) > | **[_os_recv](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--os-recv)** <br>called to wake up the loop to read os traffic  |
| [NetworkConfig](Classes/structllarp_1_1NetworkConfig.md) | **[_netconf](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--netconf)**  |
| std::shared_ptr< [DNSQueryHandler](Classes/classllarp_1_1layers_1_1platform_1_1DNSQueryHandler.md) > | **[_dns_query_handler](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--dns-query-handler)** <br>handler of dns queries.  |
| std::weak_ptr< [vpn::NetworkInterface](Classes/classllarp_1_1vpn_1_1NetworkInterface.md) > | **[_netif](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--netif)**  |
| std::unique_ptr< [OSTraffic_IO_Base](Classes/classllarp_1_1layers_1_1platform_1_1OSTraffic__IO__Base.md) > | **[_io](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--io)**  |
| std::shared_ptr< [DNSZone](Classes/classllarp_1_1layers_1_1platform_1_1DNSZone.md) > | **[_local_dns_zone](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#variable--local-dns-zone)**  |

**Friends inherited from [llarp::layers::platform::PlatformLayer](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md)**

|                | Name           |
| -------------- | -------------- |
| struct | **[platform_io_wakeup_handler](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#friend-platform-io-wakeup-handler)**  |
| struct | **[add_initial_mappings](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#friend-add-initial-mappings)**  |


## Protected Functions Documentation

### function make_io

```cpp
inline virtual std::unique_ptr< layers::platform::OSTraffic_IO_Base > make_io() const override
```

make platform specific io with quarks. 

**Reimplements**: [llarp::layers::platform::PlatformLayer::make_io](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer.md#function-make-io)


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

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