Commit Graph

2251 Commits

Author SHA1 Message Date
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Michal Labedzki 579e7e19ce Wireshark: Add option to choose format type of capture file
The best heuristic can fail, so add possibility to manually choose
capture file format type, so not correctly recognize file format can be
loaded in Wireshark.

On the other side now it is possible to open capture file
as file format to be dissected.

Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a
Reviewed-on: https://code.wireshark.org/review/16
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-25 17:43:13 +00:00
Michal Labedzki d574fd89f4 Add support for Bluetooth Linux Monitor
BlueZ 5/Linux Kernel introduced new way to sniffing Bluetooth interfaces.
We are ready to use it. Libpcap provide new interface called
"bluetooth-monior".

Also fix trivial typos.

Change-Id: Ic608a3d8553bbebbb21f2733ec92c758cbf8f707
Reviewed-on: https://code.wireshark.org/review/253
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-20 18:35:29 +00:00
Guy Harris 9a26416e3e Have macros to handle the range check and byte swapping.
Combine the check for whether the field is within the packet data and
the swapping of the field into macros that do both, and use them.

Change-Id: I1db4c5fd76172edd44abc9fb111d79a2537c6c9d
Reviewed-on: https://code.wireshark.org/review/130
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-08 11:30:41 +00:00
Guy Harris 63479adf63 Make some routines take a struct wtap_pkthdr * as an argument.
For some routines that take multiple arguments that come from a struct
wtap_pkthdr, pass a pointer to the struct wtap_pkthdr in question,
rather than the separate arguments.  Do this even if we're passing
expressions that were earlier assigned to the struct wtap_pkthdr fields
in question.  This simplifies the calling sequences and ensures that the
right values are picked up by the called routine; in at least one case
we were *not* passing the right values (the code to handle Simple Packet
Blocks in pcap-ng files).

Also, call the byte-swapping routines for pseudo-header fields only if
we need to do byte-swapping.

Change-Id: I3a8badfcfeb0237dfc1d1014185a67f18c0f2ebe
Reviewed-on: https://code.wireshark.org/review/119
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-02-06 21:35:58 +00:00
Peter Hatina f62450ff93 allow tshark reading from pipes
Change-Id: If20a14b949667911df44f09c6a705b7645d4c49e
Reviewed-on: https://code.wireshark.org/review/85
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-03 13:31:27 +00:00
Edwin Groothuis 05f54f7d6a Fix build on FreeBSD 10.0
Change-Id: I6be0d2dfe3b44f166233b1dd20ef02c10a024f97
Reviewed-on: https://code.wireshark.org/review/74
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
2014-02-02 00:18:59 +00:00
Alexis La Goutte c6022b3b85 Drop support of Visual Studio 2005
* Remove _MSC_VER < 1500 check
* Cleanup config.nmake

See http://www.wireshark.org/lists/wireshark-dev/201305/msg00159.html

svn path=/trunk/; revision=54965
2014-01-26 12:56:32 +00:00
Guy Harris 90d7c5f59b Don't write out packets that have a "captured length" bigger than we're
willing to read or that's bigger than will fit in the file format;
instead, report an error.

For the "I can't write a packet of that type in that file type" error,
report the file type in question.

svn path=/trunk/; revision=54882
2014-01-22 00:26:36 +00:00
Evan Huus dae86605b6 Reject pcap files that claim on-the-wire packet sizes > 64MB. This fixes many
heuristic cases broken in r49999 when we permitted packets > 64KB, since that
relaxed so severely the definition of a valid packet header.

64MB is an arbitrary and perhaps suboptimal number, but it seems to do the right
thing in all the examples I have handy.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9634

svn path=/trunk/; revision=54812
2014-01-15 02:09:11 +00:00
Michael Mann c071a1c728 Bluetooth/Ubertooth improvements. Bug 9606 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9606)
From Michal Labedski

1. add support for new btsnoop "format" introduced by BlueZ team in "btmon" tool
2. Bluetooth: Make EIR, AD and COD more generic
3. Bluetooth: HCI/LL: Update Error Codes to Core 4.1  Specification
4. Ubertooth: Fix response command handling
5. Ubertooth: Update to support firmware version
6. Ubertooth: Dissect by Vendor Id/Product Id

svn path=/trunk/; revision=54699
2014-01-12 00:50:41 +00:00
Anders Broman 05f7044bc7 Make internal functions static
svn path=/trunk/; revision=54686
2014-01-10 07:01:15 +00:00
Michael Mann bf284da2ee TFShark (Terminal Fileshark) v.001. Bug 9607 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9607)
This is a VERY PRELIMINARY version of tfshark.  It's an attempt to jumpstart FileShark and its architecture.  Right now it's mostly just a very stripped down version of tshark with all of the necessary build modifications (including now building filetap library since tfshark depends on it)

This code has helped me identify what I believe to be all of the necessary layers for a complete fileshark architecture.  And those layers will slowly be added in time (patches always welcome!).

svn path=/trunk/; revision=54646
2014-01-08 04:35:28 +00:00
Guy Harris 9d41c658fe No seek-read routines use the length argument, so eliminate it from
wtap_seek_read().

svn path=/trunk/; revision=54570
2014-01-02 20:47:21 +00:00
Guy Harris 11e4e670a4 Don't use the length argument to the seek-read routine; no other
seek-read routine does that.

Pass the length we just filled in to buffer_assure_space() in the
seek-read routine, and use that in the memcpy() as well.

svn path=/trunk/; revision=54568
2014-01-02 20:17:24 +00:00
Guy Harris ac0f903dfa Don't pass the wtap * to a routine if it's not needed.
svn path=/trunk/; revision=54565
2014-01-02 19:39:20 +00:00
Guy Harris e9730c89af Fill in the struct wtap_pkthdr in the seek-read routine.
svn path=/trunk/; revision=54564
2014-01-02 19:33:47 +00:00
Guy Harris 558c885d6d Have a routine that reads and processes the record header, and use it in
both the read and seek-read routines.

Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54549
2014-01-02 09:23:45 +00:00
Guy Harris ce4d667efe Process the packet header and data in common code, shared by the read
and seek-read routines.

svn path=/trunk/; revision=54548
2014-01-02 02:18:04 +00:00
Guy Harris abda7cd1af Read the packet header in the seek-read routines as well as the read
routines.

svn path=/trunk/; revision=54547
2014-01-02 02:16:22 +00:00
Guy Harris 492883cbf1 If the uncompression buffers are empty, they have no data; set the count
of bytes in them to 0, as there's no data in them, and set the offset in
that buffer of the stream's current position, to 0, as we're currently
at the beginning of the file in both streams.

This fixes some tricky-to-reproduce errors (which show up only if the
ngsniffer_t structure is allocated from data that's been allocated,
written to in those variables, and freed).

#BACKPORT 1.8, 1.10

svn path=/trunk/; revision=54544
2014-01-01 23:22:53 +00:00
Guy Harris f878016d6b Back out r54523 - more work is needed on it, and some testing found an
unrelated uninitialized-data bug that I want to fix in the next commit,
and then backport.

svn path=/trunk/; revision=54543
2014-01-01 23:19:17 +00:00
Guy Harris 322e7272a6 Use a common code path for most of both sequential and random file
access.  We currently can't provide a time stamp when randomly reading,
so don't set WTAP_HAS_TS in that case.

svn path=/trunk/; revision=54527
2013-12-31 23:51:10 +00:00
Guy Harris 1e3f101b2e Back out a change so that we can check it in again with the correct
commit message.

svn path=/trunk/; revision=54526
2013-12-31 23:49:09 +00:00
Guy Harris d734fe4562 When reading MIME-encapsulated files, read the entire file at once,
don't break it into chunks.

This means we don't need to do reassembly in the MIME-encapsulated-data
dissector.

svn path=/trunk/; revision=54525
2013-12-31 23:48:02 +00:00
Guy Harris 8387a45fcc When reading MIME-encapsulated files, read the entire file at once,
don't break it into chunks.

This means we don't need to do reassembly in the MIME-encapsulated-data
dissector.

svn path=/trunk/; revision=54524
2013-12-31 23:47:24 +00:00
Guy Harris cdce403745 When reading sequentially, pass the packet data length to
ngsniffer_read_rec_data(), and separatelyskip extra data after that.

When reading randomly, use the packet length read from the packet
header.

svn path=/trunk/; revision=54523
2013-12-31 23:43:54 +00:00
Guy Harris 0dd01761f3 Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54522
2013-12-31 23:41:35 +00:00
Guy Harris 9df5acefab Trust the packet length we calculate when reading packets randomly.
svn path=/trunk/; revision=54521
2013-12-31 23:34:43 +00:00
Guy Harris a628e77311 Make it clearer that we're using the packet length read from the packet
header when reading packets randomly.

svn path=/trunk/; revision=54520
2013-12-31 23:33:49 +00:00
Guy Harris eeda7ec1ae Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54519
2013-12-31 23:32:30 +00:00
Guy Harris cd13dd3782 Use the packet length read from the packet header when reading packets
randomly.

svn path=/trunk/; revision=54518
2013-12-31 23:31:44 +00:00
Guy Harris 31d74c1922 Use the packet length read from the packet header, and check for an EOF
and treat it as an error, when reading packets randomly.

svn path=/trunk/; revision=54517
2013-12-31 23:30:39 +00:00
Guy Harris 4648f411a7 Use the packet length read from the packet header, and check for an EOF
and treat it as an error, when reading packets randomly.

svn path=/trunk/; revision=54516
2013-12-31 23:30:18 +00:00
Guy Harris e1ea055c79 Clean up white space.
svn path=/trunk/; revision=54504
2013-12-30 23:44:42 +00:00
Guy Harris 53cba3e3b9 Add an "ATM reassembly failed" flag for capture file readers to provide,
and set it in NetXRay/Windows Sniffer files if the putative "ATM
reassembly failed" flag is set and, if reassembly failed, don't attempt
to dissect the packet.

svn path=/trunk/; revision=54503
2013-12-30 23:37:12 +00:00
Bill Meier bb4b783a3a Fix a couple of old typos;
Use a consistent formatting style for function defs;
Add editor modelines.

svn path=/trunk/; revision=54501
2013-12-30 22:22:22 +00:00
Guy Harris 2c73dbcd75 Squelch compiler warnings.
svn path=/trunk/; revision=54500
2013-12-30 22:14:45 +00:00
Guy Harris e133ec250b More reverse engineering.
svn path=/trunk/; revision=54497
2013-12-30 20:56:53 +00:00
Guy Harris 5946c5236b For file formats that don't have magic numbers, so they're recognized by
heuristics, but do have a file extension that files of that format are
likely to have, use the extension of the file we're opening, if it has
one, as a hint for which heuristics to try first.

svn path=/trunk/; revision=54495
2013-12-30 06:43:19 +00:00
Martin Kaiser 82f9e9ec68 use the correct record length for an IPv6 record in the NRB
this is already correct in 1.8 and 1.10 and was
accidentially(?) changed in r52176

svn path=/trunk/; revision=54479
2013-12-28 20:37:21 +00:00
Guy Harris e3d4fe8aae Add some new tags seen.
svn path=/trunk/; revision=54460
2013-12-26 12:58:26 +00:00
Jakub Zawadzki 33ef0c2600 isascii(x) && isprint(x) -> g_ascii_isprint(x)
svn path=/trunk/; revision=54328
2013-12-21 15:12:11 +00:00
Jakub Zawadzki 064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Guy Harris 9628624867 Get rid of trailing periods in some error messages for consistency; the
others don't have trailing periods, and the caller adds a period as
desired.

svn path=/trunk/; revision=54199
2013-12-17 21:51:45 +00:00
Gerald Combs 75f1073fe6 Cast away shorten-64-to-32 warnings.
svn path=/trunk/; revision=54101
2013-12-14 18:12:32 +00:00
Gerald Combs 8fde85216a Squelch a bunch of shorten-64-to-32 warnings by parsing all of our
numeric values using strtoul and casting it the result to a guint32.
Hopefully no user or session IDs are negative or greater than 32 bits.

svn path=/trunk/; revision=54100
2013-12-14 18:07:01 +00:00
Guy Harris afa9f611d7 And another one.
svn path=/trunk/; revision=54018
2013-12-13 03:13:40 +00:00
Guy Harris 70e8da2d8c Add some more file types misidentified as VWR files.
svn path=/trunk/; revision=54017
2013-12-13 03:12:42 +00:00