-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a device from a RawFd
#17
Comments
cbranch
added a commit
to cbranch/tokio-tun
that referenced
this issue
Nov 23, 2022
This change supports applications that want to receive or pass a tun device's file descriptor to another (possibly less privileged) application and have it usable by tokio-tun on the other side. The alternative is to open a multiqueue tun device and temporarily open additional queues, which has a disruptive impact on existing flows received on the tun device. This change resolves yaa110#17.
cbranch
added a commit
to cbranch/tokio-tun
that referenced
this issue
Nov 23, 2022
This change supports applications that want to receive or pass a tun device's file descriptor to another (possibly less privileged) application and have it usable by tokio-tun on the other side. The alternative is to open a multiqueue tun device and temporarily open additional queues, which has a disruptive impact on existing flows received on the tun device. This change resolves yaa110#17.
gabivlj
pushed a commit
to gabivlj/tokio-tun
that referenced
this issue
Jul 31, 2024
This change supports applications that want to receive or pass a tun device's file descriptor to another (possibly less privileged) application and have it usable by tokio-tun on the other side. The alternative is to open a multiqueue tun device and temporarily open additional queues, which has a disruptive impact on existing flows received on the tun device. This change resolves yaa110#17.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tun
implementsAsRawFd
but it would be useful to supportFromRawFd
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
.The text was updated successfully, but these errors were encountered: