Commit Graph

61136 Commits

Author SHA1 Message Date
Michael Mann 1fed5fef9a Add HTTP Follow stream
This automatically detects and decompresses HTTP along a TCP stream through the use of taps.

Bug: 3528
Change-Id: I8ab832d509700d0da8eabf3c3e514d8511c598d3
Reviewed-on: https://code.wireshark.org/review/13009
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-03 13:36:18 +00:00
Guy Harris ca736cc7b4 No need for "struct nstime_t", "nstime_t" by itself suffices.
(That should also keep people from deciding that they don't want to
include <wsutil/nstime.h>, but still want to use Wireshark nanosecond
times, and do so by sticking a private incomplete definition of "struct
nstime_t" into the code.)

Change-Id: I94e863fe7083ebba254c3a718b85088a89fb6b7d
Reviewed-on: https://code.wireshark.org/review/13022
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03 07:19:34 +00:00
Guy Harris ee1b845fa8 If you want nstime_t, include <wsutil/nstime.h>.
Don't just define struct nstime_t yourself.

Change-Id: I275f53c6c9f34813898e7ffe4493583017fbf7f0
Reviewed-on: https://code.wireshark.org/review/13021
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03 07:13:14 +00:00
Guy Harris 8363733e30 If you want struct e_in6_addr, include <epan/ipv6-utils.h>.
Don't just define it yourself.

(And especially don't define it yourself if you're already including
epan/ipv6-utils.h.)

Change-Id: I9970d0edecef0c820b2a7fdce34509b54e7b3106
Reviewed-on: https://code.wireshark.org/review/13020
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03 04:01:39 +00:00
Guy Harris d4f7f21b51 Clean up error checking and handling.
The TLV length includes the T and the V, so it must be at least 4; fail
if it's not.

If the IPv4 or IPv6 prefix length isn't valid, don't bother trying to
parse the rest of the addresses, just give up.

Don't bother returning offset values that aren't used.

Rename some routines to indicate that they process more than one item.

Add some comments while we're at it.

Change-Id: I6825216f0e7218e230d8d60d958b3c2453a3bb62
Reviewed-on: https://code.wireshark.org/review/13016
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03 03:26:33 +00:00
João Valverde 6326894a40 IPv6: Minor rename, cleanup (Shim6)
Change-Id: Ia799910f72674702c98f146525171d29f1b35432
Reviewed-on: https://code.wireshark.org/review/13006
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-03 02:15:50 +00:00
Alexis La Goutte 305a4f72cb EIGRP: field eigrp.ipv4.destination does not show the correct destination
Reported by Fredrik Lönnman

Bug:11953
Change-Id: Icaff04122e8ed94751ea8aeb4069be2fc2dda52c
Reviewed-on: https://code.wireshark.org/review/13007
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03 02:08:43 +00:00
João Valverde 582e9579e0 proto.c: Disable warning when loading a symbol [-Wpedantic]
Change-Id: I309764e9cd0784c674a3cd91050eb697404561c6
Reviewed-on: https://code.wireshark.org/review/13012
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03 01:40:53 +00:00
João Valverde 4473c67646 Fix some constness issues [-Wcast-qual]
Change-Id: I111558df3d36436ddf5e2728f113b022cc48a713
Reviewed-on: https://code.wireshark.org/review/13013
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03 01:27:47 +00:00
Guy Harris f9df9ffb3f Note that variadic macros *can* be sued.
Change-Id: I15bfda76256e5d1084ad7c64006f93afaf071a9e
Reviewed-on: https://code.wireshark.org/review/13010
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-02 23:18:49 +00:00
Graham Bloice 40a21c0236 Build: On Windows, ensure we have found Cygwin bash
git can be installed (or the path manually set) so that the msys
unix utilities supplied with git (expecially bash) are on the path
and then picked up by CMake.  These utilities are not compatible with
the build and will fail.

This change checks the output of the --version option to the found
executable and ensures "cygwin" is found in the result.  If not found
a FATAL_ERROR message is issued and the CMake generation is stopped.

Change-Id: I0eca014ae194862abbc8dee56d347526691e72cb
Reviewed-on: https://code.wireshark.org/review/13008
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-01-02 22:59:03 +00:00
Thomas Wiens 3866df04dd Moved variable declaration top, to be C89 compliant
Change-Id: I83b96f8cdabbb3ae67172659492f5992c95fbe73
Reviewed-on: https://code.wireshark.org/review/13004
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-02 14:27:10 +00:00
Guy Harris cc4e827a3f Get rid of an unnecessary level of indirection.
Instead of an array of pointers to preference values, have an array
of preference values.

Clean up some white space while we're at it.

Change-Id: Iaa2cf6bcc2a271a5c2645ddbb2dbddba311b413d
Reviewed-on: https://code.wireshark.org/review/13002
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-02 01:09:43 +00:00
Guy Harris 86339e912b Use #defines for the values for the facility_encoding preference.
Change-Id: I496782308e2f2e9605f2256d7a482d50b086e49c
Reviewed-on: https://code.wireshark.org/review/13001
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-02 00:32:19 +00:00
Joerg Mayer 945251627e Update PNG_VERSION to the only version that actually exists.
At least with Qt5.5.1 there is no duplicate clang_64 in the qt path.

Change-Id: I2ac66f246b3c9dbe2155ee8394d31e7d560faaf9
Reviewed-on: https://code.wireshark.org/review/13000
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-01-02 00:11:21 +00:00
Guy Harris 1b444a7e5d ifdef out the decryption code and preferences if LIBGCRYPT isn't defined.
Change-Id: Idf4f1e461d3bc6e85f2760488ad566a4cd70c5ea
Reviewed-on: https://code.wireshark.org/review/12999
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 20:48:27 +00:00
Graham Bloice f15ab3e6c7 DNP3: dissector cleanup
Cleaned up handling of the qualifier field.  Sub-parts are now
identified as the prefix and range rather than index and code.

This has changed the field names;
  dnp3.al.objq.index -> dnp3.al.objq.prefix
  dnp3.al.objq.code  -> dnp3.al.objq.range

and the associated packet tree details text strings.

Change-Id: I42d51b71233303eaf8b37982dd15b5090918630b
Reviewed-on: https://code.wireshark.org/review/12998
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-01-01 20:14:46 +00:00
Michael Mann 376b156333 Only use nibble logic to determine MPLS payload
Bug: 11949
Change-Id: I625d80ce01918bd050889d21236aaa4cde4af8d0
Reviewed-on: https://code.wireshark.org/review/12961
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-01 17:56:42 +00:00
Michael Mann b344107d75 Make color filters part of dissection
Color filters can be seen as a function that takes a tree and display
filters as input and a (possibly empty) coloring rule as output.
This coloring rule is then added to the frame tree and used by the GUI
for coloring the packets list.

From an architectural POV, "coloring" is part of the UI component, but
since it influences the tree, it is something for the dissection
component.

Bug: 5703
Bug: 6099
Change-Id: I73d132ec1dca7262bcb1b55c8481ca564c6161d1
Reviewed-on: https://code.wireshark.org/review/12507
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-01 17:36:11 +00:00
Pascal Quantin b1281c8308 GTK: add a missing cast in dissector_tables_dlg.c
Change-Id: I1f763a6046fc06b221742e70edd39055586e45d0
Reviewed-on: https://code.wireshark.org/review/12990
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-01-01 15:11:40 +00:00
Stig Bjørlykke b8ccf71ef3 Welcome in 2016, part 2
Change-Id: I75f87b78ecec0859d0ebecee39ec257374f86541
Reviewed-on: https://code.wireshark.org/review/12993
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-01 14:28:06 +00:00
Pascal Quantin bd9dfbaf8d Welcome in 2016
Change-Id: I727dcd07093de7cb9381804fbcf4c0e1a99a3d6c
Reviewed-on: https://code.wireshark.org/review/12989
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-01-01 14:08:30 +00:00
Guy Harris 34aeec604e Clean up response matching type preference.
Add #defines for all the value types and use them.

Make the preference static, as it's not used outside this module.

Change-Id: I3ed715701f77d5ea6cc45c8f978d6e2da7b38671
Reviewed-on: https://code.wireshark.org/review/12988
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 05:16:10 +00:00
Guy Harris 1fcf7d7041 Clean up response matching type preference.
Add #defines for all the value types and use them.

Make the preference static, as it's not used outside this module.

Change-Id: Ibd04274b4160d18a55b10f47ce866ac97a76309e
Reviewed-on: https://code.wireshark.org/review/12987
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 05:10:07 +00:00
Guy Harris f499265df7 Get rid of trailing whitespace.
Change-Id: If6347938525194c08465b9b383edf8fb7eaf1e49
Reviewed-on: https://code.wireshark.org/review/12986
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 04:18:06 +00:00
Guy Harris ee9f102aa9 No need for toolkit-dependent color initialization.
We're not allocating colors ourselves in GTK+ (and haven't been doing so
since at least 1.12), and all color_t values are valid colors, so
we don't need any toolkit-specific processing to fill in a color_t.

While we're at it, catch read errors when reading color filter files.

Change-Id: Ieb520d141cf15e371a31a01459d466c95ba2209b
Reviewed-on: https://code.wireshark.org/review/12985
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 04:15:29 +00:00
Guy Harris 93f9416c36 Get rid of the "pixel" member of a color_t.
Now that we're letting GTK+/GDK allocate colors behind the scenes, if it
allocates them at all, there's no reason to save the allocated color in
the toolkit-independent color value.

Change-Id: I99df32bd6b07924f41f3d855d2ddecb3dc8d5201
Reviewed-on: https://code.wireshark.org/review/12983
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 02:05:07 +00:00
Guy Harris f7b3bda9b3 Remove more unused stuff.
Change-Id: I65f8497605cf8534227c85dd2094eeab3e77b4b9
Reviewed-on: https://code.wireshark.org/review/12982
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 01:14:25 +00:00
Guy Harris aaa5ed4ad7 No, you don't have to allocate colors.
That code's been unused since at least 1.12, so apparently it's not
needed.  To the extent that it needs to be allocated at all - which is
the case only if a colormap is being used - it's apparently all done
under the covers.

Change-Id: Ib25bfba618b0af4a60ce991a974de1e3f2f89158
Reviewed-on: https://code.wireshark.org/review/12981
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01 01:12:56 +00:00
Gerald Combs 44eda0c64e CPack: WiX updates.
WiX prefers rich text license files. Add an RTF version of the GPLv2. It
was created by converting the "standalone HTML" version of the license at

  http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html

to RTF using Pandoc 1.11.

Start splitting CPackConfig.txt into Win32 and non-Win32 sections. Add
a WiX section.

Change-Id: Ifcb233053c8a2158f087b69c69de7df869af65aa
Reviewed-on: https://code.wireshark.org/review/12980
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-01 01:00:08 +00:00
João Valverde 146c4b7016 uat: Fix warnings [-Wcast-qual]
uat_fld_tostr_cb_t callback *out_ptr argument is g_mallocated and
is to be freed by the caller so drop constness requirement to fix
the corresponding g_free warnings.

Change-Id: I1be25fa3e2f54fb32058ac0b5c1631b193b07701
Reviewed-on: https://code.wireshark.org/review/12943
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:56:34 +00:00
Guy Harris c14df7f7a8 Don't allocate something until we know we need it.
From change I1be25fa3e2f54fb32058ac0b5c1631b193b07701.

Change-Id: Iad01cd4c5920afcdc1f8329937f4141cf8bc0ab4
Reviewed-on: https://code.wireshark.org/review/12979
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:54:27 +00:00
Guy Harris 01dc475484 Don't cast away constness.
Save a non-const pointer and use it when freeing.

Fix some indentation while we're at it.

Change-Id: Iad2451130c4d1f252ad9f63b12205cd1aae70eb7
Reviewed-on: https://code.wireshark.org/review/12978
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:41:06 +00:00
Guy Harris 5c06954565 Squelch a compiler warning.
Change-Id: I8933cbc250e3d1a3c6867f8166bc5b584b82211c
Reviewed-on: https://code.wireshark.org/review/12977
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:38:32 +00:00
Guy Harris 07d0a59cb4 Don't cast away constness.
Change-Id: I37a1923c2e463346244cd5e56daf22122d119d78
Reviewed-on: https://code.wireshark.org/review/12976
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:34:20 +00:00
Guy Harris bf0c98d53b Don't cast away constness.
Change-Id: I14130b4be91f36a4dbc187f2eef6d6c438a75774
Reviewed-on: https://code.wireshark.org/review/12975
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:30:13 +00:00
Guy Harris 66ea7e45a3 Don't cast away constness.
Change-Id: I529d37e57b12fa7515f2bd18a013618b50300231
Reviewed-on: https://code.wireshark.org/review/12974
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:25:36 +00:00
Guy Harris 2724222ab1 Don't cast away constness.
Change-Id: I6339381a052547944cfdb6c0c4d93fabf1cbd1ae
Reviewed-on: https://code.wireshark.org/review/12973
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:14:10 +00:00
Guy Harris 87a2fb55f7 Don't cast away constness.
Change-Id: I6b5a6099cd90f2e148625c1a1eb3fb36262e8c39
Reviewed-on: https://code.wireshark.org/review/12972
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:09:44 +00:00
Guy Harris ff435f9fcc Don't cast away constness.
Change-Id: I8ca89bea19d7d014b81713455c85d2253f906058
Reviewed-on: https://code.wireshark.org/review/12971
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:03:43 +00:00
Guy Harris 0a21bc3d56 Use wmem_strdup_printf().
Change-Id: Ifb9dd16ab4435c23ea2914e16a65a17f9c61c0cb
Reviewed-on: https://code.wireshark.org/review/12970
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:02:31 +00:00
Guy Harris 29aab1b066 Clean up setting the port and address.
Change-Id: I2384424c410e83d299e810467734bfc5428d1182
Reviewed-on: https://code.wireshark.org/review/12969
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 21:47:34 +00:00
Guy Harris 12937fc071 Don't cast away constness.
Change-Id: I75c782185b8847abf8c985572d8280271ba00a5a
Reviewed-on: https://code.wireshark.org/review/12968
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 21:34:24 +00:00
Guy Harris a222efad75 Get rid of unused #defines.
Change-Id: I589d8c9b99425eb1893d61e4730864f0b2718acf
Reviewed-on: https://code.wireshark.org/review/12967
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 21:32:06 +00:00
Guy Harris 5a60c0d72e Use wmem_memdup() instead of wmem_alloc() followed by memcpy().
This also fixes a case where, if nfs_fh->len wasn't a multiple of 4, the
allocated buffer was too short, by the difference between the next lower
multiple of 4 and nfs_fh->len, so the memcpy() went past the end of the
buffer.  (And, yes, an NFSv3 file handle can have a byte count that's
not a multiple of 4 - it's a variable-length opaque type - even if the
marshalled data is padded with 0s to a multiple of 4 bytes, as with
other XDR types.)

Change-Id: I689d4b365e8a1547428a1580884f66177dc5841b
Reviewed-on: https://code.wireshark.org/review/12964
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 21:26:53 +00:00
Guy Harris 31956f98d0 Don't throw away constness.
Change-Id: Ia0b014c3d9e4fcaa6f81cdb23dc76f9d384b782b
Reviewed-on: https://code.wireshark.org/review/12963
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 20:55:39 +00:00
Guy Harris 1ea011b891 Use wmem_memdup() instead of wmem_alloc() followed by memcpy().
Change-Id: Ia937fe15a371a3109178ba619dbdb3a6db3897ee
Reviewed-on: https://code.wireshark.org/review/12962
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 20:52:24 +00:00
João Valverde 2bc6530a99 lemon: Fix warnings [-Wcast-qual]
Change-Id: I2b9efa50cf6385622601d2a80f4cc51691d080a1
Reviewed-on: https://code.wireshark.org/review/12960
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 20:13:28 +00:00
Martin Kaiser c59f7f9a66 [iso14443] continue dissection of the ATS
display the individual bytes
the next step is to dissect the meaning of their bits

Change-Id: Id93bcdb3913886365dbd0fb3fdedc7ed0c63be93
Reviewed-on: https://code.wireshark.org/review/12957
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-31 16:03:01 +00:00
Gerald Combs a63b3090a0 Revert "CPack: Use COPYTING.txt as the license file."
Looks like we need to fix a dependency.

This reverts commit 61cde08a95.

Change-Id: I490b826f20fbefbf169b63816916bfe784609610
Reviewed-on: https://code.wireshark.org/review/12956
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-30 23:53:21 +00:00