lokinet/llarp/apple/vpn_platform.hpp
dr7ana f574cd798f Clang format include sorting + CMake
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use
- shuffled around some cmake linking to simplify dependency graph
- superfluous files removed
2024-01-31 07:54:12 -08:00

37 lines
860 B
C++

#pragma once
#include "route_manager.hpp"
#include "vpn_interface.hpp"
#include <llarp/vpn/platform.hpp>
namespace llarp::apple
{
class VPNPlatform final : public vpn::Platform
{
public:
explicit VPNPlatform(
Context& ctx,
VPNInterface::packet_write_callback packet_writer,
VPNInterface::on_readable_callback on_readable,
llarp_route_callbacks route_callbacks,
void* callback_context);
std::shared_ptr<vpn::NetworkInterface>
ObtainInterface(vpn::InterfaceInfo, Router*) override;
vpn::AbstractRouteManager&
RouteManager() override
{
return _route_manager;
}
private:
Context& _context;
apple::RouteManager _route_manager;
VPNInterface::packet_write_callback _packet_writer;
VPNInterface::on_readable_callback _read_cb;
};
} // namespace llarp::apple