dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

115 Commits

Author SHA1 Message Date
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 e8fbb040ce From Peter Volkov:
Currently make install in libpcap never installs pcap/{vlan,bluetooth}.h
headers. Attached patch makes it install them in case support was built
in into libpcap.
2008-11-18 07:29:48 +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 c4286ad82b 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:13:20 +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 d47aed311c Fix the rest of the $target_XXX to refer to $host_XXX - in autoconf
scripts, "target" refers to the platform, presumably a compiler, linker,
assembler, etc., for which the software generates code, "host" refers to
the platform on which the software runs, and "build" refers to the
platform on which the software is being built.
2008-09-28 17:13:17 +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 f254ca4520 From Patrick McHardy: fix AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI macro
(cut-and-pasteo).
2008-08-07 16:44:57 +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 8fc17acf3c Clean up the output of the configure script a bit. 2008-04-05 05:20:48 +00:00
guy a9b5ae35f2 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.

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:40:02 +00:00
guy 5148b1804b Regenerate. 2008-03-14 09:13:05 +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
guy 26504998e7 Back out some changes not intended to be checked in. 2008-02-06 10:18:54 +00:00
guy 171e80b8ff From Mike Frysinger: include the Blackfin processor as one of the
processors that don't support unaligned accesses.
2008-02-06 10:04:31 +00:00
guy cbd65556a7 Get rid of an unused configuration variable. 2008-02-04 21:09:27 +00:00
guy f57d847d09 The SITA code in pcap-linux.c shares very little with the Linux code;
move it into pcap-sita.c, and make --with-sita set the pcap type to
"sita", so we build pcap-sita.c instead of, rather than in addition to,
pcap-linux.c.

Use "bpf_u_int32" rather than "ulong" in the SITA code, as it's intended
to be 32 bits long (the "l" in "htonl()" and "ntohl()" is historical -
they work on 32-bit quantities, and the "l" dates back to the days when
32-bit processors were a bit newer and 16-bit Unix was more common).

Those changes also, at least in theory, makes the SITA support work on
other Unix-compatible platforms; note that in README.sita.

Clean up pcap-sita.c, making routines no longer called outside it
static, folding trivial wrappers, and fixing various warnings.

Put the routines used by fad-sita.c and defined by pcap-sita.c into
pcap-sita.h.  Remove from pcap-sita.h the files that are now static to
pcap-sita.c.  Include pcap-sita.h in both fad-sita.c and pcap-sita.c, so
that we do cross-file prototype checking.
2008-01-06 20:23:17 +00:00
guy a9b98caa0d Use AC_SYS_LARGEFILE and AC_FUNC_FSEEKO to try to get large file support. 2008-01-01 03:49:11 +00:00
guy 9070702bd0 Check for u_int64_t and define it as "unsigned long long" if we don't
have it; we use it in the USB pseudo-header.
2007-12-31 03:00:47 +00:00
guy 70727eb8d2 Add some additional PF actions, from OpenBSD - but do so only if they're
defined on the platform on which we're compiling.
2007-11-14 00:54:35 +00:00
guy 877d5fc4eb From Stephen Donnelly:
Clean up the configure output for the dag libraries a bit.

	Add Florent Drouin's changes for DLT_ERF.

	Some other DAG changes.
2007-10-30 10:16:45 +00:00
guy bb9a52d915 SITA ACN support, from Fulko Hew. 2007-10-20 01:15:14 +00:00
guy 05e4b27b14 From Stephen Donnelly:
* Improved error checking in dag_read().
     * More efficient dag_platform_finddevs().
     * Support for new DAG API function dag_get_stream_erf_types().
2007-10-04 23:06:25 +00:00
guy b52473e046 From Max Laier: check whether the system has <net/pfvar.h> and:
if it does, use that for the pf definitions;

	if it doesn't, don't compile in pf support;

as both OpenBSD and FreeBSD have changed the pf definitions and header
format without changing the DLT value, so you can't reliably read
pflog-format libpcap files on a machine running an OS version other than
the one on which the file was generated.
2007-09-12 19:09:49 +00:00
guy 4f278d5429 Check for "/dev/bpf"; if we find it, use BPF as the capture mechanism,
and assume it's a cloning device.
2007-06-15 17:55:50 +00:00
guy a6186fa56d Pick up changes from NetBSD:
several files:

	date: 2006/02/27 15:53:24;  author: drochner;  state: Exp;
	avoid shadowing globals, for WARNS=2

	date: 2006/02/27 15:55:30;  author: drochner;  state: Exp;
	minor constification, good for WARNS=3 now

	date: 2006/02/27 15:57:17;  author: drochner;  state: Exp;
	NetBSD adaption:

		...

	-const pcap_strerror() for consistency


    gencode.c:

	date: 2006/04/26 09:24:33;  author: tron;  state: Exp;
	Add missing "const" keywords to match declarations in "pcap.h".

	date: 2006/10/15 19:27:21;  author: christos;  state: Exp;
	add a volatile variable to prevent vfork/longjmp clobbering.

    optimize.c:

	date: 2006/05/17 17:48:36;  author: drochner;  state: Exp;
	Make the optimizer use unsigned numbers as the kernel does.
	While it is not agreed on that purely unsigned arithmetics is nice,
	different behaviour of optimized and unoptimized code is less desirable.

    pcap-bpf.c:

	date: 2006/02/27 15:51:38;  author: drochner;  state: Exp;
	pull in from NetBSD's libpcap: use cloning bpf device on NetBSD

Have the configure script check for paths.h, so that we can include it
only if we have it, and use the cloning BPF device only if we're on
NetBSD *and* _PATH_BPF is defined (hopefully this will keep us from
using it on versions of NetBSD that don't have a cloning BPF device; if,
in the future, other OSes with BPF get cloning BPF devices, we can make
this work for them as well).
2007-06-11 10:04:24 +00:00
guy a247db420a From Stephen Donnelly: change to handle some name changes in the DAG
library resulting from Endace switching to libtool.
2007-02-08 06:02:42 +00:00
guy d959f6403d From Paolo Abeni: add support for the binary USB sniffing interface in
Linux.  The USB sniffing code for Linux now supplies a per-packet header
based on the one supplied by the Linux binary sniffing interface, so we
add a new DLT_ value and use that.

Fix his e-mail address, and add him to the credits.
2006-12-20 03:30:32 +00:00
guy 50ce2663e8 From Paolo Abeni: Bluetooth support. 2006-10-13 17:34:53 +00:00
guy b0b2b0de78 Regenerate. 2006-10-04 16:47:12 +00:00
guy c903ddd8f5 From Stephen Donnelly:
when building a shared library, build with "-fPIC" on Linux, to
	support x86_64;

	link with "$(CC) -shared" rather than "ld -shared" when building
	a ".so" shared library (as would be done with ELF systems that
	use GCC);

	add an explicit "-ldag" when building the shared library, so the
	DAG library dependency is explicit.
2006-09-25 18:04:40 +00:00
guy b64aff479f From Stephen Donnelly:
If the DAG API supports asking a card for the set of ERF types
	it supports, use that capability, to handle cards that support
	multiple ERF types.  This is to support channelised/fractional
	T1/E1.

	Don't set the snapshot length - some DAG cards support multiple
	capture streams, but the snapshot length is global, so it'd
	affect other captures.

	Update README.dag.
2006-04-07 07:07:25 +00:00
guy 7f34968ee3 From Stephen Donnelly: updates to the DAG support, to support their
updated API if available.
2005-07-07 06:55:19 +00:00
guy 409a1a06be Rebuild with autoconf 2.57, to minimize changes. 2005-06-29 06:48:06 +00:00
guy 45767ee2d4 Cleanups to help for --with-dag and --with-septel. 2005-06-20 21:36:57 +00:00
guy a0a4852137 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:27:07 +00:00