dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

138 Commits

Author SHA1 Message Date
guy 9e496cdc75 Add more data types for X2E, requested by Hannes Kaelber. 2008-04-06 18:09:48 +00:00
guy d9b420231a From Paolo Abeni and me: split pcap_open_live() into a "get a pcap_t
handle" routine, an 'activate a pcap_t handle" routine, and some "set
the properties of the pcap_t handle" routines, so that, for example, the
buffer size can be set on a BPF device before the device is bound to an
interface.

Add additional routines to set monitor mode, and make at least an
initial attempt at supporting that on Linux, *BSD, and Mac OS X 10.4 and
10.5.  (Very much "initial" for Linux, which is a twisty little maze of
wireless drivers, many different.)

Have a "timeout" member of the pcap_md structure on all platforms, use
that on Windows instead of the "timeout" member of the pcap_t structure,
and get rid of the "timeout" member of that structure.
2008-04-04 19:37:44 +00:00
guy b322103696 Fix a typo.
Add some new link-layer types for automotive buses, as requested by
Hannes Kaelber.
2008-02-18 20:21:00 +00:00
guy 41995a4191 DLT_ value for IPMB with a Linux-specific pseudo-header,a s requested by
Alexey Neyman.

Add LINKTYPE_ values corresponding to the DLT_ values added earlier.
2007-12-23 04:40:45 +00:00
guy fc6fdb7bee Add DLT_LAPD, for raw LAPD with no pseudo-header, as per Varuna De
Silva.
2007-10-21 08:39:27 +00:00
guy 3a0937cfba On Win32, have pcap_setbuff, pcap_setmode, and pcap_setmintocopy ops, so
add-on capture mechanisms can supply their own code for that.
2007-10-17 18:52:41 +00:00
guy 9dc28aea3e Add DLT_AX25_KISS, for AX.25 with a KISS header, as per discussions in
the tcpdump-workers mailing list in early April, 2007.

Add Richard Stearn's support for DLT_AX25_KISS.
2007-10-05 01:40:14 +00:00
guy afbb1ce722 Based on work from Florent Drouin, split the 32-bit link-layer type
field in a capture file into:

	a 16-bit link-layer type field (it's 16 bits in pcap-NG, and
	that'll probably be enough for the foreseeable future);

	a 10-bit "class" field, indicating the group of link-layer type
	values to which the link-layer type belongs - class 0 is for
	regular DLT_ values, and class 0x224 grandfathers in the NetBSD
	"raw address family" link-layer types;

	a 6-bit "extension" field, storing information about the
	capture, such an indication of whether the packets include an
	FCS and, if so, how many bytes of FCS are present.
2007-09-29 19:33:29 +00:00
guy def1775664 We assign the result of sizeof to sf.hdrsize; make it a size_t. 2007-09-29 00:29:14 +00:00
gianluca 7cbdf2a3a2 Added an explicit int-->size_t cast to avoid a VC compilation warning. 2007-09-27 17:59:07 +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
hannes 18341fc1b5 allocate DLT_JUNIPER_ST as per request from Hannes Gredler <hannes@juniper.net> 2007-09-10 20:17:18 +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
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 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
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
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 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 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 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 d959f6403d From Paolo Abeni: add support for the binary USB sniffing interface in
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.
2006-12-20 03:30:32 +00:00
guy 78ca8b4d49 Add a LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS. 2006-11-27 18:36:57 +00:00
guy 8c2a49b75c DLT_ value added for the Bluetooth HCI UART transport layer for Paolo
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.
2006-10-13 08:46:23 +00:00
guy 084bcf12ea Put the public libpcap headers into a pcap subdirectory in both the
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.
2006-10-04 18:09:21 +00:00
gianluca 3f0f487a1e Added a new DLT and LINKTYPE value for ARINC 653 Interpartition
Communication messages.
2006-07-27 21:02:57 +00:00
gianluca 303bc7bd43 Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the
right value for CAN).
Added the definition of DLT_A429 and LINKTYPE_A429 as #184.
Added these two link layers in the global array dlt_choices.
2006-07-19 20:51:50 +00:00
gianluca 520a3ea559 Added a new DLT and LINKTYPE value for CAN v2.0B frames. 2006-05-20 00:23:45 +00:00
hannes b7d2f597d1 add support for DLT_JUNIPER_VP 2006-05-18 08:40:52 +00:00
hannes 98a1d8cfbd add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay 2005-12-13 13:41:39 +00:00
guy 1e5fb25e2c Add another magic number (we'd have used the Navtel one, except that
nobody from Navtel has ever said whether their format differs from the
standard one anywhere other than the time stamp).
2005-08-29 21:05:05 +00:00
hannes 9ab067e012 allocate 4 new DLTs on behalf of Juniper Networks, Inc. for
prepending meta-information like interface index, interface name
before a standard Ethernet, PPP, Frame Relay, C-HDLC Frame
2005-08-12 19:23:30 +00:00
guy 75b14d240d OK, we'll be putting out 0.9.2 soon, so add the API changes back in
again.
2005-07-07 01:57:00 +00:00
guy 5e92dec088 0.9's already been released, so, for better or worse, we're stuck with
the old names.
2005-07-05 22:31:57 +00:00
guy 727beef298 Rename "direction_t" to "pcap_direction_t", and rename "D_IN" and
"D_OUT" to "PCAP_D_IN" and "PCAP_D_OUT", to avoid potential namespace
collisions, as per a suggestion by Dean Gaudet.
2005-07-05 22:12:17 +00:00
guy 98bddc1384 Add a "pcap_dump_ftell()" routine, to fetch the current offset of a
pcap_dumper_t.  (Just doing an "ftell()" on the result of
"pcap_dump_file()" won't necessarily work on Windows, as Microsoft, in
their infinite wisdom, have multiple different versions of the C library
runtime, and if a DLL is built using one version, and another DLL or an
executable is built with another version, file descriptors and FILE *'s
opened in one of them cannot be used in the other.)
2005-06-03 20:36:19 +00:00
guy 9c2ab752b2 Give a more correct error if you try to set the direction when reading
from a savefile.
2005-05-23 20:30:44 +00:00
risso 520160b903 Renamed fileno to _fileno under MSVC, to avoid a compiler warning. 2005-05-04 19:40:15 +00:00
guy 37bd0411b4 Get rid of a redundant test (if we're in that branch of code, we've set
fp to stdin, so we know it's equal to stdin), and update a comment.
2005-05-01 19:57:31 +00:00
guy 9942a5dd4a Clean up white space. 2005-05-01 19:53:11 +00:00
guy 8561645aa2 Add the SS7 encapsulations to pcap-bpf.h, replacing the unused "raw SS7"
encapsulation with an "MTP2 plus pseudo-header" encapsulation.  Get rid
of "rawss7.h", as the LINKTYPE_RAWSS7 it's mainly dedicated to explain
was never implemented.  Update savefile.c for the changes.
2005-05-01 19:46:27 +00:00
risso 8c2c2e8bdb Fixed the definition of SET_BINMODE(): the correct flag under VC6 is
_O_BINARY (which is accepted by Cygwin, as well).

Moved SET_BINMODE while reading from stdin *before* reading the savefile
header.
2005-04-26 00:54:23 +00:00
guy 9d7ed6809f As per Daniele Orlandi's request, use DLT_LINUX_LAPD rather than
DLT_LAPD (it includes more than just the LAPD header).
2005-04-09 21:15:13 +00:00
guy be07cb1988 At the request of Daniele Orlandi, add DLT_LAPD and LINKTYPE_LAPD for
raw LAPD.
2005-04-07 20:42:45 +00:00
guy 8804809bf5 Add DLT_ values requested by Gregor Maier <gregor@endace.com> of Endace
Measurement Systems.
2005-02-08 20:03:15 +00:00
guy c1401d4725 The DLT_LINUX_PPP_WITHDIRECTION is also used for pppd on some BSDs, so
rename it again to DLT_PPP_PPPD, and rename other #defines to match.

Add backwards-compatibility #defines of DLT_PPP_WITH_DIRECTION and
DLT_LINUX_PPP_WITHDIRECTION for software that used them.
2005-02-08 19:52:18 +00:00