Commit Graph

186 Commits

Author SHA1 Message Date
Guy Harris 7be78a2d55 Treat 13 as if it came from OpenBSD except on BSD/OS, so that if there
are any BSD/OS users still out there using Wireshark to read RFC 1483
ATM captures from BSD/OS, they can still do so, but all other users get
to read OpenBSD DLT_ENC captures, not just users *on* OpenBSD.

That also lets us simplify some hacks to deal with a link-layer type of
13 on Nokia IPSO captures.

svn path=/trunk/; revision=30159
2009-09-25 21:55:39 +00:00
Michael Tüxen ce11d99c12 Fix copy/paste error introduced in rev. 28863.
Thanks to Guy for finding and reporting it. 

svn path=/trunk/; revision=28865
2009-06-27 18:10:10 +00:00
Michael Tüxen dce1889fd7 Cleanup. Should be included in Wireshark 1.2.1 and higher to keep
merging future bug fixes simple.

svn path=/trunk/; revision=28863
2009-06-27 16:08:18 +00:00
Michael Tüxen 6ce8546ecd This patch
* adds an encapsulation argument to pcap_write_phdr.
* writes the pseudo header when writing pcapng files.

This fixes a bug where you could not write pcapng files
when using encapsulations requiring pseudo headers.

svn path=/trunk/; revision=28859
2009-06-27 12:41:06 +00:00
Michael Tüxen 267df8e183 This commit
* adds an encap argument to pcap_process_pseudo_header.
* adds support for reading pseudo headers.
It fixes Bug 3560.
Thanks to Tyson Key for reporting the bug and providing
trace files. This fix will be scheduled for inclusion in
Wireshark 1.2.1 and higher.

svn path=/trunk/; revision=28857
2009-06-27 11:39:47 +00:00
Guy Harris 7d5afce08f When doing a seek-and-read, don't check the packet size, as we don't
have it (we have the size with the pseudo-header length already
removed); we've already read the packet, and thus have already checked
it.  Fixes bug 3501.

svn path=/trunk/; revision=28607
2009-06-02 19:06:05 +00:00
Guy Harris a60cae6935 Move pseudo-header routines from libpcap.c to pcap-common.c, for use
with pcap-NG files.

svn path=/trunk/; revision=28184
2009-04-27 19:39:06 +00:00
Guy Harris 18a3b0659c Have the libpcap and pcap-NG code share the LINKTYPE_-to-WTAP_ENCAP_
mapping table - they should be using the same values.  Share the mapping
routines as well.

svn path=/trunk/; revision=28173
2009-04-27 09:28:28 +00:00
Guy Harris ad33ca6c2f Clean up some 64-bit issues.
svn path=/trunk/; revision=28117
2009-04-22 03:07:37 +00:00
Guy Harris f6f84ae1dc Name changes to match libpcap name change of the corresponding DLT_
value.

svn path=/trunk/; revision=27113
2008-12-24 20:18:01 +00:00
Guy Harris d2cbbe0a2a Handle the new DLT_USB_LINUX_MMAP link-layer type.
svn path=/trunk/; revision=27099
2008-12-23 19:50:21 +00:00
Guy Harris 29a7854093 Move wtap_pcap_encap_to_wtap_encap() and wtap_wtap_encap_to_pcap_encap()
back to libwiretap for now, as it's inherently tied to reading libpcap
files; at some point we might want to have pcap-reading (and
pcap-ng-reading?) code in a separate library, for use by, for example,
dumpcap (and rawshark?).

svn path=/trunk/; revision=27076
2008-12-22 00:06:12 +00:00
Gerald Combs 62d20ccfb6 For libpcap captures with the DLT DLT_BLUETOOTH_HCI_H4, make sure we
initialize the P2P direction. This keeps Valgrind from complaining.

svn path=/trunk/; revision=26765
2008-11-13 00:36:52 +00:00
Anders Broman 637761d295 From Francesco Fusco:
Endace ERFII (extension header) support.

svn path=/trunk/; revision=26287
2008-09-29 16:20:24 +00:00
Gerald Combs 80e94e3ec3 Move wtap_pcap_encap_to_wtap_encap and wtap_wtap_encap_to_pcap_encap to
libwsutil.

svn path=/trunk/; revision=26233
2008-09-19 16:26:37 +00:00
Anders Broman 3eadb385c3 From Alexey Neyman:
Implement dissector for IPMB (DLT_IPMB_LINUX, 209).

svn path=/trunk/; revision=25986
2008-08-12 04:44:35 +00:00
Guy Harris c0f20c9e07 Fix references to tcpdump-workers@tcpdump.org to refer to the new
address, tcpdump-workers@lists.tcpdump.org.

svn path=/trunk/; revision=25396
2008-05-30 01:47:57 +00:00
Anders Broman 155cb22957 From Hannes Kälber:
new WTAP_ENCAP files(X2E Xoraya serial frame and X2E Xoraya frame )
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2418

svn path=/trunk/; revision=25154
2008-04-23 20:23:09 +00:00
Gerald Combs 335927f46f From Hannes Kalber:
This patch adds some new ENCAP and FILE types for wiretap. It also adds new
entries to pcap_to_wtap_map[] to provide a mapping of the new types to some
pcap DLTs.

svn path=/trunk/; revision=24622
2008-03-14 00:01:51 +00:00
Anders Broman f9ad87dd7c From Owen Kirby :
IEEE 802.15.4 dissector and DLT_ type.

svn path=/trunk/; revision=24564
2008-03-05 20:30:03 +00:00
Jeff Morriss 810979a0b4 Add support for DLT_IPMB (199). The dissector for these packets is in http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1970 (pending review)
svn path=/trunk/; revision=24463
2008-02-25 21:55:41 +00:00
Jeff Morriss ed88c589b0 Add support for DLT_SCCP (SCCP without MTP2, MTP3, or any pseudo-header).
svn path=/trunk/; revision=24119
2008-01-17 17:55:38 +00:00
Stig Bjørlykke fa34d46851 From Fulko Hew:
1/ patches to support the libpcap/SITA format 'WTAP_ENCAP_SITA'.
2/ patches to the LAPB dissector to accept MLP (Multi-link protocol)
   (although MLP dissection has _not_ been added (yet)).
3/ New protocol dissectors for:
   a) SITA's WAN layer 0 status header,
   b) An airline protocol ALC,
   c) An airline (and other industry) protocol UTS.

These patches are submitted as a set since the new protocol dissectors are not
useful without the libpcap/SITA related changes, and there is no point in
having those changes without the additional dissectors.

This fixes bug/enhancement 2016.

svn path=/trunk/; revision=23885
2007-12-16 14:21:37 +00:00
Stig Bjørlykke 672659c0c2 From Marton Nemeth:
Error message when capturing too short WTAP_ENCAP_USB_LINUX type packets
contains a copy-paste typo.

From me:
Fix some addresses in AUTHORS.

svn path=/trunk/; revision=23882
2007-12-16 13:01:13 +00:00
Guy Harris 0ca5f6ace4 Get rid of wtap_process_pcap_packet(); it's no longer used. Get rid of
no-longer-needed wiretap/wtap-capture.h.

Clean up wiretap/libwiretap.vcproj (note: this isn't going to scale, if
it has to contain a list of all the files, as most committers will be
editing only Makefile.common files).

svn path=/trunk/; revision=23803
2007-12-08 00:10:33 +00:00
Guy Harris 4408764e69 HAVE_PCAP_H is no longer defined; just use HAVE_LIBPCAP.
Fix indentation.

svn path=/trunk/; revision=23798
2007-12-07 23:42:19 +00:00
Ulf Lamping 99d60cce59 first steps to support MSVC 2008 Express Edition
svn path=/trunk/; revision=23691
2007-11-30 22:01:05 +00:00
Sake Blok f0313f6407 Bug 1751: From Allan M. Madsen :
When trying to open a pcap file with the new pseudo-header/DLT (using SVN
version, changelist 23283) I get the error message:
"libpcap: ERF file has a 13-byte packet, too small to have even an ERF
pseudo-header".

After reviewing Paolo's patch I found that there are 2 places with missing
breaks in switch case structures.



svn path=/trunk/; revision=23298
2007-10-28 18:52:45 +00:00
Jeff Morriss 0f82a3e7e8 From Paolo Abeni via bug 1751:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1751

The patch adds support to wiretap for a new libpcap DLT for bluetooth captures.
This DLT carries the direction information, which now can be displayed
correctly.
The hci H4 dissector is updated to handle also the newly introduced wtap encap.

svn path=/trunk/; revision=23208
2007-10-16 17:19:16 +00:00
Anders Broman b9f9b33e0e From Florent DROUIN:
This is a replacement of the existing decoding of ERF files (Extensible Record
Format from Endace). 
For the decoding of the ERF files, according to the "type of record" given in
the ERF header, several decoders can be used. Up to now, the decoder is
determined according to an environment variable, or with a kind of heuristic.
And, all the treatment is done during the file extraction.

The new architecture, will separate the ERF file decoding, and the ERF record
decoding. The ERF records will be decoded with a specific dissector. This
dissector can be configured with options, to replace the environment variable.

http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1839

svn path=/trunk/; revision=23092
2007-10-08 11:41:21 +00:00
Jaap Keuter 42ee794742 From Pieter de Boer:
tshark can read a HP-UX nettl IP packet dump (written with 'nettl -traceon all
-entity ns_ls_ip -file dump'), but cannot convert it to a pcap raw IP packet
dump, with 'tshark -r dump.nettl -w dump.pcap'. A single-line patch to
wiretap/libpcap.c makes it possible to do this.

The input file uses encapsulation type WTAP_ENCAP_NETTL_RAW_IP.

svn path=/trunk/; revision=22849
2007-09-11 21:31:21 +00:00
Gerald Combs d1a745f27b Add support for PPI (the Per-Packet Information header), described at
http://www.cacetech.com/documents/PPI_Header_format_1.0.pdf .

svn path=/trunk/; revision=22094
2007-06-13 22:36:58 +00:00
Guy Harris 00c0d3de9f Throw in some casts to suppress warnings.
svn path=/trunk/; revision=21971
2007-05-28 08:31:18 +00:00
Guy Harris e49fe5baec Change the Wiretap code so that it doesn't dereference
possibly-unaligned pointers, and turn on -Wcast-align so at least some
future code that does that will fail to compile.

svn path=/trunk/; revision=21968
2007-05-28 06:47:50 +00:00
Jörg Mayer 8f3934e243 Beginnings of a Cisco ERSPAN dissector - the only thing missing is the code
to actually call this (aka to handle the ambiguities of DLT values).

svn path=/trunk/; revision=21427
2007-04-14 01:07:36 +00:00
Ulf Lamping 77ec324774 set compiler option "treat warnings as errors" - to prevent new warnings for wiretap
remove all compiler warnings:
a) prevent wrong malloc/free definitions by lex/yacc generated files
b) add int/time_t casts - MSVC2005 is more "sensitive" about this than MSVC6

svn path=/trunk/; revision=21078
2007-03-21 01:32:50 +00:00
Guy Harris 9633ac8fee From Paolo Abeni: update to support the new DLT_USB_LINUX format header.
Modified to support the header as a pseudo_header rather than as part of
the packet data.

Fixed some calls that fetch data from the USB packet to fetch it in
little-endian byte order.

Got rid of redundant code to get conversation-specific data (the
get_usb_conv_info() call already does that).

For control packets, only parse the setup information if setup_flag is
0.

Don't interpret a control packet as a standard request unless the setup
type is "Standard".

svn path=/trunk/; revision=20632
2007-01-30 20:07:55 +00:00
Guy Harris 0e89a5617f We support nanosecond resolution in Wiretap; use that with AIX libpcap
files.

svn path=/trunk/; revision=20338
2007-01-08 02:55:41 +00:00
Guy Harris 8d8a1cb32a Map a DLT_ value of 188 to WTAP_ENCAP_IEEE802_16_MAC_CPS, and clarify
what a DLT_ value of 187 is.

svn path=/trunk/; revision=20004
2006-11-27 18:41:45 +00:00
Gerald Combs d20f77d3ec Add a plain "radiotap.channel" field to the radiotap dissector.
Check for an invalid channel frequency.  Pass the channel, data rate,
and quality to the 802.11 dissector, so that they show up there
as well.  Clean up whitespace.

svn path=/trunk/; revision=19878
2006-11-12 00:52:05 +00:00
Ulf Lamping 59d6c8ea33 change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!

svn path=/trunk/; revision=19814
2006-11-05 22:46:44 +00:00
Jörg Mayer e8869dffb9 Paolo Abeni:
the attached patch add support for the recently introduced pcap
bluetooth data link type. Yes, pcap is going to support also bluetooth
devices (at least on Linux) :-)


svn path=/trunk/; revision=19513
2006-10-13 15:18:10 +00:00
Ronnie Sahlberg 26f642778f From Paolo Abeni
USB dissector


svn path=/trunk/; revision=19480
2006-10-10 21:00:35 +00:00
Anders Broman d221d6f2fc From Hannes Gredler:
A patch that adds support for dissection of
libpcap DLT_JUNIPER_VP frames. In addition i have fixed
also the indent for DLT_JUNIPER_GGSN.

svn path=/trunk/; revision=18940
2006-08-17 20:24:05 +00:00
Anders Broman 7056661eac Ethareal->Wireshark
svn path=/trunk/; revision=18230
2006-05-28 15:56:15 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Anders Broman 497e0ec775 From Daniele Orlandi:
The attached patch adds support for LAPD frames captured using vISDN thru 
libpcap. The support has already been included in libpcap.

The patch adds a new wiretap encapsulation, the necessary glue to decode 
SLL-encapsulated frames, and some minor change in the LAPD dissector in order 
to support the remote-to-remote frames captured on the ISDN E-Channel.

Please apply ethereal-encap-table.diff before, as it fixes a misalignment in 
the encapsulation names table.

svn path=/trunk/; revision=17450
2006-03-02 21:28:05 +00:00
Luis Ontanon 5113ab4d4a Add support for Juniper GGSN generated pcap files.
svn path=/trunk/; revision=16857
2005-12-19 19:18:20 +00:00
Anders Broman df21536710 From Hannes Gredler:
patch to support 4 additional juniper DLTs.

all those are wrappers for exisiting media types augmented with meta-information which gets also displayed using this patch;

svn path=/trunk/; revision=15908
2005-09-20 20:25:55 +00:00
Ulf Lamping 84cf7ce767 added compression support for capture file output. The Save/As dialog now has a checkbox "Compress with gzip"
currently limited to Ethereal and all the variants of libpcap filetypes only.

We might want to add output compression support to the other tools as well (tethereal, mergecap, ...).

We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek.

One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). 

Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ...

svn path=/trunk/; revision=15804
2005-09-14 21:57:30 +00:00