dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1193 Commits

Author SHA1 Message Date
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
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 8c970e4d60 From Patrick McHardy:
pcap-linux: fix invalid rcvbuf size

Libpcap issues a SO_RCVBUF when the buffer size if unspecified (zero).
The intention is to set it when its *not* zero.
2008-08-06 07:53:34 +00:00
guy 7eb4516342 From Patrick McHardy:
Similar to PACKET_AUXDATA for non-mmaped sockets, the VLAN TCI is
present in a new member of struct tpacket2_hdr. Use it to reconstruct
the VLAN header when necessary.
2008-08-06 07:51:29 +00:00
guy c6eedee1a5 From Patrick McHardy:
The tpacket_hdr is not clean for 64 bit kernel/32 bit userspace and
is not extendable because the struct sockaddr_ll following it is
expected at a fixed offset.

Linux 2.6.27-rc supports a new tpacket frame header that removes these
two limitations. Convert the mmap ring support to support both formats
and probe for availability of the new version.
2008-08-06 07:49:19 +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 59b463d614 From Patrick McHardy: Convert pcap-linux to use recvmsg() as preparation
for using PACKET_AUXDATA cmsgs.
2008-08-06 07:39:44 +00:00
guy f34a88b3c4 We shouldn't need to include <sys/file.h>, and, as I remember, it caused
problems on some platform.
2008-08-06 07:34:09 +00:00
guy 34624f128f When activating a device, return PCAP_ERROR_IFACE_NOT_UP if the device
isn't up, so applications can report that differently from a generic
error (the latter could mean there's a bug somewhere in libpcap).

When capturing on a device without mmap on Linux, ignore ENETDOWN, so
that we can continue to capture traffic if the interface goes down and
comes back up again; comments in the kernel indicate that we'll just
block waiting for packets if we try to receive from a socket that
delivered ENETDOWN, and, if we're using a memory-mapped buffer, we won't
even get notified of "network down" events.
2008-07-01 08:02:33 +00:00
guy a8e63c60ed Get rid of declaration of non-existent routine. 2008-07-01 07:05:54 +00:00
guy ae8f708268 Handle ARPHRD_NONE, used by some tunnel devices, by mapping to DLT_RAW,
as it has a zero-length link-layer header.
2008-06-24 06:44:32 +00:00
guy ff0b6ac4a0 Update the NeXTStEP, SCO UNIX/SCO OpenServer, and UnixWare information. 2008-06-12 20:21:51 +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 c76180e1ae Update README.macosx to talk about the launchd daemon, and to give more
information.
2008-06-07 18:53:31 +00:00
guy 6057eda6f0 This is probably the right way to run something once at startup time; it
works on Tiger, and setting OnDemand to false appears to cause the job
to be run over and over again on Leopard.
2008-06-05 08:10:59 +00:00
guy 83206d9b13 Fix more patches@tcpdump.org references to point to the SourceForge
site.
2008-05-30 01:43:21 +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 d9e031714d Get rid of the AUTHORS and BUGS section; only the main pcap(3PCAP) man
page should have that (no other pages for particular functions have it).
2008-05-30 01:32:34 +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