Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Also return the interface name #11

Merged
merged 23 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add if_indextoname
  • Loading branch information
larseggert committed Sep 4, 2024
commit 1170b3bb00d7919abddb3a4f7cab51bd500f44aa
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ fn interface_and_mtu_windows(socket: &UdpSocket) -> Result<(String, usize), Erro
use std::{ffi::c_void, slice};

use win_bindings::{
FreeMibTable, GetIpInterfaceTable, GetUnicastIpAddressTable, AF_INET, AF_INET6, AF_UNSPEC,
MIB_IPINTERFACE_ROW, MIB_IPINTERFACE_TABLE, MIB_UNICASTIPADDRESS_ROW,
if_indextoname, FreeMibTable, GetIpInterfaceTable, GetUnicastIpAddressTable, AF_INET,
AF_INET6, AF_UNSPEC, MIB_IPINTERFACE_ROW, MIB_IPINTERFACE_TABLE, MIB_UNICASTIPADDRESS_ROW,
MIB_UNICASTIPADDRESS_TABLE, NO_ERROR,
};

Expand Down
1 change: 1 addition & 0 deletions tests/win_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fn codegen_windows_bindings() {
"Windows.Win32.NetworkManagement.IpHelper.MIB_IPINTERFACE_TABLE",
"Windows.Win32.NetworkManagement.IpHelper.MIB_UNICASTIPADDRESS_ROW",
"Windows.Win32.NetworkManagement.IpHelper.MIB_UNICASTIPADDRESS_TABLE",
"Windows.Win32.NetworkManagement.IpHelper.if_indextoname",
"Windows.Win32.Networking.WinSock.AF_INET",
"Windows.Win32.Networking.WinSock.AF_INET6",
"Windows.Win32.Networking.WinSock.AF_UNSPEC",
Expand Down
Loading