handed to the host; ps_drop is the number of packets dropped by the
capture mechanism because it ran out of buffer space. We don't know the
former, so set it to 0; we *do* know the latter, but it's ps_drop, not
ps_ifdrop.
try scanning the sysfs USB directory first and, if that
directory doesn't exist, try the procfs USB directory, to handle
newer kernels where the relevant director is in sysfs;
use the data length, not the URB length, as the amount of data
in the packet (the URB length is the amount of space *available*
for the data, not the actual amount of data).
For the memory-mapped interface, include the padding after the URB and
setup header in the packet lengths, and return a different link-layer
type so that code reading the packets knows that padding is there.
<net/if.h>, in the hope that
1) doing so won't cause some problem somewhere
and
2) it'll have multiple-include protection
(this whole "glibc is a separate project from the kernel, so we'll
duplicate header files" thing has its downsides).
test without <net/if.h> failed, so that we don't just use the cached
value and skip the test, and log a message to note why we're trying the
check again.
kernel in general), <linux/wireless.h> includes <net/if.h> and you get
multiple-definition errors if you include <net/if.h> before it. Only
include <net/if.h> if you don't have <linux/wireless.h>.
kernel in general), <linux/wireless.h> includes <net/if.h> and you get
multiple-definition errors if you include <net/if.h> before it. When
checking for linux/wireless.h, try first without net/if.h and then with
net/if.h.
available, but is set unconditionally.
In addition, we might as well just put all the code that handles bufmod
inside a single #ifdef HAVE_SYS_BUFMOD_H/#endif pair; on Solaris, you
always have bufmod, so the code would work, but it's cleaner that way.
put the transfer direction in the uppermost bit of the endpoint
number, rather than the uppermost bit of the transfer type, when
reading in text mode, just as is the case in binary mode;
check the URB data length against 0 when deciding whether
there's no URB tag.
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.
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).
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.
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.
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.
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.
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.
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.
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).
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.