dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

145 Commits

Author SHA1 Message Date
Patrick McHardy 481ab2d4a6 Merge branch 'master' of git://bpf.tcpdump.org/libpcap
Conflicts:
	pcap/bpf.h

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-10 14:44:29 +01:00
Guy Harris a092bafeee In test programs, just as in pcap-usb-linux.c, if we have
<linux/compiler.h> we (probably need to include it before including
<linux/usbdevice_fs.h>, otherwise the test may fail when it shouldn't.
2010-11-30 15:52:45 -08:00
Guy Harris b019cc06cb Check whether we have <linux/compiler.h>.
Not all distributions have it in /usr/include; I guess the ones that
don't have it have versions of other kernel headers that don't require
it.
2010-11-25 14:06:01 -08:00
Guy Harris ade794238b Add support for libnl 2.x, adapted from a newer version of the iw command. 2010-11-13 17:42:47 -08:00
Patrick McHardy f6e28f8d19 Import pcap-dect-linux
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-15 02:21:10 +02:00
Guy Harris fa4435e65c Add support for setting the time stamp type for a capture.
Based on a patch from Scott Mcmillan <scott.a.mcmillan@intel.com>.

(Second part of the commit.)
2010-08-22 17:36:27 -07:00
Alon Bar-Lev e25ea10a13 Use the right version of ar when cross-building.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-04-16 03:02:27 -07:00
Guy Harris e45fc489f0 Build fat appropriately for Leopard. 2010-04-06 15:06:34 -07:00
Guy Harris d7cf4017fb Fix check for Snow Leopard.
For OS X version 10.{x}.{y}, Darwin is (at least for later versions)
version {x+4}.{y}.
2010-04-04 12:37:15 -07:00
Guy Harris 6776069ed8 Balance parentheses in a comment. 2010-04-04 12:07:13 -07:00
Guy Harris 19cc8a5941 Clarify that universal is OS X-specific.
In the help message for --disable-universal, note that it's for OS X.
The configure script will presumably offer that option even on other
OSes (e.g. because you might be cross-building for OS X).
2010-04-04 11:56:46 -07:00
Guy Harris 8416cc897b Build universal on OS X by default; add an option to disable that.
Instead of requiring the user to specify -arch options on OS X to build
a universal version of libpcap, just default to universal on OS X by
default.  Pick the particular targets to match the way libpcap is built
for the OS for which we're building.
2010-04-04 11:51:01 -07:00
Guy Harris dbf3bd4597 Add a --with-arch-flags configuration option to specify target architectures.
They allow the user to specify flags to indicate the target
architecture(s) (yes, possibly plural - think, for example, Mac OS X)
for which we're building.  Those might need to be used not only when
compiling, but also when linking and when building a shared library.

This is not for general cross-compiling, it's for use on platforms where
versions of the native OS support more than one instruction set and
where you want to build for the OS on which you're running but not for
the default build architecture on the machine on which you're running.
2010-03-31 17:22:33 -07:00
Christian Bell 271747b20b Fix --with-pcap={linux,bpf} when SNF API is present.
Signed-off-by: Guy Harris <guy@alum.mit.edu>
2010-01-26 12:02:38 -08:00
Christian Bell e1539bdbcb Add Myricom SNF API support as a new pcap device.
This patch adds support for our NICs when run in a specialized capture mode.
It is diffed against the current master.

The Myricom Sniffer10G software uses Myri-10G programmable Network Interface
Cards (NICs), a firmware extension, a specialized driver and a user-level
library (libsnf) to enable sustained capture of 10-Gigabit Ethernet traffic.
Small-packet coalescing and an efficient zero-copy path to host memory allow
Sniffer10G to capture streams at line rate for all Ethernet packet sizes.

Optionally, libpcap can be used concurrently by multiple processes on a single
NIC port to partition the incoming traffic across processes.  While the Linux
kernel enables this through multiple receive queues, the difference is that the
myri_snf driver cooperates with libsnf to set up multiple queues that are each
independently accessible through user-space.

More information here: http://www.myri.com/scs/SNF/doc

Signed-off-by: Guy Harris <guy@alum.mit.edu>
2010-01-26 11:58:37 -08:00
Guy Harris 2fd233b16d On Linux, always at least try to scan /proc/net/dev.
If we fail to open it, we just drive on, so it's not a fatal error; yes,
it'll slow us down a little, but it's probably not much, and most Linux
kernels probably have it in any case.
2010-01-10 00:32:13 -08:00
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