dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

151 Commits

Author SHA1 Message Date
guy 3c27416c4d Use AC_LBL_LIBRARY_NET before checking for ether_hostton(), as, at least
on Solaris, it's a "gethostbyname() -ish function", and we'll find it
only when we're linking with whatever libraries are required for finding
those functions.

Get the AC_LBL_LIBRARY_NET macro from tcpdump; that macro works with
autoconf 2.5x, but the one here didn't.
2005-03-26 23:57:42 +00:00
guy d3bc29242e If we have ether_hostton(), check whether we have <netinet/if_ether.h>
and if including it declares ether_hostton(), and define
HAVE_DECL_ETHER_HOSTTON appropriately, and use that to determine whether
to define it ourselves, rather than having a set of OSes that don't need
it, as that set can change over time.

Make the default declaration of "ether_hostton()" declare its first
argument as "const char *", as that's what it's *supposed* to be
(although it's not declared as such in some OSes, so we still have to
cast a "const char *" when passed as the first argument).
2005-03-26 23:07:50 +00:00
guy 529f98f94f Use "version.h" if autoconf is being used (as that assumes a
UN*Xy-enough platform that the Makefile.in rules to generate "version.h"
work), and use the stuff from "version.h" iff HAVE_VERSION_H is defined,
so we can use it even with WinPcap.
2004-12-17 23:25:36 +00:00
guy 63f52c6dce If we don't have any support for packet capturing, don't bother
supplying a non-stub version of "pcap_findalldevs()", as a list of
devices won't do any good for a capture program.

Don't bother checking for "ifaddrs.h" unless we have "getifaddrs()" -
and if we have "getifaddrs()" but don't have a usable "ifaddrs.h",
report an error, rather than leaving the error for the compile stage.
2004-12-16 22:22:20 +00:00
guy cd5084b6f0 Regenerate. 2004-11-10 09:21:46 +00:00
fenner 3058de1dde Regenerate. 2004-03-28 20:31:56 +00:00
guy 7d3d1094ec AC_LIBOBJ takes the name of an object file without the extension (as the
extension is platform-dependent).
2004-02-09 06:28:19 +00:00
guy 5d2a9d1922 Regenerate with autoconf 2.57. 2004-01-14 03:01:25 +00:00
guy fcadc89577 From Albert Chin <china@thewrittenword.com>: on platforms that lack
"snprintf()", include one in libpcap with the name "pcap_snprintf()", so
applications don't have to supply their own "snprintf()" on those
platforms in order to use libpcap.
2003-12-15 01:35:03 +00:00
guy 026542c235 From Jesper Peterson: updates to handle future DAG API releases. 2003-12-10 09:30:57 +00:00
guy 0b36742e72 From Brian Ginsbach: add the Cray NV1 CPU to the list of CPUs that don't
support unaligned accesses.
2003-11-16 10:12:47 +00:00
guy f387010dab Based on whether we have "__attribute__", define _U_ either as
"__attribute__((unused))" or as "".
2003-11-15 22:51:51 +00:00
guy 3b68061cf7 If "--with-dag" isn't specified, assume they want it if it's present and
not otherwise; in particular, don't quit with an error if we're on a
platform that doesn't support the DAG software.
2003-10-14 08:48:34 +00:00
guy 77cade932c From Jesper Peterson <jesper@endace.com>: support for capturing from
Endace DAG devices.
2003-07-23 05:29:19 +00:00
guy 2edba7705d From Paul Mundt <lethal@linux-sh.org>: add SuperH to the list of CPUs
where we wire in the idea that it can't handle unaligned accesses.  (I
don't know why the test program doesn't work - but perhaps the test
program is the wrong answer anyway, as it doesn't work when
cross-compiling.)
2003-03-28 08:28:26 +00:00
guy 725f1b9d27 Before testing for DLPI, test for "/usr/include/odmi.h", so that, on
AIX, we choose BPF, not DLPI, by default; we won't necessarily choose
BPF if no libpcap-based program has been run since booting, as libpcap
(both IBM's and, now, ours) create BPF devices and load the driver if
that hasn't already been done since booting).
2003-02-11 06:21:00 +00:00
guy 073fc17a9d Red Hat Linux 7.2 appears to have a <net/raw.h> file, which causes the
configure script to think it's IRIX, so test for
"/usr/include/linux/socket.h" before testing for
"/usr/include/net/raw.h" (which is done before testing for
"/usr/include/sys/dlpi.h"; hopefully no future IRIX release, or future
release of Solaris/HP-UX/AIX/other OS that supports DLPI, will add
"/usr/include/linux/socket.h" as a "helpful" header file for Linux
compatibility).
2002-09-04 20:31:33 +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
guy 0fa1dfb0b3 Make static the structure to which the test program checking what to use
for "inlines", so that we don't get tripped up by compilers complaining
that we're returning a pointer to an automatic variable.
2002-07-13 09:34:59 +00:00
guy e61a5c069b Fix up AC_LBL_C_INLINE to put all of the test code into the "inlines"
section - the other section gets stuck in the middle of "main()", and,
although GCC lets you define functions inside functions, other C
compilers don't.

Pick a name more likely to be unique to use as the iterator variable in
AC_LBL_C_INLINE.

Make AC_LBL_C_INLINE print "no" rather than "not supported" if inline
isn't supported, to match what AC_C_INLINE does.
2002-07-02 02:10:50 +00:00
guy 69d070984f Put variables in quotes when testing them in "test" commands, so that
the test doesn't get a syntax error if the variable isn't set or is set
to a null string.
2002-06-29 04:21:09 +00:00
guy f6bcb3d546 Some versions of the HP C compiler can handle inlines, but not if they
return a structure pointer.  Check whether the C compiler can handle
inline functions that return a structure pointer, not whether they can
handle inline functions that return an int, as at least some versions of
autoconf's AC_C_INLINE do.
2002-06-28 10:34:35 +00:00
guy e2537440b7 Replace "target_cpu" and "target_os" with "host_cpu" and "host_os", as
per Maciej W. Rozycki's patch.
2001-12-10 08:33:41 +00:00
guy 4e83ece64c From Maciej W. Rozycki <macro@ds2.pg.gda.pl>: treat all MIPS and SPARC
platforms as always requiring strict alignment, rather than doing
configure-time testing with a sample program.
2001-11-25 02:22:06 +00:00
fenner e935ae5425 Regenerate. 2001-11-12 22:19:15 +00:00
guy 519b0b5a59 If we have "/proc/net/dev", and don't have <ifaddrs.h> (i.e., don't have
"getifaddrs()"), after processing the list returned by SIOCGIFCONF, scan
"/proc/net/dev" for interface names, and add to the list of interfaces
entries for those interfaces, with no associated addresses (if the
interfaces were already added, with addresses, from the list returned by
SIOCGIFCONF, they won't get added again).

Clean up the error handling a bit.
2001-10-09 05:43:19 +00:00
guy 5a85948f80 We don't actually use HAVE_FREEIFADDRS, so there's no point in checking
whether we have "freeifaddrs()" (we don't check whether we have
"getifaddrs()", and if we have "getifaddrs()" but not "freeifaddrs()",
we're stuck with leaking memory).

Give the "any" device an instance number of INT_MAX, so it shows up
after all other non-loopback devices.

"getifaddrs()" sometimes appears to supply a destination address even
for non-point-to-point interfaces (it did so on a FreeBSD 4.1 system);
don't use the broadcast address it supplies if an interface isn't a
broadcast interface, and don't use the destination address it supplies
if an interface isn't a point-to-point interface.

If we had an error constructing the list of interfaces, don't attempt to
add the "any" device to the list.
2001-10-09 03:53:38 +00:00
guy 79aeeee5ae Check in the updated configure script, from the following change to
aclocal.m4:

	revision 1.73
	date: 2001/09/14 08:08:15;  author: torsten;  state: Exp;  lines: +2 -2
	The Itanium does not like unaligned memory accesses (the Linux kernel
	warns about them and probably performance suffers). Therefore I added
	the cpu to the list of systems where unaligned access should be avoided.
	See also http://bugs.debian.org/112152
2001-10-08 10:19:55 +00:00
guy 380a3dbf49 From Scott Barron <sb125499@ohiou.edu>: use the
SOL_PACKET/PACKET_STATISTICS "getsockopt()" call, on Linux kernels that
support it, to get packet statistics, so that we can report the number
of dropped packets, and always use <linux/if_packet.h> to get
definitions for PF_PACKET sockets, so that we don't depend on glibc's
header files having been updated to support all the latest shiniest
kernel features (many systems with 2.4[.x] kernels don't have a
<netpacket/packet.h> that defines "struct tpacket_stats", for example,
so we wouldn't have been able to support that kernel feature on those
systems).
2001-07-29 18:25:46 +00:00
guy 8a6db7a7d5 Sigh. Not all systems have <netinet/if_ether.h> - for example, at least
some libc5 Linux systems don't - so we have to check whether it exists,
and include it only if it does.
2001-01-17 18:18:48 +00:00
guy d6752d37e8 Regenerate "config.h.in" and "configure". 2000-12-22 11:42:18 +00:00
guy be7f1ec5ad We should no longer need to use our own versions of system header files
when compiling on Linux, as we extracted from those copies the
definitions and declarations we need in order to dissect packets, and
put them into our own header files in the regular source directory.
2000-10-21 04:50:43 +00:00
guy d1713b06bb The current "config.guess" may give different Alpha processors different
names, e.g. "alphaev56", rather than just "alpha", so, in
"AC_LBL_UNALIGNED_ACCESS", we should check for "alpha*", rather than
"alpha", in our test for platforms we *know* shouldn't do unaligned
accesses (Digital^H^H^H^H^H^H^HTru64 UNIX, by default, may just catch
the alignment trap, complain on the console, and then simulate the
unaligned access, but that's slow - and, in one test, didn't appear to
prevent all the faults from unaligned accesses).
2000-09-19 03:56:26 +00:00
fenner 9700d14e7b Regenerate. 2000-08-16 20:30:46 +00:00
assar 407e3aaf67 regenerated from configure.in 2000-07-30 10:50:22 +00:00
guy ab1c0634f4 libpcap doesn't use <sys/ioccom.h>, but the test program in
"AC_LBL_FIXINCLUDES" does, so we have to check for it, otherwise the
configure script fails on, among other platforms, Solaris.
2000-07-14 02:12:36 +00:00
assar d501922cfa regen 2000-07-11 00:38:47 +00:00
assar 26b4c53bde re-generated 2000-07-06 01:51:37 +00:00
assar ca4ad890a3 re-generated 2000-07-01 03:35:52 +00:00
assar bf88705991 re-generated 2000-06-10 14:20:42 +00:00
itojun 9a002c2dc7 regen 2000-05-04 13:34:48 +00:00
itojun 20d9e08cde do not use sprintf(). always use snprintf().
from NetBSD/OpenBSD src/lib/libpcap.

use freeifaddrs() if exists.
2000-04-27 09:11:11 +00:00
assar 48475b805d regenerated 2000-04-09 19:18:06 +00:00
assar 570f8b57cd regen 2000-04-01 12:26:44 +00:00
itojun 03cc04a438 use getifaddrs whenever available.
SIOCGIFCONF is very complex API, so it would be good to avoid it whenever
possible.
2000-02-23 11:39:44 +00:00
assar ad3aa3abc6 regen 2000-01-08 06:39:17 +00:00
itojun 5b7ead9173 add configure option --disable-protochain, to make Arne happier. 1999-11-01 15:56:40 +00:00
itojun 78ba595629 fix bpf_filter.c lookup path for build outside of source code tree.
http://www.sics.se/~assar/tcpdump_patches/4
From: Assar Westerlund <assar@sics.se>
1999-10-30 05:33:45 +00:00
itojun 7fe3c1111a IPv6 packet filtering code.
./configure --enable-ipv6 (requires getaddrinfo(3) and getnameinfo(3)).

TODO: make it work even without getaddrinfo(3) or getnameinfo(3)
(or, tcpdump/configure.in should provide alternative version by
AC_REPLACE_FUNCS)
TODO: make IPv6 filtering code work by default
TODO: make "protochain" friendly with optimization
1999-10-19 15:18:28 +00:00
mcr e01084ceef patches from Assar Westerlund <assar@sics.se> 1999-10-10 01:47:05 +00:00
mcr b11ddf8a9b Initial revision 1999-10-07 23:46:40 +00:00