TUN interfaces

This crate allows the creation and usage of TUN interfaces, the aim is to make this cross-platform but right now it only supports Linux.
Usage
First, add the following to your Cargo.toml:
[]
= "0.3"
Next, add this to your crate root:
extern crate tun;
If you want to use the TUN interface with mio/tokio, you need to enable the mio feature:
[]
= { = "0.3", = ["mio"] }
Example
The following example creates and configures a TUN interface and starts reading packets from it.
use Read;
extern crate tun;
Platforms
Not every platform is supported.
Linux
You will need the tun module to be loaded and root is required to create
interfaces.
macOS
It just werks, but you have to set up routing manually.