MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / add_net_unixstream

Method add_net_unixstream

crates/openshell-driver-vm/src/runtime.rs:1133–1153  ·  view source on GitHub ↗

Used on Linux when gvproxy runs in qemu/unixstream mode.

(
        &self,
        socket_path: &Path,
        mac: &[u8; 6],
        features: u32,
    )

Source from the content-addressed store, hash-verified

1131
1132 #[allow(dead_code)] // Used on Linux when gvproxy runs in qemu/unixstream mode.
1133 fn add_net_unixstream(
1134 &self,
1135 socket_path: &Path,
1136 mac: &[u8; 6],
1137 features: u32,
1138 ) -> Result<(), String> {
1139 let sock_c = path_to_cstring(socket_path)?;
1140 check(
1141 unsafe {
1142 (self.krun.krun_add_net_unixstream)(
1143 self.ctx_id,
1144 sock_c.as_ptr(),
1145 -1,
1146 mac.as_ptr(),
1147 features,
1148 0,
1149 )
1150 },
1151 "krun_add_net_unixstream",
1152 )
1153 }
1154
1155 fn set_console_output(&self, path: &Path) -> Result<(), String> {
1156 let console_c = path_to_cstring(path)?;

Callers 1

run_libkrun_vmFunction · 0.80

Calls 2

path_to_cstringFunction · 0.85
checkFunction · 0.85

Tested by

no test coverage detected