linux-kernelrusttun

How to call "ioctl" in Rust? And interface the Linux "tun" driver


How can I the function "ioctl" in Rust? Should I find a wrapper for it somewhere? Is there a de-facto wrapper? Or maybe it's already included in the standard Rust library? I've not found it, though.

Or, more generally, I need an interface the Linux "tun" driver.


Solution

  • You can find ioctl in nix, which contains convenience wrapper of *nix functionalities.