#[no_mangle]
pub unsafe extern "C" fn crosvm_client_net_tap_attach(
    socket_path: *const c_char,
    tap_name: *const c_char,
    out_bus_num: *mut u8
) -> bool
Expand description

Attaches a net tap device to the crosvm instance with control socket at socket_path.

§Arguments

  • socket_path - Path to the crosvm control socket
  • tap_name - Name of the tap device
  • out_bus_num - guest bus number will be written here

The function returns true on success, false on failure.

§Safety

Function is unsafe due to raw pointer usage - socket_path and tap_name are assumed to point to a null-terminated CStr. Function checks that the pointers are not null, but caller need to check the validity of the pointer. out_bus_num is assumed to point to a u8 integer.