dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

92 Commits

Author SHA1 Message Date
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
guy feedc6fe89 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:15 +00:00
guy 4eb7b3915e AC_TRY_COMPILE works only for code that fits inside "main()"; the test
for __attribute__ doesn't fit inside "main()" with GCC 4.0, as it
defines a function.
2005-04-21 03:41:24 +00:00
guy eeaf96fb94 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:12:36 +00:00
guy 0002aa6d52 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:49:37 +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 2bdb85977d When testing whether "inline" works, use the V_CCOPT flags, because some
of those might disable inlining; otherwise, the test for inlining will
succeed, but inlining won't work with the options we're using when
compiling.
2005-03-27 03:27:09 +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 cd5084b6f0 Regenerate. 2004-11-10 09:21:46 +00:00
fenner 3058de1dde Regenerate. 2004-03-28 20:31:56 +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 5d2a9d1922 Regenerate with autoconf 2.57. 2004-01-14 03:01:25 +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