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).
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.
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.
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>
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.
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.
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>
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
<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).
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.
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.
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.