dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1216 Commits

Author SHA1 Message Date
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 c47a9b2c86 Libpcap is at 1.x, it's tcpdump that's at 4.x. 2008-11-21 19:19:02 +00:00
guy 1187832296 Return -1 for all failures to create a packet ring other than "this
kernel doesn't support the packet ring", and make sure we set
handle->errbuf in all such cases.
2008-11-19 17:36:52 +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 5cf5f7c1c8 If attempting to turn memory-mapped access on fails for any reason other
than "the kernel doesn't support memory-mapped access to PF_PACKET
sockets", treat that as an error.  If it fails for that reason, don't
leave gunk behind in the pcap_t's error buffer.

Clean up the error messages a bit (the result of strerror() suffices; we
don't need the numeric value of errno, nor do we need the file
descriptor number of the socket on which we're working).
2008-11-19 10:01:30 +00:00
guy 8fa17a5a55 Fix the handling of the "any" device, including making it reject
attempts to open it in monitor mode.
2008-11-19 08:20:39 +00:00
guy edbdc85842 Make the version 4.1-PRE-CVS, as 4.1.0 will presumably eventually be
branched off from the main branch.
2008-11-18 09:03:26 +00:00
guy c2df6d77ef Update and fix a comment. 2008-11-18 09:01:23 +00:00
guy 679a612eb3 Make the version 1.1-PRE-CVS, as 1.1.0 will presumably eventually be
branched off from the main branch.
2008-11-18 08:54:22 +00:00
guy 89e2d4518e Sort contributors by given name, not family name. 2008-11-18 07:56:35 +00:00
guy 4e7a6968b8 Give Peter Volkov credit for various patches. 2008-11-18 07:53:22 +00:00
guy b77695d2ec Propagate from the git tree:
Author: Michael Richardson <mcr@sandelman.ca>
Date:   Thu Nov 13 11:42:19 2008 -0500

    added DLT_LINUX_EVDEV for David Gibson <david@gibson.dropbear.id.au>

Fix the name of the devices, and add LINKTYPE_LINUX_EVDEV.
2008-11-18 07:48:56 +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 08cc2c0c57 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:03:09 +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 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 230cdec755 Don't do all the recvmsg() stuff if we don't have "struct
tpacket_auxdata".
2008-10-28 00:50:20 +00:00
guy e8cb2f6a99 Use a semicolon, rather than a comma, to separate the DLT_ and LINKTYPE_
types in the item headers, so as to make it less likely that people will
assume that the numerical values given for LINKTYPE_ types are also the
numerical values for the DLT_ types (in some cases, they aren't).
2008-10-27 22:52:30 +00:00
guy e58ca4c1ad On Linux (and other platforms using the V7 man page conventions), we
install man pages in sections 5 and 7, not section 4.

Include the header files installed in /usr/include/pcap.
2008-10-27 20:50:56 +00:00
guy 174d9b71ca Add LINKTYPE_ names to the pcap-linktype man page, and include the
values, as those are not platform-dependent and appear in the per-file
header of capture files.

Note that the "10MB" in DLT_EN10MB, and the "IEEE802" in "DLT_IEEE802",
are historical (so people don't think DLT_EN10MB is only for 10MB
Ethernet).

Don't describe the DLT_PFLOG header - it's in the format of a "struct
pfloghdr" on the OS on which the file was saved, which is OS-dependent
and release-dependent.

Refer to the pcap-linktype man page in the pcap-savefile man page.
2008-10-24 07:33:50 +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 54649cfbc4 More files to ignore. 2008-10-23 22:14:38 +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 fd0e3d055e Add suffixes for shared libraries, and the generated pcap-config file,
to the .cvsignore list.
2008-10-22 18:14:51 +00:00
guy 36f9c50975 Add some now-generated files to the .cvsignore list. 2008-10-22 18:07:59 +00:00
guy f0ff7be7fa Oops, forgot to delete pcap_compile.3pcap (it's now generated from
pcap_compile.3pcap.in, as it refers to the pcap-filter man page, which
goes into a platform-dependent section).
2008-10-22 18:05:01 +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
gianluca 854adf5232 Implemented pcap_hopen_offline(). This "internal" function allows us to
support pcap_fopen_offline() on windows platforms (where FILE* handles cannot
be passed on DLL boundaries).
2008-10-06 15:27:32 +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 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 f4af9ed692 Link-layer type for 802.15.4 with PHY-level preamble, SFD, and frame
length, as requested by Max Filippov <jcmvbkbc@gmail.com>.
2008-09-22 20:14:19 +00:00
guy ff2ebcf09a A pile of comments, from looking at aircrack-ng's airmon-ng, and
experimenting with an adapter with a mac80211 driver.
2008-09-22 01:12:34 +00:00
guy 9d151025a4 Only set the cleanup and set/get nonblocking mode handlers to the
zerocopy handlers when we decide to use zerocopy mode.  That means they
don't need to check whether zerocopy mode is being used.
2008-09-16 18:42:29 +00:00
guy 46a126edaf Use the PCAP_ERROR #define rather than a raw -1 in all cases where an
error message has been constructed, to make it clearer when that's
happening.  Use the PCAP_ERROR_BREAK #define rather than a raw -2.
2008-09-16 17:20:32 +00:00
guy 9512b57a22 Clean up indentation.
Redo some if statements to make it clearer which branch handles the
zerocopy case and which branch handles the non-zerocopy case.

Support setting the buffer size for zerocopy BPF.
2008-09-16 07:45:11 +00:00
guy 87aace3722 Combine the capture-mechanism-dependent tests into one big case
statement.
2008-09-16 07:10:31 +00:00
guy 2b61a87b6d Fix a comment. 2008-09-16 06:36:23 +00:00
guy 73e8fef161 Zero-copy BPF support, from Christian Peron. 2008-09-16 00:20:23 +00:00
guy 0a9a829a65 malloc(strlen(X) + 1) followed by strcpy(result-of-malloc, str) is
equivalent to strdup(str); use that, so people don't freak out upon
seeing a strcpy() call that, out of context, looks as if it's not
buffer-overflow-safe.
2008-09-15 23:37:51 +00:00