lwip - A Rust wrapper for lwIP
A netstack for the special purpose of turning packets from/to a TUN interface into TCP streams and UDP packets.
It uses lwIP as the backend netstack.
use ;
let = new.unwrap;
let = stack.split;
// tun device is assumed implementing `Stream` and `Sink`
let = tun.split;
// Reads packet from stack and sends to TUN.
spawn;
// Reads packet from TUN and sends to stack.
spawn;
// Extracts TCP connections from stack and sends them to the dispatcher.
spawn;
// Receive and send UDP packets between netstack and NAT manager. The NAT
// manager would maintain UDP sessions and send them to the dispatcher.
spawn;