if it does, use that for the pf definitions;
if it doesn't, don't compile in pf support;
as both OpenBSD and FreeBSD have changed the pf definitions and header
format without changing the DLT value, so you can't reliably read
pflog-format libpcap files on a machine running an OS version other than
the one on which the file was generated.
icode_to_fcode() by having it free the bpf_insn array before returning a
pointer to it. Add a comment to icode_to_fcode() explaining why this is
not a leak in icode_to_fcode(), it's a leak in their program, and
indicating how to fix the leak.
This patch introduces support for the DAG ERF type
TYPE_COLOR_MC_HDLC_POS.
The patch also allows appropriate DAG cards (DAG 3.7T, DAG 7.1S)
to optionally produce DLT_MTP2_WITH_PHDR (139) traces when
capturing from channelised HDLC links, as an alternative to
DLT_MTP2 (140). When using the new DLT, the 'DAG channel' is
recorded in the pcap record pseudo header as the 'link_number'.
Basic BPF filtering support for DLT_MTP2_WITH_PHDR is also
added.
Fix some warnings.
Update the version numbers.
Rename SWAP_TS() to SWAPLL() and move it to pcap-int.h, to make the x.9
code more closely match the top-of-tree code.
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.
drivers; requested by Juergen Schimmer.
Also, propagate some changes fromt he main branch, so the x.9 branch has
all the DLT_ and LINKTYPE_ values that the main branch does (so if any
OSes pick up any future x.9-branch releases, people with those OSes will
see the full list, and, if they miss the comments saying "ask
tcpdump-workers if you want a DLT_ value", will perhaps be less likely
to pick their own values and reuse a value we've already assigned).
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".
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.
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.
Copy some stuff for DLT_JUNIPER_VP and DLT_USB from the top of the main
branch.
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.)
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.