dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

122 Commits

Author SHA1 Message Date
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
guy d9e0597103 Rename DLT_PPP_WITHDIRECTION to DLT_LINUX_PPP_WITHDIRECTION, as it's a
Linux-specific mechanism, and rename other #defines accordingly.  Give
more details about it in comments.
2005-01-31 01:47:27 +00:00
hannes f718fd1835 add support for Juniper PIC Peer DLT_ 2005-01-12 09:15:05 +00:00
guy 1a66ed9ea7 Add new DLT_ values for use in Gcom's T1/E1 line monitoring equipment. 2005-01-11 11:02:08 +00:00
guy c3411874c8 Add a magic number for Navtel Communications. 2005-01-07 11:21:01 +00:00
guy 54b7cfbafb Squelch a (valid) compiler warning. 2004-12-27 01:12:17 +00:00
guy f8a76d1d76 From Gisle Vanem: MS-DOS support. 2004-12-18 08:52:08 +00:00
guy 875d60923d Don't close the input stream if "pcap_fopen_offline()" fails; only do so
in "pcap_open_offline()", where we were the one who opened the stream.
2004-12-17 20:26:16 +00:00
guy efca1c6d92 Report short reads on the file header (as opposed to errors on it)
correctly.
2004-12-15 09:00:11 +00:00
guy 3573dfdacc Put the FDDI padding (if any) into the pcap_t structure on platforms
that require it, and make pcap_fddipad private to the code generator, as
that's the only place that needs it (ideally, all *its* state should be
local as well).  This makes opening an FDDI device, on platforms where
the padding is supplied as part of the packet, and opening other types
of devices or opening savefiles in the same program work better, as you
don't have to be sure you compile the filter for a given pcap_t before
opening the next pcap_t.
2004-12-15 00:25:08 +00:00
guy 84819baa2b Add new DLT_ values and LINKTYPE_ values for G.7041/Y.1303 Generic
Framing Procedure, as per Dumas Hwang (dumas.hwang@navtelcom.com).
2004-12-09 19:03:36 +00:00
guy 1e5f231e7b New link-layer header type for raw GPRS LLC frames, as per a request by
Marc Hermstein <mhermstein@yahoo.com>.
2004-12-07 17:27:45 +00:00
guy 6dc4f10b78 From Dug Song <dugsong@monkey.org>: don't fetch the filter code until
we're about to apply the filter, so that if it's changed by a callback
routine, we get the current filter, rather than the one in effect when
we started the loop.
2004-11-30 10:51:41 +00:00
guy cccbf10006 From Chris Lightfoot <cwrl@users.sourceforge.net>: add
"pcap_dump_fopen()" to open a pcap_t given a FILE *, and add
"pcap_dump_fopen()" to open a pcap_dumper_t given a FILE *.

On Windows, if we're opening the standard input, put it in binary mode.

Check for errors from "sf_write_header()" and return an error if we get
an error.
2004-11-07 21:40:48 +00:00
hannes 00384d8605 allocate DLT_ and LINKTYPE_ 167,168 for Juniper Networks, Inc. 2004-10-20 14:28:49 +00:00
guy e49ca1f08b If we get an error trying to open a capture file, don't close the
capture file if the standard I/O stream is stdin (i.e., if the file name
was "-").  Thanks to Joshua Blanton <jblanton@masaka.cs.ohiou.edu> for
catching this one.
2004-09-28 01:09:52 +00:00
hannes 4017783b36 add support for another PPP variant as per request from Karsten Keil <kkeil@suse.de>
the first byte (0xff) of the PPP header (0xff03) is tweaked to accomodate
the direction 0x00 = IN, 0x01 = OUT

the DLT_ supports the libpcap tokens "inbound" and "outbound"
2004-08-18 14:25:01 +00:00