dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

113 Commits

Author SHA1 Message Date
Guy Harris e84ae717b4 Clean up handling of the "net" symlink made by the configure script.
In "make distclean", get rid of it; in .gitignore, ignore it.
2010-08-23 03:12:12 -07: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
Guy Harris 57935bef89 Combine documentation for allocate and free routines.
Pull the documentation for pcap_freealldevs() into the
pcap_findalldevs() man page, and pull the documentation for
pcap_free_datalinks() into the pcap_list_datalinks() man page.
2010-08-22 14:54:10 -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
Alon Bar-Lev 3a089e628c Include the CFLAGS setting when configure was run in the compiler flags.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-04-13 19:00:04 -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
Alon Bar-Lev d270319b2c Pass LDFLAGS to the command that builds shr.o on AIX.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-03-31 14:32:39 -07:00
Guy Harris 8f6096fd01 Move test source to a tests directory, add a new test for nonblocking mode. 2010-03-31 12:39:35 -07:00
Michael Richardson 5377f7340b instead of making releasetar depend upon bpf_filter.c, move bpf_filter.c to GENSRC 2010-03-05 11:51:35 -05:00
Michael Richardson 8499864cf2 releasetar target needs bpf_filter symlink to be set right 2010-03-05 11:45:41 -05:00
Guy Harris a6942e7596 Put date into version.h for Git versions, too. 2010-02-08 02:49:42 -08:00
Guy Harris 916b450e31 For PRE-GIT releases, put a date stamp in the version string.
This is similar to what we do for tcpdump.
2010-02-08 02:40:11 -08:00
Guy Harris 9934984be5 Put pcap-snf.c and pcap-snf.h into the release tarball. 2010-01-26 19:52:05 -08:00
Guy Harris f9c2f9a852 Include pcap-common.h in the tarball. 2010-01-10 14:21:02 -08:00
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