dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

12 Commits

Author SHA1 Message Date
guy f34a88b3c4 We shouldn't need to include <sys/file.h>, and, as I remember, it caused
problems on some platform.
2008-08-06 07:34:09 +00:00
guy 819e96c769 Checking whether the amount of data returned by SIOCGIFCONF is less than
the size of the buffer we handed to it is insufficient to determine
whether we have the entire list of interfaces or not - if the amount of
space left in the buffer after adding an entry is non-zero but less
than the amount of space required by the next entry, the ioctl will stop
before adding the next entry, and not necessarily return an error.

The only way to ensure that we got all the data is to pass a buffer
large enough that the amount of space in the buffer *not* filled in
is greater than the largest possible entry.

We assume that's "sizeof(ifreq.ifr_name)" plus 255, under the assumption
that no address is more than 255 bytes (on systems where the "sa_len"
field in a "struct sockaddr" is 1 byte, e.g. newer BSDs, that's the
case, and addresses are unlikely to be bigger than that in any case).
2005-06-29 06:41:39 +00:00
guy 1b34dd0bbd Rename HAVE_HPUX10_20 to HAVE_HPUX10_20_OR_LATER, because it's also
defined for 11.x.
2005-04-08 02:15:49 +00:00
guy e8afe55f90 From Don Ebright: handle logical interfaces on HP-UX 10.20 and 11.x. 2005-04-08 02:04:41 +00:00
guy 547b1dec36 Don't ignore Solaris logical interface entries, as they could give
additional IP addresses for the underlying interface; instead, strip off
the logical interface number, and add them so that the additional
addresses are added.
2005-01-29 10:34:04 +00:00
guy 738db2cb08 Add checks for interfaces that begin with "dummy" or that end with ":"
followed by a number; Ethereal has those checks in the code it uses when
not using "pcap_findalldevs()" - I'm not sure what the "dummy" is
checking for (Linux dummy interfaces?), but the ":" followed by a number
are Solaris virtual interfaces (I think that's how it implements
multiple IP addresses per "real" interface, with each additional address
getting a virtual interface; I'm not sure you can open a virtual
interface for capturing, and even if you can you won't, as far as I
know, see any packets other than the one you get for the "real"
interface - should we just ignore the ":{number}" and "add" that
interface so that we add its IP address?).
2005-01-28 20:33:51 +00:00
guy f61f1bb9a6 From Shaun Clowes: work around brokenness in the 32-bit compatibility
layer for Linux on IA-64.
2004-02-27 08:03:05 +00:00
guy 30e89f192a Add _U_ to "rcsid[]" definitions, to eliminate "unused variable"
warnings from newer versions of GCC.
2003-11-15 23:23:57 +00:00
guy 164af2f0bf Alas, there are some versions of GNU libc that don't have "SA_LEN()"; at
least for those that also have "getifaddrs()", we have to get the size
by looking at the address family.
2003-02-25 07:50:28 +00:00
guy 7c27bf6304 Put in a note about IPv6 addresses on platforms that have only
SIOCGIFLIST to get interface lists.
2002-08-03 20:24:33 +00:00
guy 3d856fe865 Leave it up to the platform-dependent "get interface list" code to
figure out how big the addresses are, as the way that's done is, well,
platform-dependent....
2002-07-30 08:12:13 +00:00
guy 2dcac1bb6b Put the different implementations of "pcap_findalldevs()" into separate
source files, rather than having a pile of #ifdefs in "inet.c".  Add
code to the configure script to determine which implementation to use on
the platform for which libpcap is being built.

Add a "pcap_findalldevs()" implementation for Solaris 8 and later that
handles IPv6 addresses.
2002-07-27 18:45:34 +00:00