mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
f574cd798f
- 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
25 lines
736 B
C++
25 lines
736 B
C++
#include "vpn_platform.hpp"
|
|
|
|
#include "context.hpp"
|
|
|
|
namespace llarp::apple
|
|
{
|
|
VPNPlatform::VPNPlatform(
|
|
Context& ctx,
|
|
VPNInterface::packet_write_callback packet_writer,
|
|
VPNInterface::on_readable_callback on_readable,
|
|
llarp_route_callbacks route_callbacks,
|
|
void* callback_context)
|
|
: _context{ctx}
|
|
, _route_manager{ctx, std::move(route_callbacks), callback_context}
|
|
, _packet_writer{std::move(packet_writer)}
|
|
, _read_cb{std::move(on_readable)}
|
|
{}
|
|
|
|
std::shared_ptr<vpn::NetworkInterface>
|
|
VPNPlatform::ObtainInterface(vpn::InterfaceInfo, Router* router)
|
|
{
|
|
return std::make_shared<VPNInterface>(_context, _packet_writer, _read_cb, router);
|
|
}
|
|
} // namespace llarp::apple
|