Commit a3ddca3657

Andrew Kelley <andrew@ziglang.org>
2025-10-22 13:20:52
std.Io.Threaded: delete Windows implementation of if_nametoindex
Microsoft documentation says "The if_nametoindex function is implemented for portability of applications with Unix environments, but the ConvertInterface functions are preferred." This was also the only dependency on iphlpapi.
1 parent 2f26025
Changed files (2)
lib
std
lib/std/Io/Threaded.zig
@@ -4000,9 +4000,7 @@ fn netInterfaceNameResolve(
 
     if (native_os == .windows) {
         try t.checkCancel();
-        const index = ws2_32.if_nametoindex(&name.bytes);
-        if (index == 0) return error.InterfaceNotFound;
-        return .{ .index = index };
+        @panic("TODO");
     }
 
     if (builtin.link_libc) {
lib/std/os/windows/ws2_32.zig
@@ -2161,7 +2161,3 @@ pub extern "ws2_32" fn getnameinfo(
     ServiceBufferName: u32,
     Flags: i32,
 ) callconv(.winapi) i32;
-
-pub extern "iphlpapi" fn if_nametoindex(
-    InterfaceName: [*:0]const u8,
-) callconv(.winapi) u32;