llarp::vpn::I_Packet_IO
Inherited by llarp::vpn::NetworkInterface
Public Functions
| Name | |
|---|---|
| virtual | ~I_Packet_IO() =default |
| virtual void | Start() start any platform specific operations before running |
| virtual void | Stop() stop operation and tear down anything that Start() set up. |
| virtual net::IPPacket | ReadNextPacket() =0 read next ip packet, return an empty packet if there are none ready. |
| virtual bool | WritePacket(net::IPPacket pkt) =0 write a packet to the interface returns false if we dropped it |
| virtual int | PollFD() const =0 get pollable fd for reading |
Public Attributes
| Name | |
|---|---|
| std::function< void()> | on_stop |
Public Functions Documentation
function ~I_Packet_IO
virtual ~I_Packet_IO() =default
function Start
inline virtual void Start()
start any platform specific operations before running
function Stop
virtual void Stop()
stop operation and tear down anything that Start() set up.
function ReadNextPacket
virtual net::IPPacket ReadNextPacket() =0
read next ip packet, return an empty packet if there are none ready.
Reimplemented by: llarp::vpn::AndroidInterface::ReadNextPacket, llarp::vpn::AppleInterface::ReadNextPacket, llarp::vpn::LinuxInterface::ReadNextPacket
function WritePacket
virtual bool WritePacket(
net::IPPacket pkt
) =0
write a packet to the interface returns false if we dropped it
Reimplemented by: llarp::vpn::AndroidInterface::WritePacket, llarp::vpn::AppleInterface::WritePacket, llarp::vpn::LinuxInterface::WritePacket
function PollFD
virtual int PollFD() const =0
get pollable fd for reading
Reimplemented by: llarp::vpn::AndroidInterface::PollFD, llarp::vpn::AppleInterface::PollFD, llarp::vpn::LinuxInterface::PollFD
Public Attributes Documentation
variable on_stop
std::function< void()> on_stop;
Updated on 2026-01-10 at 22:49:45 +0000