---
title: llarp::apple

---

# llarp::apple



## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::apple::AppleRouter](Classes/structllarp_1_1apple_1_1AppleRouter.md)** <br>router with apple quarks applied.  |
| struct | **[llarp::apple::Context](Classes/structllarp_1_1apple_1_1Context.md)**  |
| class | **[llarp::apple::AppleOSTraffic_IO](Classes/classllarp_1_1apple_1_1AppleOSTraffic__IO.md)** <br>applies os traffic io quarks for apple platform  |
| class | **[llarp::apple::ApplePlatformLayer](Classes/classllarp_1_1apple_1_1ApplePlatformLayer.md)** <br>applies quarks for apple for the platform layer.  |
| class | **[llarp::apple::RouteManager](Classes/classllarp_1_1apple_1_1RouteManager.md)**  |
| class | **[llarp::apple::AppleVPNInterface](Classes/classllarp_1_1apple_1_1AppleVPNInterface.md)**  |
| class | **[llarp::apple::VPNPlatform](Classes/classllarp_1_1apple_1_1VPNPlatform.md)**  |

## Types

|                | Name           |
| -------------- | -------------- |
| using std::function< bool(int af_family, void *data, int size)> | **[packet_write_callback](Namespaces/namespacellarp_1_1apple.md#using-packet-write-callback)**  |
| using AppleVPNInterface::on_readable_callback | **[on_readable_callback](Namespaces/namespacellarp_1_1apple.md#using-on-readable-callback)**  |

## Functions

|                | Name           |
| -------------- | -------------- |
| std::unique_ptr< const [layers::Layers](Classes/structllarp_1_1layers_1_1Layers.md) > | **[make_apple_layers](Namespaces/namespacellarp_1_1apple.md#function-make-apple-layers)**([Context](Classes/structllarp_1_1apple_1_1Context.md) & ctx, [Config](Classes/structllarp_1_1Config.md) conf)<br>make layers with platform specific quarks applied.  |
| std::unique_ptr< const [layers::Layers](Classes/structllarp_1_1layers_1_1Layers.md) > | **[make_apple_layers](Namespaces/namespacellarp_1_1apple.md#function-make-apple-layers)**([AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) & router, [Config](Classes/structllarp_1_1Config.md) conf) |

## Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr std::uint16_t | **[dns_trampoline_port](Namespaces/namespacellarp_1_1apple.md#variable-dns-trampoline-port)** <br>Localhost port on macOS where we proxy DNS requests _through_ the tunnel, because without calling into special snowflake Apple network APIs an extension's network connections all go around the tunnel, even when the tunnel is (supposedly) the default route.  |
| constexpr std::uint16_t | **[dns_trampoline_source_port](Namespaces/namespacellarp_1_1apple.md#variable-dns-trampoline-source-port)** <br>We query the above trampoline from unbound with this fixed source port (so that the trampoline is simplified by not having to track different ports for different requests).  |

## Types Documentation

### using packet_write_callback

```cpp
using llarp::apple::packet_write_callback = typedef std::function<bool(int af_family, void* data, int size)>;
```


### using on_readable_callback

```cpp
using llarp::apple::on_readable_callback = typedef AppleVPNInterface::on_readable_callback;
```



## Functions Documentation

### function make_apple_layers

```cpp
std::unique_ptr< const layers::Layers > make_apple_layers(
    Context & ctx,
    Config conf
)
```

make layers with platform specific quarks applied. 

### function make_apple_layers

```cpp
std::unique_ptr< const layers::Layers > make_apple_layers(
    AbstractRouter & router,
    Config conf
)
```



## Attributes Documentation

### variable dns_trampoline_port

```cpp
constexpr std::uint16_t dns_trampoline_port = 1053;
```

Localhost port on macOS where we proxy DNS requests _through_ the tunnel, because without calling into special snowflake Apple network APIs an extension's network connections all go around the tunnel, even when the tunnel is (supposedly) the default route. 

### variable dns_trampoline_source_port

```cpp
constexpr std::uint16_t dns_trampoline_source_port = 1054;
```

We query the above trampoline from unbound with this fixed source port (so that the trampoline is simplified by not having to track different ports for different requests). 




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

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