We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
OS: Ubuntu 20.04.3 LTS (Linux ubuntu 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
Linux ubuntu 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
It seems that on Linux, you can't use sendmsg and recvmsg on a tun fd.
sendmsg
recvmsg
rust-tun/src/platform/posix/fd.rs
Line 99 in aeca1a6
https://www.reddit.com/r/linuxquestions/comments/44gs03/operation_on_nonsocket_when_using_a_tun_interface/
The text was updated successfully, but these errors were encountered:
Minimal reproduction code:
use std::io::{IoSliceMut, Read}; fn main() { let mut config = tun::Configuration::default(); config .address((10, 0, 0, 1)) .netmask((255, 255, 255, 0)) .up(); #[cfg(target_os = "linux")] config.platform(|config| { config.packet_information(true); }); let mut dev = tun::create(&config).unwrap(); let mut buf = [0; 4096]; loop { let bufs = IoSliceMut::new(&mut buf); let amount = dev.read_vectored(&mut [bufs]).unwrap(); println!("{:?}", &buf[0..amount]); } }
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
OS: Ubuntu 20.04.3 LTS (
Linux ubuntu 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
)It seems that on Linux, you can't use
sendmsg
andrecvmsg
on a tun fd.rust-tun/src/platform/posix/fd.rs
Line 99 in aeca1a6
https://www.reddit.com/r/linuxquestions/comments/44gs03/operation_on_nonsocket_when_using_a_tun_interface/
The text was updated successfully, but these errors were encountered: