MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / set_offload

Method set_offload

net_util/src/tap.rs:453–462  ·  view source on GitHub ↗

Set the offload flags for the tap interface.

(&self, flags: c_uint)

Source from the content-addressed store, hash-verified

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<()> {

Callers 3

test_set_optionsFunction · 0.80
processMethod · 0.80
activateMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_set_optionsFunction · 0.64