dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

62 Commits

Author SHA1 Message Date
guy f6812ab143 From Stephen Donnelly: updates to the DAG support, to support their
updated API if available.
2005-07-07 06:56:02 +00:00
guy 864a98239b Cleanups to help for --with-dag and --with-septel. 2005-06-20 21:37:43 +00:00
guy 0fe04f098e From Gilbert Hoyek <gil_hoyek@hotmail.com>: support for capturing SS7
traffic on Intel Septel cards, and for filtering on SS7 MTP3 fields.

Clean up indentation.
2005-06-20 21:30:13 +00:00
guy eb18a17db5 From Albert Chin: AC_CHECK_DECLS will define the HAVE_DECL_xxx variable
whether it succeeds or fails, so you can't erase a "no" result and try
again with a different header.  Use AC_CHECK_DECL, which doesn't define
HAVE_DECL_xxx, and then explicitly define it based on whether we found a
declaration or not.
2005-04-23 22:43:31 +00:00
guy 65dd7c80dc Some systems (*cough*Irix*cough) not only don't declare
"ether_hostton()" but don't even declare "struct ether_addr"; on those
systems, declare "struct ether_addr".
2005-04-20 11:13:50 +00:00
guy b8916c62b3 From Albert Chin: include <arpa/inet.h> in the test program that checks
whether netinet/if_ether.h declares ether_hostton() - that's required
for AIX 4.3.3.
2005-04-19 00:51:38 +00:00
hannes 4e10a0f84f backport the changes over the weekend from HEAD to 0_9 2005-04-10 18:04:47 +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 73a0081c01 Fix some typoes for "ether_hostton".
If we don't have ether_hostton(), don't bother checking
NETINET_ETHER_H_DECLARES_ETHER_HOSTTON and including <netinet/ether.h>
if it's defined.
2005-03-27 22:26:25 +00:00
guy 4d2457ceee When testing whether <netinet/if_ether.h> declares ether_hostton(), add
all the extra #includes and definitions nametoaddr.c has.
2005-03-27 21:51:23 +00:00
guy cd3e743361 Unset ac_cv_have_decl_ether_hostton before testing whether
<netinet/ether.h> declares ether_hostton(), so the failure to find it
declared in <netinet/in_ether.h> doesn't cause us to assume we won't
find it anywhere.

Fix a typo in a comment.
2005-03-27 03:36:36 +00:00
guy 822f0efb5f If we don't get a declaration of ether_hostton() by including
<netinet/if_ether.h>, try <netinet/ether.h>.
2005-03-27 02:45:03 +00:00
guy 216c14f343 One more header Solaris needs to get at ether_hostton(). 2005-03-27 01:15:20 +00:00
guy 5277314c1e Make the first AC_CHECK_HEADERS test look the way it used to look, and
make the second one similar.

Get rid of the # in the "Rechecking with some additional #includes"
message, as it's a shell comment character and screws up the script.

Fix a typo in a comment.
2005-03-27 01:07:01 +00:00
guy 575134c351 Discard the cached result of a failure of the first test of
<netinet/if_ether.h>, so we try the second test with the additional
includes and definitions).

Log a message before doing the second test, to show why we're testing
twice.
2005-03-27 00:57:08 +00:00
guy d7ef1bcb71 On some platforms, some extra stuff is needed in order to include
<netinet/if_ether.h>, so, if we don't find <netinet/if_ether.h>, try
adding that extra stuff when looking for it.
2005-03-27 00:30:21 +00:00
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 60d9468f45 From Koryn Grant: correctly detect and configure libpcap for both
2.4.x-series and and 2.5.x-series DAG software releases.
2004-11-09 18:32:22 +00:00
fenner 9cb15b4863 Pass correct prereqs for <netinet/if_ether.h> 2004-03-28 20:31:07 +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 c6925e0c52 Autoconf 2.5x won't let you modify LIBOBJS directly; use AC_LIBOBJ to
modify it.

AC_LIBOBJ isn't supported by pre-2.50 autoconf; require 2.50.
2004-01-14 03:00:36 +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 2fc0876600 Note that, for 32-bit PA-RISC, the shared library suffix is ".sl". 2003-11-30 22:42:25 +00:00
mcr 75ce5b9341 patches to make building RPMs and shared libraries easier. 2003-11-30 04:45:02 +00:00
guy 67ccc964bf 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 07:46:57 +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 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 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
fenner 93abe845e9 Add comments to BDEBUG and YYDEBUG for autoheader 2001-11-12 22:18:57 +00:00
fenner 4da5bb94e1 Make it easy to turn on optimizer and parser debugging with
--enable-optimizer-dbg and --enable-yydebug
2001-11-12 22:08:46 +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 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 5b0a98d641 Add support for a new link layer type DLT_LINUX_SLL, for use when doing
live captures with a "cooked" (SOCK_DGRAM) rather than a "raw"
(SOCK_RAW) PF_PACKET socket; it includes a bunch of the fields from the
"struct sockaddr_ll" you get in a "recvfrom()", including the Ethernet
protocol field.

This requires us to rewrite the BPF program if we're stuffing it into
the kernel; as long as we're doing *ex post facto* rewriting, we might
as well also do the "ret <snaplen>" -> "ret 65535" fixup there as well,
rather than in the code generator.
2000-12-21 10:29:21 +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
fenner af62365a17 Add a check for lame lex and fail with an error message recommending flex. 2000-08-16 20:28:52 +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 f1eb21451b add config.h. remove gnuc.h, use AC_DEFINE/3 to get strings into config.h.in 2000-07-11 00:38:19 +00:00
assar cac15b82a8 add code for handling find the correct dlpi device on HP-UX 11.0
From: Guy Harris <gharris@flashcom.net>
2000-07-06 01:50:36 +00:00
assar 1cf3c4fbc9 remove setting of umask
remove check for malloc.h: not used any longer
2000-07-01 03:31:45 +00:00
assar fe8ad9b324 do not check for sys/ioccom.h and net/if_arp.h they are not being used 2000-06-26 04:20:36 +00:00
assar 80a0ed7346 use AC_PROG_RANLIB. be more cross-compilation friendly.
From cgd@netbsd.org (Chris G. Demetriou)
2000-06-10 14:18:39 +00:00