| author | |
| committer | |
| log | a3ddca36571993af4a575296292e17471890fc87 |
| tree | 01630bc18bc9490cc722363108dfb5fb8caff9c6 |
| parent | 2f260256903a5130e879ab7dc020fa160befc4d9 |
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.2 files changed, 1 insertions(+), 7 deletions(-)
lib/std/Io/Threaded.zig+1-3| ... | ... | @@ -4000,9 +4000,7 @@ fn netInterfaceNameResolve( |
| 4000 | 4000 | |
| 4001 | 4001 | if (native_os == .windows) { |
| 4002 | 4002 | try t.checkCancel(); |
| 4003 | const index = ws2_32.if_nametoindex(&name.bytes); | |
| 4004 | if (index == 0) return error.InterfaceNotFound; | |
| 4005 | return .{ .index = index }; | |
| 4003 | @panic("TODO"); | |
| 4006 | 4004 | } |
| 4007 | 4005 | |
| 4008 | 4006 | if (builtin.link_libc) { |
lib/std/os/windows/ws2_32.zig-4| ... | ... | @@ -2161,7 +2161,3 @@ pub extern "ws2_32" fn getnameinfo( |
| 2161 | 2161 | ServiceBufferName: u32, |
| 2162 | 2162 | Flags: i32, |
| 2163 | 2163 | ) callconv(.winapi) i32; |
| 2164 | ||
| 2165 | pub extern "iphlpapi" fn if_nametoindex( | |
| 2166 | InterfaceName: [*:0]const u8, | |
| 2167 | ) callconv(.winapi) u32; |