several files:
date: 2006/02/27 15:53:24; author: drochner; state: Exp;
avoid shadowing globals, for WARNS=2
date: 2006/02/27 15:55:30; author: drochner; state: Exp;
minor constification, good for WARNS=3 now
date: 2006/02/27 15:57:17; author: drochner; state: Exp;
NetBSD adaption:
...
-const pcap_strerror() for consistency
gencode.c:
date: 2006/04/26 09:24:33; author: tron; state: Exp;
Add missing "const" keywords to match declarations in "pcap.h".
date: 2006/10/15 19:27:21; author: christos; state: Exp;
add a volatile variable to prevent vfork/longjmp clobbering.
optimize.c:
date: 2006/05/17 17:48:36; author: drochner; state: Exp;
Make the optimizer use unsigned numbers as the kernel does.
While it is not agreed on that purely unsigned arithmetics is nice,
different behaviour of optimized and unoptimized code is less desirable.
pcap-bpf.c:
date: 2006/02/27 15:51:38; author: drochner; state: Exp;
pull in from NetBSD's libpcap: use cloning bpf device on NetBSD
Have the configure script check for paths.h, so that we can include it
only if we have it, and use the cloning BPF device only if we're on
NetBSD *and* _PATH_BPF is defined (hopefully this will keep us from
using it on versions of NetBSD that don't have a cloning BPF device; if,
in the future, other OSes with BPF get cloning BPF devices, we can make
this work for them as well).
network-layer protocol is IPv4 or IPv6, regardless of the link-layer
protocol. Therefore, we have to check for IPv4 and IPv6, even for
DLT_RAW - do so by checking the version field in the header.
types. Modified to add ieee80211.h from FreeBSD, rather than depending
on the OS supplying the header, and to support all 802.11 radio header
types.
Clean up some link-layer type checks and the messages for failing those
checks.
not checked. This was the culprit of WinPcap failing to capture on wireless
adapters when in promiscuous mode. Most of the wireless adapters drivers
do not support the promiscuous hardware, and fail the HW filter OID request.
This failure was not detected by pcap_open_live(), and resulted in no packets
being captured as no hw filter was actually set at the driver level (no hw filter
means "reject all").
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.