llarp::vpn::PacketRouter
Public Functions
| Name | |
|---|---|
| PacketRouter(PacketHandlerFunc_t baseHandler) baseHandler will be called if no other handlers matches a packet |
|
| void | HandleIPPacket(llarp::net::IPPacket pkt) feed in an ip packet for handling |
| void | AddIProtoHandler(uint8_t proto, PacketHandlerFunc_t func) add a non udp packet handler using ip protocol proto |
| void | AddUDPHandler(huint16_t localport, PacketHandlerFunc_t func) helper that adds a udp packet handler for UDP destinted for localport |
| void | RemoveUDPHandler(huint16_t localport) remove a udp handler that is already set up by bound port |
Public Functions Documentation
function PacketRouter
explicit PacketRouter(
PacketHandlerFunc_t baseHandler
)
baseHandler will be called if no other handlers matches a packet
function HandleIPPacket
void HandleIPPacket(
llarp::net::IPPacket pkt
)
feed in an ip packet for handling
function AddIProtoHandler
void AddIProtoHandler(
uint8_t proto,
PacketHandlerFunc_t func
)
add a non udp packet handler using ip protocol proto
function AddUDPHandler
void AddUDPHandler(
huint16_t localport,
PacketHandlerFunc_t func
)
helper that adds a udp packet handler for UDP destinted for localport
function RemoveUDPHandler
void RemoveUDPHandler(
huint16_t localport
)
remove a udp handler that is already set up by bound port
Updated on 2026-01-10 at 22:49:45 +0000