tokio-tun
tokio-tun copied to clipboard
Create a device from a `RawFd`
Tun implements AsRawFd but it would be useful to support FromRawFd or moral equivalent.
The use case is if you inherit a fd for a tun device or receive it from another process, but want to use it in an async context with tokio-tun instead of treating it as a standard file.
Obviously in this case you do not have a handle to the tun interface description and can't get MTU/address etc. which prevents a trivial implementation of FromRawFd.