Re: HW address w/o connection in iphlpapi

2006-01-25 Thread Michael Ost
On Wed, 2006-01-25 at 11:13 -0800, Juan Lang wrote: > I'm not the decider here, really. Alexandre is. While I'd like to see my > recent patch get in because it removes a lot of unnecessary junk from > ifenum.c and improves the situation for most people, it's not the end of > the story. Wine's po

Re: HW address w/o connection in iphlpapi

2006-01-25 Thread Juan Lang
> The function does seem to be provided by libc. And so the diff must be > in the implementations of that. Is there any precedent in Wine of making > a runtime decision based on the c library? Probably, but see below.. > Would you be OK with a patch that uses if_indextoname() only in the > specia

Re: HW address w/o connection in iphlpapi

2006-01-25 Thread Michael Ost
On Wed, 2006-01-25 at 10:42 -0800, Juan Lang wrote: > > > Although I don't like the idea of predefined limits :) I'll probably > > > > Me neither, which is why I used that prominent macro > > MOST_INTERFACES_IMAGINABLE. Can you even imagine a system with 50 (or > > 100?) ethernet interfaces? How

Re: HW address w/o connection in iphlpapi

2006-01-25 Thread Juan Lang
> > Although I don't like the idea of predefined limits :) I'll probably > > Me neither, which is why I used that prominent macro > MOST_INTERFACES_IMAGINABLE. Can you even imagine a system with 50 (or > 100?) ethernet interfaces? How about an application that needs more than > 256K (showing my a

Re: HW address w/o connection in iphlpapi

2006-01-25 Thread Michael Ost
On Tue, 2006-01-24 at 21:44 -0800, Juan Lang wrote: > > Right. if_nameindex does not return eth0 if I boot up without an > > ethernet connection. Maybe this is a system dependent thing? > > I am running on a RH8 based system. > > Or a libc thing? I'm running on FC2. > > > The if_nameindex code l

Re: HW address w/o connection in iphlpapi

2006-01-24 Thread Juan Lang
> Right. if_nameindex does not return eth0 if I boot up without an > ethernet connection. Maybe this is a system dependent thing? > I am running on a RH8 based system. Or a libc thing? I'm running on FC2. > The if_nameindex code looked a little nicer, but a loop on > if_indextoname() is not so

Re: HW address w/o connection in iphlpapi

2006-01-24 Thread most
> Really? It works for me. You mean boot with no link, or what? I did > that, and if_nameindex still returned eth0. Right. if_nameindex does not return eth0 if I boot up without an ethernet connection. Maybe this is a system dependent thing? I am running on a RH8 based system. The if_nameindex

Re: HW address w/o connection in iphlpapi

2006-01-24 Thread Juan Lang
> Yikes! It turns out if_nameindex() doesn't return info for down devices, > but if_indextoname() does. It's all so touchy... So, attached is an > alternate patch using if_indextoname() that does work; my last one > doesn't. Really? It works for me. You mean boot with no link, or what? I did th

Re: HW address w/o connection in iphlpapi

2006-01-24 Thread most
>> Wait. This works better than getifaddrs. It successfully returns info >> for "down" devices on my RH8 based linux box, with my creaky old >> wine-20050419. > (snip) Yikes! It turns out if_nameindex() doesn't return info for down devices, but if_indextoname() does. It's all so touchy... So, atta

Re: HW address w/o connection in iphlpapi

2006-01-19 Thread Juan Lang
> Wait. This works better than getifaddrs. It successfully returns info > for "down" devices on my RH8 based linux box, with my creaky old > wine-20050419. (snip) > You made comments in the source about if_indextoname having issues. So > perhaps this patch won't be useful to you. But it works for u

Re: HW address w/o connection in iphlpapi

2006-01-18 Thread Michael Ost
> Hi Michael, > >> When you boot a linux box without an ethernet connection, and eth0 >> configuration fails, GetAdaptersInfo does not return MAC address info >> for eth0. >> The problem seems to be that enumerateInterfaces (in >> dlls/iphlpapi/ifenum.c) doesn't create a record for eth0, becau

Re: HW address w/o connection in iphlpapi

2006-01-17 Thread Juan Lang
> Dang. It doesn't work for down devices. > When I run strace on a program > that uses getifaddrs, the socket is opened with IPROTO_IP: > > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 14 > ioctl(14, 0x8912, 0x2084d3a8) = 0 That's SIOCGIFCONF. So it looks like getifaddrs isn't doing anyth

Re: HW address w/o connection in iphlpapi

2006-01-17 Thread most
Juan, >> When you boot a linux box without an ethernet connection, and eth0 >> configuration fails, GetAdaptersInfo does not return MAC address info >> for eth0. >> The problem seems to be that enumerateInterfaces (in >> dlls/iphlpapi/ifenum.c) doesn't create a record for eth0, because >> SIOCGIFC

Re: HW address w/o connection in iphlpapi

2006-01-16 Thread Juan Lang
Hi Michael, > When you boot a linux box without an ethernet connection, and eth0 > configuration fails, GetAdaptersInfo does not return MAC address info > for eth0. > The problem seems to be that enumerateInterfaces (in > dlls/iphlpapi/ifenum.c) doesn't create a record for eth0, because > SIOCGIFC

HW address w/o connection in iphlpapi

2006-01-16 Thread most
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 eth0. The problem seems to be that enumerateInterfaces (in dlls/iphlpapi/ifenum.