This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SIOCGIFCONF but not SIOCGIFHWADDR


> If only I knew how to retrieve that information from Windows.
> I did look at the Cygwin source for SIOCGIFCONF, which searches
> the registry for the IP adress + mask.  But in the registry
> I was unable to find the MAC address.  So how to retrieve
> that information from Windows using whatever Windows API calls?

     A quick search turns up

        Q118623 - HOWTO: Get the MAC Address for an Ethernet Adapter
        http://support.microsoft.com/support/kb/articles/Q118/6/23.asp

The answer is a little unsatisfying in a number of respects (assumes 
NetBIOS is bound on that card, it may return randomly generated 
addressed for some non-Ethernet interfaces, etc.) but is better than 
nothing.


----c--o--n--f--o--r--m--i--t--y-----k--i--l--l--s-----g--r--a--s--s----
"oncology recapitulates philately" --Mark Maxson    Robert M. Praetorius
"balance, not symmetry" --Mark Stanley         home: rmp@MA.UltraNet.Com
(attribution by Stigler)                  work: RPraetorius@AspenRes.Com

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]