EDN Admin
Well-known member
Hi,
The Iphlpapi.dll GetBestInterface function is described as "The GetBestInterface function retrieves the index of the interface that has the best route to the specified IPv4 address".
I have two physical network cards, one on network 135.x.x.x and the other on network 192.x.x.x. I can ping hosts on both networks. When calling GetBestInterface() with a reachable 135.x.x.x host the 135.x.x.x NIC is identified as the best interface
expected. However, when calling GetBestInterface() with the reachable 192.x.x.x host, the 135.x.x.x NIC is identified. From the description of the GetBestInterface() function I was expecting the 192.x.x.x NIC to be identified as the best interface since the
192.x.x.x hosts are only reachable via this NIC.
Can you clarify the behaviour of the GetBestInterface function?
thank you,
Paul
View the full article
The Iphlpapi.dll GetBestInterface function is described as "The GetBestInterface function retrieves the index of the interface that has the best route to the specified IPv4 address".
I have two physical network cards, one on network 135.x.x.x and the other on network 192.x.x.x. I can ping hosts on both networks. When calling GetBestInterface() with a reachable 135.x.x.x host the 135.x.x.x NIC is identified as the best interface
expected. However, when calling GetBestInterface() with the reachable 192.x.x.x host, the 135.x.x.x NIC is identified. From the description of the GetBestInterface() function I was expecting the 192.x.x.x NIC to be identified as the best interface since the
192.x.x.x hosts are only reachable via this NIC.
Can you clarify the behaviour of the GetBestInterface function?
thank you,
Paul
View the full article