dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

98 Commits

Author SHA1 Message Date
Guy Harris b4b664817b Add limited support for reading pcap-ng files.
All sections of the file must have the same byte order, so that the
result of pcap_is_swapped() is the same throughout the file; all
interfaces in the file must have the same link-layer type and snapshot
length, so that pcap_datalink() and pcap_snapshot() can return a single
value for the entire file; and all interfaces must have the same time
resolution and offset.
2010-01-09 16:58:15 -08:00
Christian Bell df6ab8d1a6 Minor VPATH build fixes in top-level Makefile.
Signed-off-by: Guy Harris <guy@alum.mit.edu>
2010-01-08 12:38:56 -08:00
Guy Harris 2d78729d0f Add a pcap/ipnet.h file with IPNET definitions; use the right AF_ values. 2010-01-05 20:35:25 -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 4e4c320e9f Add opentest.c to the list of files to put into the source tarball. 2009-08-11 21:38:06 -07:00
Guy Harris d316f7ebb2 Add a program for testing both the old (pcap_open_live()) and new
(pcap_create()/.../pcap_activate()) open path, especially for reporting
errors.
2009-08-11 21:37:18 -07:00
Guy Harris 559ebc322f Add poll() support to seltest, and rename it to selpolltest.
Just print "."s for packets seen, and count the packets.  Print out the
information from the file descriptor bitsets/poll FDs on one line.
2009-07-26 13:55:35 -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 fda67c0c17 Clean up the shared libpcap, and the test programs, with "make clean". 2009-07-03 12:25:07 -07:00
Guy Harris 8bdcbaeabe Add a new program for testing whether select() works with a live
capture.
2009-07-02 20:51:30 -07:00
Guy Harris c7eb141fff Add a comment to the AC_DEFINE call for const; that eliminates the last
AC_DEFINEd value with no comment, and thus eliminates the need for
acconfig.h, so get rid of it.

Get rid of AC_LBL_LIBPCAP - we don't need it, this *is* libpcap.

Get rid of AC_LBL_TYPE_SIGNAL - we don't use it.

Update comments for AC_LBL_SOCKADDR_SA_LEN and AC_LBL_CHECK_LIB to match
tcpdump's versions.
2009-07-02 19:21:21 -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 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 a3ca7e3bde The configure script makes net a symlink to bpf/net, and we already
include bpf/net/bpf_filter.c in the release tarball, so we don't want to
include net/bpf_filter.c.
2009-06-09 17:57:54 -07:00
Guy Harris afd21fc9e8 HP-UX shared libraries are installed as libXXX.{version}, with libXXX.sl
being a symlink to libXXX.{version}.
2009-06-09 17:49:05 -07:00
Guy Harris c9ef229fef *Don't* use $(AR) to build the library; not all versions of Make define
it.
2009-06-09 17:07:43 -07:00
Guy Harris 6236d9e061 Create the lib directory before installing the shared library. 2009-06-09 11:54:58 -07:00
Guy Harris 135792cec1 "make clean" should remove pcap-config, as it's a generated file. 2009-06-09 11:37:10 -07:00
Guy Harris 4bdfcd89b8 Add in the V_RPATH_OPT Makefile variable, set from the V_RPATH_OPT
configure script variable.
2009-06-09 11:34:05 -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 fcc6ea3b28 Have "make uninstall" un-install pcap-config. 2009-06-08 10:30:49 -07:00
Guy Harris 7d878f834b Install the shared library by default.
Add rules to install and uninstall HP-UX PA-RISC 1.x shared libraries.
2009-06-07 14:21:29 -07:00
Guy Harris 5f760eadd5 Add the release tarball to the .gitignore list and the list of files to
clean.
2009-06-07 11:48:58 -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 b33b2ef32a Install headers unconditionally.
Separate the public and private headers, with separate "public headers"
and "all headers" variables, and install (and uninstall) all public
headers.  Put all headers into the tarball.

Remove target man pages before making links.

Clean up white space a little.
2008-11-22 17:30:24 +00:00
guy 3e0ba22954 Fixes for building in a directory other than the source directory. 2008-11-21 22:54:59 +00:00
guy d3724b0ffc Generate the major version number for the soname from the full version
number in the VERSION file.

When installing a .so file, make the appropriate symlinks.

Add an "uninstall-shared" rule to uninstall the shared library.
2008-11-21 19:23:19 +00:00
guy c2df6d77ef Update and fix a comment. 2008-11-18 09:01:23 +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 c15ece2f8c Propagate from the git tree:
Author: Peter Volkov <pva@gentoo.org>
Date:   Thu Nov 6 01:30:04 2008 -0500

    make DESTIDR=/tmp/libpcap install
    fails with the following error:

    /usr/bin/install -c pcap-config /tmp/test/home/pva/work/local/bin/pcap-config
    /usr/bin/install: cannot create regular file `/tmp/test/home/pva/work/local/bin/pcap-config': No such file or directory
    make: *** [install] Error 1

    patch in attachment fixes this issue.
2008-11-18 06:50:29 +00:00
guy e08d2bcce8 Speaking of dumb, that's a classic "useless cat"; just have sed read
from VERSION.

Fix references to VERSION to read $(srcdir)/VERSION.
2008-10-23 22:12:52 +00:00
guy 34fa6a98c5 Well, that was dumb. Just throwing away everything after the first
non-decimal-digit, non-"." character in the version number suffices.
2008-10-23 06:28:10 +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 d6e96dd744 Handle trailing qualifiers with numbers in them (e.g. "rc1"). 2008-10-22 18:02:36 +00:00
guy 1b0ba00c4c Strip off trailing non-numeric characters from the version number when
setting the current version of an OS X dynamic library, so that
"-PRE-CVS" or "rcN" or... don't get in the way.
2008-10-22 17:52:34 +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 90d8b7797c Set the soname when building with GNU LD to libpcap.1, so that the
soname doesn't have the full version number (as that means that programs
built with libpcap will expect *that particular version* of libpcap, not
just any compatible version).
2008-09-26 23:48:50 +00:00
guy 144209521c Use "libpcap.A.dylib", not "libpcap.0.dylib", as the "install name" of
the OS X shared library; that's what it is in OS X, and that's what gets
built into clients linked against it, so it's not going to change in OS
X as that'd break binary compatibility.
2008-09-26 21:53:01 +00:00
guy 89ec9bf0fe Set the compatibility version of the OS X shared library to 1 (1.0.0),
as that's what it is in OS X.
2008-09-26 21:48:49 +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 e59abf81d3 From Patrick McHardy:
VLAN packets sent over devices supporting VLAN tagging/stripping in
hardware don't have a VLAN header when they are received on packet
sockets. The VLAN TCI is available through the PACKET_AUXDATA cmsg,
reconstruct the entire header when necessary.
2008-08-06 07:45:00 +00:00
guy 757827db5f packaging/pcap.spec is generated from packaging/pcap.spec.in; don't
check in the generated version, and don't put it into the distribution.

Fix a bunch of references to tcpdump-workers@tcpdump.org to refer to the
new address, tcpdump-workers@lists.tcpdump.org.

Fix a reference to the pcap man page from the pcap-filter(4) man page.

Note that patches should be submitted on the SourceForge site, not sent
to the spam-trap patches@tcpdump.org list.
2008-05-30 01:35:33 +00:00
guy f8c1a3770e Add a script to change the permissions of /dev/bpf*, and a launchd plist
for it, for Mac OS X 10.4 and later.  (The script could be useful for
BPF-based systems that don't use devfs as well.) We're not installing it
at this point; that might happen later.
2008-05-28 02:14:10 +00:00
guy 720a1e8328 Don't echo the commands for "make releasetar" (they were echoed when
debugging, but they're not supposed to be echoed).
2008-05-27 07:17:04 +00:00
guy e2da3dba8c Add a missing file to EXTRA_DIST. 2008-05-26 21:12:23 +00:00
guy f2054ca165 FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.

Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.

Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.

Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.

Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory.  Clean out the tarball
directory when we're done.
2008-05-26 21:05:47 +00:00
guy d592f692d0 Add pcap_free_datalinks() - on Windows, something allocated in Vegas^Wa
library has to be freed by the library, as an application or other
library using that library might have been built with a different
version of the C runtime library.
2008-05-26 19:58:06 +00:00