docs.rs failed to build utuntap-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
utuntap-0.3.1
Universal Tun/Tap for Rust
This library aims to provide robust, well-tested, unified APIs to open Tun/Tap devices on different OSes. It is runtime-agnostic so that you can create your cross-platform wrappers for Tokio, async-std and so on.
Usage
It simply provides options to open Tun/Tap device files. More options are listed in the documentation.
use tun;
let = new
.packet_info // Only available on Linux
.open
.expect;
Support Platforms
OS | CI Status | Comment |
---|---|---|
Linux | musl is also supported. |
|
OpenBSD | According to the manual, each packet read or written is prefixed with a tunnel header consisting of a 4-byte network byte order integer containing the address family. The values are listed here. | |
macOS | TUN-only | A 4-byte address family prefixed is required by read and write: [0u8, 0, 0, 2] for IPv4; [0u8, 0, 0, 10] for IPv6. |