Ethereal-dev: [Ethereal-dev] Ethereal/Tethereal can now use "pcap_findalldevs()" to get the in

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 17 Oct 2003 16:56:53 -0700
("Now" as of about a week ago, that is.)

On UNIX-flavored systems, the configure script will check whether
libpcap has "pcap_findalldevs()"; if so, it configures Ethereal and
Tethereal to use it to get the list of interfaces, rather than getting
the interfaces itself.  That means that

	1) the "any" device on Linux gets a description ("Pseudo-device
	   that captures on all interfaces");

	2) on Linux, devices without IP addresses might show up, which
	   they might not with the Ethereal/Tethereal SIOCGIFCONF-based
	   code;

	3) on Solaris, SunATM devices should show up, which, as I
	   remember, they don't with the Ethereal/Tethereal
	   SIOCGIFCONF-based code;

	4) other devices might show up when they wouldn't have shown up
	   before (and on some platforms there *might* be the risk of
	   devices *not* showing up, if the platform has "getifaddrs()"
	   and "getifaddrs()" doesn't return all the interfaces that
	   SIOCGIFCONF does, although I suspect that's unlikely).

If you build Ethereal on a system with "pcap_findalldevs()" in libpcap,
and it links with a dynamically-linked libpcap, the resulting binary
won't work on a system whose libpcap shared library lacks
"pcap_findalldevs()".  I don't know whether this will cause an issue
with any binary packages.

On Windows, "config.nmake" now has a WINPCAP_VERSION variable.  If set
to anything other than 3.0 or 3.1, it'll assume WinPcap 2.x, and compile
without support for "pcap_findalldevs()" (as that first appeared in 3.0,
so the 2.x developer's kits don't define the data structures supplied
by "pcap_findalldevs()").  If set to 3.0 or 3.1, it'll assume that
version of WinPcap, and will compile with support for
"pcap_findalldevs()"; however, as wpcap.dll is loaded at run time, it
checks at run time whether "pcap_findalldevs()" is present and, if it's
not, it falls back on the old scheme for getting the interface list.

This means that the binary packages should be built using WinPcap 3.0
and a 3.0 development kit (3.1 alpha should work, too, but I haven't
tested it).  The resulting binary will work with 2.3 or 3.x (at least it
did when I tried it).