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 looked a little nicer, but a loop on if_indextoname() is not so bad.
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 age with that one... %)?
submit a patch based on if_nameindex in the meantime, hopefully tomorrow
Well... that's not too thrilling since it doesn't actually fix the problem I found.
Maybe we need to drill down into which systems if_nameindex works and doesn't work with and have alternate versions of enumerateInterfaces based on that. I have a FC4 system and I'll see how it behaves and let you know. ... mo