Set the offload flags for the tap interface.
(&self, flags: c_uint)
| 451 | |
| 452 | /// Set the offload flags for the tap interface. |
| 453 | pub fn set_offload(&self, flags: c_uint) -> Result<()> { |
| 454 | // SAFETY: ioctl is safe. Called with a valid tap fd, and we check the return. |
| 455 | unsafe { |
| 456 | Self::ioctl_with_val( |
| 457 | &self.tap_file, |
| 458 | libc::TUNSETOFFLOAD as c_ulong, |
| 459 | flags as c_ulong, |
| 460 | ) |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | /// Enable the tap interface. |
| 465 | pub fn enable(&self) -> Result<()> { |
no outgoing calls