summaryrefslogtreecommitdiff
path: root/fad-gifc.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't exclude interfaces that aren't up.Guy Harris2014-01-101-4/+1
| | | | | | | | | | | On some platforms, you can capture on those interfaces, which might be useful if you want to start a capture before the interface is up, so that the capture starts capturing as soon as it's up. Those interfaces will not appear in the interface list on platforms where you can't open them for capturing, and they'll now be sorted after the interfaces that *are* up, so there's not much harm in including them.
* remove libpcap's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | This change removes CVS keywords that express that the file belongs to libpcap repository. All such keywords represented the revision and timestamp by the end of 2008 or even older.
* Have non-interface modules take responsibility for identifying their devices.Guy Harris2012-06-111-11/+3
| | | | | | | | | | | | | | Have a table of routines to do pcap_create() for devices that aren't regular network interfaces. Try each of those in succession until one says "it's mine" (whether it succeeds or fails); if none do, do a pcap_create() for a regular interface. Have those routines do more stringent tests of the name - don't just accept any name that has a particular substring anywhere in it. That reduces the likelihood of a false match (as happened with the CANbus module when somebody renamed their Ethernet interface "canopy"). Have the table also include routines for pcap_findalldevs().
* Scan /proc/net/dev on Linux regardless of how we get the interface list.Guy Harris2010-01-091-144/+0
| | | | | It's a Linuxism, so it's not necessary on other platforms, and is useful even if we have getifaddrs().
* We shouldn't need to include <sys/file.h>, and, as I remember, it causedguy2008-08-061-2/+1
| | | | problems on some platform.
* Checking whether the amount of data returned by SIOCGIFCONF is less thanguy2005-06-291-5/+28
| | | | | | | | | | | | | | | | | 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).
* Rename HAVE_HPUX10_20 to HAVE_HPUX10_20_OR_LATER, because it's alsoguy2005-04-081-3/+3
| | | | defined for 11.x.
* From Don Ebright: handle logical interfaces on HP-UX 10.20 and 11.x.guy2005-04-081-3/+3
|
* Don't ignore Solaris logical interface entries, as they could giveguy2005-01-291-24/+30
| | | | | | additional IP addresses for the underlying interface; instead, strip off the logical interface number, and add them so that the additional addresses are added.
* Add checks for interfaces that begin with "dummy" or that end with ":"guy2005-01-281-1/+34
| | | | | | | | | | | | | 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?).
* From Shaun Clowes: work around brokenness in the 32-bit compatibilityguy2004-02-271-1/+15
| | | | layer for Linux on IA-64.
* Add _U_ to "rcsid[]" definitions, to eliminate "unused variable"guy2003-11-151-2/+2
| | | | warnings from newer versions of GCC.
* Alas, there are some versions of GNU libc that don't have "SA_LEN()"; atguy2003-02-251-3/+5
| | | | | least for those that also have "getifaddrs()", we have to get the size by looking at the address family.
* Put in a note about IPv6 addresses on platforms that have onlyguy2002-08-031-1/+11
| | | | SIOCGIFLIST to get interface lists.
* Leave it up to the platform-dependent "get interface list" code toguy2002-07-301-37/+56
| | | | | figure out how big the addresses are, as the way that's done is, well, platform-dependent....
* Put the different implementations of "pcap_findalldevs()" into separateguy2002-07-271-0/+471
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.