mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
46ad8d4058
- 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
29 lines
824 B
C++
29 lines
824 B
C++
#pragma once
|
|
|
|
#include "route_manager.hpp"
|
|
#include "vpn_platform.hpp"
|
|
|
|
#include <llarp.hpp>
|
|
|
|
namespace llarp::apple
|
|
{
|
|
struct Context : public llarp::Context
|
|
{
|
|
std::shared_ptr<vpn::Platform>
|
|
makeVPNPlatform() override
|
|
{
|
|
return std::make_shared<VPNPlatform>(
|
|
*this, m_PacketWriter, m_OnReadable, route_callbacks, callback_context);
|
|
}
|
|
|
|
// Callbacks that must be set for packet handling *before* calling Setup/Configure/Run; the main
|
|
// point of these is to get passed through to VPNInterface, which will be called during setup,
|
|
// after construction.
|
|
VPNInterface::packet_write_callback m_PacketWriter;
|
|
VPNInterface::on_readable_callback m_OnReadable;
|
|
llarp_route_callbacks route_callbacks{};
|
|
void* callback_context = nullptr;
|
|
};
|
|
|
|
} // namespace llarp::apple
|