Skip to content
/ tuntap Public

Rust's wrapper for creation of TUN/TAP devices

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

vorner/tuntap

Repository files navigation

TunTap

Travis Build Status

TUN/TAP wrapper for Rust.

The TUN/TAP allows implementing a virtual network adapter in userspace. This provides the bindings for Rust.

Create an Iface object and send or recv packets. Making some sense of the packets is, however, out of scope, you need something else for that.

There's documentation and some examples.

Known issues

  • Tested only on Linux. Probably doesn't work anywhere else, but pull requests adding support for other OSes are welcome.
  • The asynchronous interface is very minimal and probably inefficient. It'll need to be extended to allow more flexible or efficient use.

Testing

In order to run the tests correctly, a tun10 device with 10.10.10.1/24 needs to be created first. You can simply run:

sh tests/setup.sh

To remove it:

sh tests/clean.sh

Sudo permission is required.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Rust's wrapper for creation of TUN/TAP devices

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published