HW address w/o connection in iphlpapi

most at museresearch.com most at museresearch.com
Tue Jan 17 00:29:44 CST 2006

We ran into an obscure problem with iphlpapi that I'd like to get help
with. When you boot a linux box without an ethernet connection, and eth0
configuration fails, GetAdaptersInfo does not return MAC address info for

The problem seems to be that enumerateInterfaces (in
dlls/iphlpapi/ifenum.c) doesn't create a record for eth0, because
SIOCGIFCONF doesn't return one. Then when GetAdaptersInfo (in
dlls/iphlpapi/iphlpapi_main.c) is looping through the interfaces, eth0
isn't there so it doesn't call getInterfacePhysicalByIndex to get the MAC

I verified that if I hack an eth0 entry into the table built by
enumerateInterfaces, the call to getInterfacePhysicalByIndex works just
fine. So the problem is simply a disconnect between what
enumerateInterfaces is scanning and what GetAdaptersInfo is trying to

Near as I can tell (and I am no networking guru by any stretch)
GetAdaptersInfo is supposed to return MAC info for eth0, even if eth0 has
no IP address. Near as I can tell too Windows does return MAC info in this
situation. So this looks, again near as I can tell %), like a Wine bug.

Is it a wine bug? Any suggestions for a fix? ... mo

PS: I cc'd Juan Lang who is noted as the author of the code. I hope that
isn't bad etiquette...?

More information about the wine-devel mailing list