dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

1005 Commits

Author SHA1 Message Date
guy 231404ec64 Add pcap_platform_finddevs() to WinPcap. 2007-09-25 20:34:36 +00:00
guy 92aa745a42 Include <pcap/pcap.h>, as that's now where we're putting it. 2007-09-24 23:26:12 +00:00
guy 6b492f4765 <pcap.h> does its own 'extern "C"'ification; move it outside our 'extern
"C"'ification, just in case some libpcap/WinPcap add-on includes C++
code.
2007-09-24 23:24:02 +00:00
guy e4238ca93c From Paolo Abeni:
Fix the copyright notice.

	Use the new DLT_BLUETOOTH_HCI_H4_WITH_PHDR DLT, and add a
	direction indication.

	Now that we have a direction indication, support
	pcap_setdirection().

Update FILES and INSTALL.txt appropriately, and fix some problems in
INSTALL.txt.
2007-09-22 02:10:17 +00:00
guy 59a4fbc8f7 Add an RCS ID. 2007-09-22 02:06:08 +00:00
gianluca 1cd243c972 Do not compile gai_strerrorA on Windows under MingW. gai_strerror is already
available on MingW, it's only missing from Cygwin.
2007-09-19 16:19:20 +00:00
guy fe7433245e New DLT for Bluetooth H:4 with pseudo-header giving direction.
Add support for additional link types to gencode.c, so we at least
support "link[N:M]" and an empty expression.

Sort the DLT_CHOICE values in order by the DLT_ value, add missing ones,
and fix some existing descriptions.
2007-09-19 02:40:34 +00:00
guy 7b5c683168 From Paolo Abeni: fix copyrights. 2007-09-14 01:55:49 +00:00
guy bc365a5db9 From RCB-ISIS on SourceForge: handle LynxOS, which has AF_PACKET but
puts the if_packet.h header in a different directory from Linux.
2007-09-14 00:44:54 +00:00
guy 6adab105af From OpenBSD: use calloc() to avoid malloc(n * m) overflows. 2007-09-12 21:29:13 +00:00
guy b52473e046 From Max Laier: check whether the system has <net/pfvar.h> and:
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.
2007-09-12 19:09:49 +00:00
hannes 18341fc1b5 allocate DLT_JUNIPER_ST as per request from Hannes Gredler <hannes@juniper.net> 2007-09-10 20:17:18 +00:00
guy 266b20f3d4 Fix a message to speak of Bluetooth rather than USB. 2007-08-18 20:54:52 +00:00
guy 4427ebae83 Add DLT value for IPMI IPMB packets, beginning with the I2C slave
address, followed by the netFn and LUN, etc..  Requested by Chanthy
Toeung.
2007-08-14 20:56:01 +00:00
guy 564ec53397 New DLT value for packets captured from u10 Networks boards; requested
by Phil Mulholland of u10.
2007-08-13 16:51:41 +00:00
guy c3ced24e7e DLT_ERF, for encapsulating Endace ERF records and packet data for
various link-layer types.
2007-08-07 23:51:53 +00:00
mcr c3323f3bc5 fixed up the releasetar target to create proper version numbered symlink/. 2007-07-24 02:36:34 +00:00
mcr a516b44e4f changes from 3.9 branch.
create releasetar file.
2007-07-24 02:25:19 +00:00
guy 16a4196dcf Various link-layer types, with a pseudo-header, for SITA
(http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
2007-07-19 06:19:54 +00:00
guy 1e678955ad So far, two people have submitted patches to "fix" the "memory leak" in
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.
2007-07-15 19:53:54 +00:00
guy 56634b504f Update the WinPcap version number. 2007-06-22 06:45:54 +00:00
guy 0fd3a1a661 From Stephen Donnelly of Endace:
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.
2007-06-22 06:32:06 +00:00
guy 4f278d5429 Check for "/dev/bpf"; if we find it, use BPF as the capture mechanism,
and assume it's a cloning device.
2007-06-15 17:55:50 +00:00
gianluca cf5ea4eeec Added support for PPI. 2007-06-14 22:08:38 +00:00
gianluca 92e7060fb8 Fixed the code that verifies if a PPI packet encapsulates 802.11 frames.
The bug was causing side effects even when the linktype was not PPI.
2007-06-14 20:55:44 +00:00
gianluca ec63ab312c Added more code in the compilation for the PPI linktype: now we generate
code that discards non-802.11 packets.
A couple of mods to remove some compilation warnings with VC6.
2007-06-14 18:49:30 +00:00
gianluca 9c308a3a48 Added some initial support for PPI filter generation. 2007-06-14 18:14:06 +00:00
guy a6186fa56d Pick up changes from NetBSD:
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).
2007-06-11 10:04:24 +00:00
guy 8b2ec43589 Allocate DLT_ for 802.15.4 without any header munging, for Mikko
Saarnivala.

Fix a comment.
2007-06-05 18:02:29 +00:00
guy a8f23f719a Tests for the transport-layer protocol differ based on whether the
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.
2007-05-30 18:05:21 +00:00
hannes 666dd96733 add support for DLT_JUNIPER_ISM 2007-05-24 23:57:36 +00:00
guy b9641d7aed Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
requested by Charles Clancy.
2007-05-04 09:46:55 +00:00
guy d88c8e4d8e It's LINKTYPE_PPI, not SAVEFILE_PPI. 2007-04-19 18:33:53 +00:00
guy 71ebfa7d04 Add a blank line to minimize differences between this and the x.9 branch
pcap-bpf.h.
2007-04-19 18:17:25 +00:00
guy 08a7beca55 Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info)
encapsulated packets. Requested by Gianluca Varenni.
2007-04-19 18:15:03 +00:00
gianluca 355a195db7 Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info)
encapsulated packets. Requested by Gianluca Varenni.
2007-04-19 17:37:54 +00:00
guy 472810539c Define DLT_LOOP as 12 on OpenBSD, for compatibility with its definition.
(LINKTYPE_LOOP is still 108 on all platforms.)
2007-04-05 18:43:49 +00:00
guy 6080a4b2bf Linktype for IEEE 802.15.4, with address fields padded as done by Linux
drivers; requested by  Juergen Schimmer.
2007-04-03 07:18:27 +00:00
guy 42fe978417 Add RCS IDs. 2007-04-01 21:43:55 +00:00
guy 266d42352f Work around a bug in some older versions of libpcap, where the snapshot
length value in the file header is 14 less than the actual maximum
packet length.
2007-04-01 17:06:47 +00:00
guy 83a6a8ab27 From Jung-uk Kim: add support for new FreeBSD BIOCSDIRECTION ioctl. 2007-03-26 01:38:25 +00:00
guy deed686cc8 On NetBSD, include <sys/param.h>; we need it to declare
__NetBSD_Version__.
2007-03-11 21:44:12 +00:00
guy 885670183d From Sepherosa Ziehau: additional filter operations for 802.11 frame
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.
2007-03-11 04:35:23 +00:00
gianluca 04203b96b6 Fixed a bug in pcap_open_live(). The return value of PacketSetHwFilter was
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").
2007-02-19 18:35:06 +00:00
guy d02424cd4c From Florent Drouin: a Link Status Signal Unit is called an LSSU, not an
LSU.  (Leave "lsu" as an alias for backwards compatibility.)
2007-02-08 07:15:27 +00:00
guy a247db420a From Stephen Donnelly: change to handle some name changes in the DAG
library resulting from Endace switching to libtool.
2007-02-08 06:02:42 +00:00
guy 62bf880d23 From Florent Drouin: don't crash if the open of the USB bus directory
fails.
2007-02-01 03:17:20 +00:00
guy d5e7848c1e From Florent Drouin: clean up resources when an open fails.
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".
2007-02-01 02:58:39 +00:00
guy b4c382fd7e From Paolo Abeni:
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.
2007-01-29 20:08:06 +00:00
guy 6db2ddb56a From Paolo Abeni:
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).
2007-01-17 19:31:00 +00:00