Ethereal-dev: RE: [Ethereal-dev] Interface not listed

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Glenn Talbott" <gtalbott@xxxxxxxxxxxxxxx>
Date: Sun, 26 Dec 2004 00:43:15 -0600

> -----Original Message-----
> From: Guy Harris [mailto:gharris@xxxxxxxxx] 
> Sent: Saturday, December 25, 2004 9:38 PM
> To: gtalbott@xxxxxxxxxxxxxxx
> Cc: 'Ethereal development'
> Subject: Re: [Ethereal-dev] Interface not listed
>...
> 
> It appears that no attempt was made to open /proc/net/dev - 
> perhaps the 
> libpcap in RH 8 was configured not to check it (the autoconf script 
> should have checked for a readable "/proc/net/dev", 
> configuring libpcap 
> to use it if found, but perhaps it wasn't found when RH 8 was 
> built, or 
> perhaps the build process for RH 8 doesn't run the configure 
> script but 
> uses a pre-generated config.h file that doesn't define 
> HAVE_PROC_NET_DEV; in either case, I'd consider that a bug in RH 8).
> 
> 

Hmm... Yes, you are right that config.h (I assume you mean
/usr/src/linux-2.4.18-14/include/linux/config.h which
Simply says #include linux/autoconf.h) does not contain HAVE_PROC_NET_DEV.
However I'm not convinced that the failure to find eth1 is a bug in RH 8.
The question that comes to mind is if libpcap requires HAVE_PROC_NET_DEV to
find eth1, then how does it find eth0? ... Never mind, I found the answer
myself. From libpcap-0.7.2/inet.c:

       

#ifdef HAVE_PROC_NET_DEV
        if (ret != -1) {
                /*
                 * We haven't had any errors yet; now read "/proc/net/dev",
                 * and add to the list of interfaces all interfaces listed
                 * there that we don't already have, because, on Linux,
                 * SIOCGIFCONF reports only interfaces with IPv4 addresses,
                 * so you need to read "/proc/net/dev" to get the names of
                 * the rest of the interfaces.
                 */
                ret = scan_proc_net_dev(&devlist, fd, errbuf);
        }
#endif

And I have specifically _not_ bound IP to eth1.

So, do newer versions of libpcap know how to workaround the missing
HAVE_PROC_NET_DEV in RH 8, or do I need to upgrade my OS to fix this?
(although I'll probably live with manually typing in "eth1" rather than
upgrade what isn't that broken yet. Especially since ethereal nicely
remembers that I like "eth1" even though it doesn't find it automatically.)

Thanks for the help.

Have a Happy New Year

Glenn Talbott
gtalbott@xxxxxxxxxxxxxxx