dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

129 Commits

Author SHA1 Message Date
Guy Harris 9662c40522 Split off the shared-library tests into a separate macro.
Split off the shared-library tests into a separate AC_LBL_SHLIBS_INIT
macro, so the libpcap and tcpdump versions of AC_LBL_C_INIT can be the
same.  While we're at it, clean up some of the AC_PREREQ and AC_BEFORE
stuff.
2010-01-02 15:08:06 -08:00
Guy Harris d1a3a92fab Fix some problems that show up in autoconf 2.64 and later. 2010-01-02 14:15:46 -08:00
Felix Obenhuber 03238ec05d Check for <linux/can.h> rather than <linux/can/version.h>.
Not all Linux kernels that can support SocketCAN sniffing have
<linux/can/version.h>, and we don't include it directly.  We *do*
include <linux/can.h>, so check for that.

Patch changed not to bother checking for the existence of <sys/socket.h>
- we already assume it exists on all platforms that support packet
capture, including Linux.  I also changed the Bluetooth "not supported
on this OS" message to look like the one for CANbus, giving the host OS.

Signed-off-by: Guy Harris <guy@alum.mit.edu>
2009-12-30 17:14:20 -08:00
Guy Harris 72f5572c50 Capitalize "Bluetooth" and "CAN" in help messages and comments. 2009-12-29 11:56:57 -08:00
Felix Obenhuber 1c1816f670 Add support for CANbus capture.
Signed-off-by: Guy Harris <guy@alum.mit.edu>
2009-12-29 01:04:20 -08:00
Darren Reed bdc25fca79 To compile libpcap on OpenSolaris (or Solaris Express Community Edition)
build 125 and later to use the native BPF with both IPNET and traditional
MAC (ethernet, etc) packet sniffing, the attached patches are required.

The attached patches represent what's in our internal build tree for libpcap.
2009-11-24 21:40:44 -05:00
Guy Harris 43acbb77a8 Work around an annoying Snow Leopard BPF bug that causes sub-second
timeouts not to work in 64-bit userland code (Snow Leopard's GCC builds
64-bit by default on 64-bit machines).
2009-10-11 11:05:46 -07:00
Darren Lim 420e592e02 Added the dagutil.o object file from the Endace DAG libraries into the
libpcap archive. A dependency has been introduced whereby the dagapi.o
object depends on functions in the dagutil.o as og DAG software release
3.4.1. This change is backwards compatible with older versions of the
DAG libraries.
2009-09-17 15:24:28 +12:00
Guy Harris 0e9481a12a In the test for a bRequestType member of "struct usbdevfs_ctrltransfer",
include various "standard" headers, to make sure "u_int" gets defined.
2009-07-13 01:08:32 -07:00
Guy Harris 14cfcac8fa Rename ADDLOBJ to ADDLOBJS, along the lines of LIBOBJS, etc..
Add ADDLARCHIVEOBJS, so that we can put some stuff from -ldag into the
archive library (so it's self-contained, and the configuration processes
for programs not configured with pcap-config don't have to know about
the DAG library) but not into the shared library (as we can link libpcap
with the DAG shared library, so linking with -lpcap will cause -ldag to
be linked in at run time if necessary).
2009-07-12 16:33:08 -07:00
Guy Harris 6f7074d4b0 commit e61f27f56bef0f229f0bf02911f76cfcfa12f083
Author: Peter Volkov <pva@gentoo.org>
Date:   Wed Jul 8 16:06:18 2009 +0400

    Add --without-libnl configure switch

    Allow build libpcap with libnl disabled even in case libnl is installed
    at system.
2009-07-09 13:55:49 -07:00
Guy Harris 2723ec4198 Check for the intN_t and u_intN_t types the same way we do for tcpdump;
that works better on Tru64 UNIX.

Include the relevant headers for those types in savefile.c, for the same
reason.
2009-07-08 01:10:18 -07:00
Guy Harris bbd8be8360 Older Linux kernels have different member names for "struct
usbdevfs_ctrltransfer"; check for that and handle it.

Don't declare variables in the middle of a block; some versions of GCC
appear to warn about that.
2009-07-04 15:04:59 -07:00
Guy Harris 16d78cf97c We already add -fpic in AC_LBL_C_INIT; no need to add -fPIC. 2009-07-02 23:23:26 -07:00
Guy Harris fb62fdb902 There's no need to explicitly say "expand @LIBS@ when writing output
files"; that's done automatically.
2009-07-02 12:26:32 -07:00
Guy Harris 607b688667 Just use LIBS inside configure.in, so if we add flags or libraries it
affects the configure tests.

Build test programs with $(LIBS), as they're being linked with libpcap.
2009-07-02 12:18:31 -07:00
Guy Harris 252c7497e5 AC_LBL_C_INIT takes two arguments, not three. 2009-07-02 12:14:14 -07:00
Guy Harris 8356bb5310 Build and install no shared libraries on platforms for which we haven't
written shared library support.

Clean up some comments, and (for now) always use "$(CC) -shared" to
build shared libraries with GCC.

Merge two separate "check the platform and set the compiler options"
switches.
2009-06-27 12:43:26 -07:00
Guy Harris 744a2b557b Add support for building AIX shared libraries. (It's complicated - we
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it.  Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)

Fix an AIX build problem that shows up when building with GCC.

Clean up HP-UX stuff.
2009-06-16 00:18:54 -07:00
Guy Harris 2ba97bd5f8 Use "if test", not "if [" - by the time it makes it through M4, the ['s
disappear.
2009-06-09 16:54:49 -07:00
Guy Harris db68de2198 Add a way to have pcap-config supply the appropriate rpath flag, if any. 2009-06-09 10:50:31 -07:00
Guy Harris e0b238b794 Update the Septel configuration stuff the way we updated the DAG stuff -
additional .o's to add to libpcap should go into ADDLOBJ, not V_LIBS.

Don't add -DHAVE_SEPTEL_API to V_DEFS - we add HAVE_SEPTEL_API to the
config.h file, which should be sufficient.
2009-06-07 11:41:03 -07:00
Guy Harris 102c1ff460 When checking whether a device will let you turn monitor mode on, assume
mac80211 devices will, regardless of whether they support the Wireless
Extensions - wmaster devices will let you turn monitor mode on but don't
appear to support the Wireless Extensions.

Support turning on monitor mode with libnl even if we don't have support
for the Wireless Extensions, just in case the Wireless Extensions go
away at some point in the future if every 802.11 device has a mac80211
driver.
2009-06-01 12:56:05 -07:00
Guy Harris 9f59acab41 To put mac80211 devices in monitor mode, create a "monN" device for the
underlying adapter, bring it up, and capture on that.

This means libpcap nees to be linked with -lnl.
2009-05-22 05:50:15 -07:00
Guy Harris 95c97b9b6f Make ADDLOBJ be the list of additional objects to link in when building
a shared libpcap and add into the archive when making an archive
library.  Make V_LIBS in the configure script, and LIBS in the Makefile,
a list of additional libraries with which to link a shared libpcap and
with which to link applications built with a non-shared libpcap.
2009-05-22 16:14:08 -07:00
Guy Harris f51454f7fc Extend the scheme for building .so files to support Sun C and Sun's
linker, and include *BSD in the list of systems using GNU C and GNU ld.

Add support for building shared libraries on HP-UX (not yet tested).

Attempt to set the soname (or equivalent) appropriately when building a
shared library.

Build, and install, shared libraries by default.

Update config.guess and config.sub.
2009-04-21 09:09:37 -07:00
Guy Harris 75734791c5 From Darren Reed: some changes to support BPF on Solaris. Update his
e-mail address while we're at it.

Use <fcntl.h> rather than <sys/file.h> in pcap-bpf.c - that's the right
header for open().

Don't include <sys/timeb.h> - it doesn't define anything that pcap-bpf.c
should need.
2009-04-18 13:04:27 -07:00
guy 5e3edce42f From Jon Smirl: when we start capturing, send GET DESCRIPTOR requests to
all devices on the bus, so we know what's out there already.  Cleaned up
a bit to directly include <linux/usbdevice_fs.h> and *not* to require
the USB library just to supply a header with USB definitions.
2008-12-23 20:49:26 +00:00
guy ba23aa7b42 OK, let's try another approach - include <linux/if.h> rather than
<net/if.h>, in the hope that

	1) doing so won't cause some problem somewhere

and

	2) it'll have multiple-include protection

(this whole "glibc is a separate project from the kernel, so we'll
duplicate header files" thing has its downsides).
2008-12-14 22:00:57 +00:00
guy 26c8745ecf When trying <linux/wireless.h> with <net/if.h>, first forget that the
test without <net/if.h> failed, so that we don't just use the cached
value and skip the test, and log a message to note why we're trying the
check again.
2008-12-14 21:03:07 +00:00
guy ad46bc2135 It appears that, at least with the 2.6.27.5 kernel (and maybe the 2.6.27
kernel in general), <linux/wireless.h> includes <net/if.h> and you get
multiple-definition errors if you include <net/if.h> before it.  When
checking for linux/wireless.h, try first without net/if.h and then with
net/if.h.
2008-12-14 20:17:14 +00:00
guy cad7b9cec9 Get rid of bogus AC_CHECK_HEADERS with empty list - the shell code that
turns into happens to run in Bash, but not in the Bourne shell.
2008-11-19 11:13:46 +00:00
guy a2611cdc3a Autoconf 2.50 had AC_HELP_STRING, not AS_HELP_STRING; later versions
make AC_HELP_STRING an alias for AS_HELP_STRING.  As we require only
2.50, use AC_HELP_STRING, not AS_HELP_STRING.
2008-11-18 07:23:04 +00:00
guy 08cc2c0c57 From Peter Volkov:
Currently if there are bluetooth.h headers installed in the system
libpcap will be built with bluetooth support and it's impossible to
disable it. Attached patch adds --{en,dis}able-bluetooth switches.

Also this patch makes use of AS_HELP_STRING to let autoconf manage
output layout.
2008-11-18 07:03:09 +00:00
guy 3b0ceef967 Propagate from the git tree:
Author: Peter Volkov <pva@gentoo.org>
Date:   Thu Nov 6 01:28:58 2008 -0500

    Currently SITA will be defined and sita code will be tried to build even
    if --without-sita is passed to ./configure. Patch in attachment fixes
    this issue.
2008-11-18 06:59:04 +00:00
guy e16bb01d4c In the big "host OS" switch, put the names in alphabetical order, and
add cases for Irix and {OSF/1, Digital UNIX, Tru64 UNIX).

AIX appears to use the V7/BSD convention for man pages, not the SV
conventions.
2008-10-24 07:29:34 +00:00
guy 763adefead Add a man page describing the pcap file format.
Refer to it from the pcap_open_offline() and pcap_dump_open() man pages
(so they are now generated).

Update .cvsignore.
2008-10-23 05:56:59 +00:00
guy 285c3a9fb0 Don't hard-wire section 4 as the section for the pcap-filter and
pcap-linktype man pages; it should be section 7 for UN*Xes using the
V7/BSD conventions (this includes *BSD, Linux, and Mac OS X), and
section 5 for UN*Xes using the System V conventions (this includes
Solaris and HP-UX, and possibly AIX).
2008-10-21 07:33:01 +00:00
guy ad68762c8e Add a pcap-config script, to handle necessary -I/-L flags and any
libraries required by libpcap.
2008-09-23 18:04:01 +00:00
guy 87aace3722 Combine the capture-mechanism-dependent tests into one big case
statement.
2008-09-16 07:10:31 +00:00
guy 73e8fef161 Zero-copy BPF support, from Christian Peron. 2008-09-16 00:20:23 +00:00
guy b1a458c84e Check whether the tpacket_auxdata structure has a tp_vlan_tci member
before using that member.

Don't define variables if we aren't going to use them.

If we have an unknown tpacket version (this "can't happen"), return an
error.
2008-08-06 08:29:07 +00:00
guy 16b2f49992 Make sure <sys/dlpi.h> is usable; it exists in SCO OpenServer 5, but it
doesn't define what we need for DLPI support.
2008-06-12 19:59:57 +00:00
guy dc637abc26 Improve the help message for --enable-ipv6. 2008-06-11 09:05:10 +00:00
guy bc54719c2f It's 2008 - time to enable IPv6 support by default, as long as you have
getaddrinfo().
2008-06-11 08:52:29 +00:00
guy e3f0aadca9 Clean up the output of the configure script a bit. 2008-04-05 04:56:47 +00:00
guy d9b420231a From Paolo Abeni and me: split pcap_open_live() into a "get a pcap_t
handle" routine, an 'activate a pcap_t handle" routine, and some "set
the properties of the pcap_t handle" routines, so that, for example, the
buffer size can be set on a BPF device before the device is bound to an
interface.

Add additional routines to set monitor mode, and make at least an
initial attempt at supporting that on Linux, *BSD, and Mac OS X 10.4 and
10.5.  (Very much "initial" for Linux, which is a twisty little maze of
wireless drivers, many different.)

Have a "timeout" member of the pcap_md structure on all platforms, use
that on Windows instead of the "timeout" member of the pcap_t structure,
and get rid of the "timeout" member of that structure.
2008-04-04 19:37:44 +00:00
guy 9e26c39a2e AC_DEFINE now requires a comment for the #define. 2008-03-14 09:12:49 +00:00
guy 45191202aa From Kris Katterjohn: explicitly check for socklen_t, don't just assume
glibc is the only Linux libc that defines socklen_t.
2008-03-14 09:09:13 +00:00
guy cb44cb0520 Support for libdlpi, and for enabling "passive mode" on Solaris systems
that support it, from Sagun Shakya.
2008-03-13 18:13:57 +00:00