Smoltcp: A small TCP/IP stack in Rust

Smoltcp: A small TCP/IP stack in Rust

On *nix OSes, transmiting and receiving raw frames normally requires superuser privileges, but on Linux it is possible to create a persistent tap interface that can be manipulated by a specific user:

It’s possible to let smoltcp access Internet by enabling routing for the tap interface:

In order to demonstrate the response of smoltcp to adverse network conditions, all examples implement fault injection, available through command-line options:

A good starting value for and is 15%. Read its source code, then run it as:

The host is assigned the hardware address , IPv4 address , and IPv6 address . Read its source code, then run it without :

… or with (in this case the features don’t have to be explicitly listed):

It opens a server and a client TCP socket, and transfers a chunk of data.

Source: github.com