[DllImport("Iphlpapi.dll", SetLastError = true)] public static extern uint GetAdapterIndex( string AdapterName, out uint IfIndex );
Microsoft documentation: Link
Last updated 1 year ago