In addition, clean up the allocation and freeing of the temporary
pathname string buffer.
Also, there's no need to set "md.device" (it's only used on Linux, and
even then used only with the old SOCK_PACKET sockets, where you have to
turn promiscuous mode off explicitly rather than having it turn off
automatically when you close the socket) or "md.timeout".
The USB pseudo-header in DLT_USB_LINUX captures is in the host
byte order for the machine on which the capture was done. When
reading a capture file, convert the pseudo-header to the host
byte order of the host on which the file is being read.
There's a 64-bit quantity in that pseudo-header; move the 64-bit
byte-swap macro from the DAG code to pcap-int.h for use by other
code.
The attached patch cleans up usb_platform_finddevs(), removing
the dependency on debugfs. There are also some other minor
cleanups in the pcap-usb-linux.c file (unused variables removed
and indentation fix).
captured on, without trying to open it - if "enN" is an AirPort device,
opening "wltN" is like opening "enN", except that the device is put into
monitor mode, which, for many devices, causes the device to deassociate
from the network with which it's associated.
Linux. The USB sniffing code for Linux now supplies a per-packet header
based on the one supplied by the Linux binary sniffing interface, so we
add a new DLT_ value and use that.
Fix his e-mail address, and add him to the credits.
a Bluetooth socket as an error - it just means there's no Bluetooth
support in the kernel, and thus there are no Bluetooth devices.
Clean up error messages a bit, including indications that these are from
the Bluetooth code.
The attached patch fix an off by one in current usb sniffing
code. It also substitute the kernel-provided timestamp with
gettimeofday. The kernel provided timestamp use 32 bits to
represent a struct timeval (8 bits for tv_sec and 24 for
tv_usec), so it's content is quite misleading.
Clean up some comments.
Protect all references to the USB stuff from the common Linux code with
PCAP_SUPPORT_USB, just as references to the Bluetooth code are protected
with PCAP_SUPPORT_BT.
Abeni.
Added DLT/DLT name table mappings and linktype values and DLT/linktype
mappings for USB and for the Bluetooth NCI UART transport layer.
Fix up indentation.
The attached patch fix the parsing of setup data fields in current
implementation of usb_read_data.
Currently the "setup header is present" field is not marked so the
relevant fields are ignored from caller.
The patch contains also a little indentation fix, always in the same
function.
the second argument, in the hopes that people will be less likely to
expect the routine to do something other than crash if passed a null
pointer as the second argument.
the list for the interface, and try to open the interface only if we
don't already have an interface, so if you have multiple addresses for
an interface, you don't open the interface for each of them. (See
Wireshark bug 1151:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1151
for the reason to do this; pcap_findalldevs() spent a *lot* of time and
energy opening en0 over and over again for all 64K-128K(!) addresses.)
source directory and the target include directory, and have include
files at the top-level directory to include those headers, for backwards
compatibility.
Update the FILES and INSTALL.txt files to reflect current reality.
fix is to discard unread packets when changing the filter, as that fixes
not only the problem with the *first* filter you set, it fixes the
problem you get when *changing* the filter. That fix is now in the code.
source directory and the target include directory, and have include
files at the top-level directory to include those headers, for backwards
compatibility.
Update the FILES and INSTALL.txt files to reflect current reality.
when building a shared library, build with "-fPIC" on Linux, to
support x86_64;
link with "$(CC) -shared" rather than "ld -shared" when building
a ".so" shared library (as would be done with ELF systems that
use GCC);
add an explicit "-ldag" when building the shared library, so the
DAG library dependency is explicit.
Make gen_load_llrel() add in off_ll if there isn't a variable-length
radio header, so the offset passed to it is always relative to the
beginning of the link-layer header, not the beginning of the packet.
Don't add in off_ll when calling it.
Those changes centralize the addition of off_ll, so it's only done in
one place (rather than twice, where it was done before, meaning that the
offsets were wrong for the Prism and AVS headers as they had 2*off_ll
rather than just off_ll, as off_ll was added twice).