mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
a3e6cec7e7
- llarp/router/router.hpp, route_poker, and platform code moved to libquic Address types - implementing required methods in link_manager for connection establishment - coming along nicely
24 lines
735 B
C++
24 lines
735 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
|