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

Method add_net_unixgram

crates/openshell-driver-vm/src/runtime.rs:1109–1130  ·  view source on GitHub ↗
(
        &self,
        socket_path: &Path,
        mac: &[u8; 6],
        features: u32,
        flags: u32,
    )

Source from the content-addressed store, hash-verified

1107
1108 #[cfg(target_os = "macos")]
1109 fn add_net_unixgram(
1110 &self,
1111 socket_path: &Path,
1112 mac: &[u8; 6],
1113 features: u32,
1114 flags: u32,
1115 ) -> Result<(), String> {
1116 let sock_c = path_to_cstring(socket_path)?;
1117 check(
1118 unsafe {
1119 (self.krun.krun_add_net_unixgram)(
1120 self.ctx_id,
1121 sock_c.as_ptr(),
1122 -1,
1123 mac.as_ptr(),
1124 features,
1125 flags,
1126 )
1127 },
1128 "krun_add_net_unixgram",
1129 )
1130 }
1131
1132 #[allow(dead_code)] // Used on Linux when gvproxy runs in qemu/unixstream mode.
1133 fn add_net_unixstream(

Callers 1

run_libkrun_vmFunction · 0.80

Calls 2

path_to_cstringFunction · 0.85
checkFunction · 0.85

Tested by

no test coverage detected