On Thu, 18 Oct 2001, Patrik Stridvall wrote:
I'm looking forward for any hints.
Hmm. Reading MSDN...
There is a DLL called NETAPI32.DLL that is not currentlu implemented in Wine that has a function Netbios that possible calls the VNETBIOS VxD.
Perhaps implementing this DLL in Wine would help at least it would be better than trying the figure out what the VNETBIOS VxD does.
The function Netbios in NETAPI32.DLL is at least documented.
Hmm. Reading some more...
Netbios has a command NCBASTAT that retreives the adapter status in a structure called ADAPTER_STATUS that has a field:
UCHAR adapter_address[6]; // Specifies encoded address of the adapter.
This might be the MAC address.
Implementing this in Wine wouldn't be that hard. If Linux provides a way to get the MAC that is.
I assume Linux does but I don't know how. Does anybody else know?
Using an ioctl(). SIOCGIFHWADDR (Get InterFace HardWare ADDRess). If you look in the source for ifconfig, that should show you how it's done in more detail, but here's an overview:
First, run through calling access() on the /proc/net entries. Once you find one which succeeds, create a socket using that protocol (IPX in this case), and call ioctl(fd,SIOCGIFHWADDR,buffer*).
I'll do a simple implementation later today, if nobody already has one?
James.