metze/wireshark/wip.git
9 years agoJust have init_progfile_dir() take a void pointer.
Guy Harris [Fri, 20 Feb 2015 00:23:39 +0000 (16:23 -0800)]
Just have init_progfile_dir() take a void pointer.

dladdr() takes a void * as a code pointer; have init_progfile_dir() do
so, and do the casting in the calls.  We don't care about the signature
of the function whose address we're passing, we just want to pass a
pointer to *something* in the main program.

Change-Id: I9372620a97b0eb53c2bb3c0c41a238b4408f3709
Reviewed-on: https://code.wireshark.org/review/7270
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoQt: Fix automatic update status in welcome screen.
Gerald Combs [Thu, 19 Feb 2015 23:18:44 +0000 (15:18 -0800)]
Qt: Fix automatic update status in welcome screen.

Wait until the application has been initialized before checking
prefs.gui_update_enabled.

Change-Id: I6e52ba26064b6c5b882992c30c76b65d4a618848
Reviewed-on: https://code.wireshark.org/review/7268
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoRemove quotes from an Nmake macro.
Gerald Combs [Thu, 19 Feb 2015 23:04:15 +0000 (15:04 -0800)]
Remove quotes from an Nmake macro.

Change-Id: Ibe6a544af49c39c12ce13264fb010ccdc54d471b
Reviewed-on: https://code.wireshark.org/review/7267
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoQt: Add more version and packaging information to the main window.
Gerald Combs [Tue, 10 Feb 2015 21:48:48 +0000 (13:48 -0800)]
Qt: Add more version and packaging information to the main window.

Add a "flavor" (for lack of a better word) banner, which can be set at
build time via WIRESHARK_VERSION_FLAVOR / VERSION_FLAVOR. Set it to
"Development Build" by default. This effectively migrates the
"DEVELOPMENT VERSION" logo image text from the GTK+ UI.

Add full release and automatic update information at the bottom.

Remove the short version from the welcome banner (top left).

To do:

- Add back support for gui_version_placement.

- Move the version and repository branch to the flavor label?

- Add update links as appropriate to the bottom.

- Clean up layout and spacing.

Change-Id: I28af33e6c2beb855f803a2dfedef49f3e8389057
Reviewed-on: https://code.wireshark.org/review/7071
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoRename packet-nbns.c to packet-nbt.c to reflect that it's not just NBNS.
Guy Harris [Thu, 19 Feb 2015 21:29:20 +0000 (13:29 -0800)]
Rename packet-nbns.c to packet-nbt.c to reflect that it's not just NBNS.

packet-nbt.c handles all of NetBIOS-over-TCP, not just the name service;
the file name is historical.

Change-Id: I333d331fd9453cea8d1d7595b4fd2650f0a92e98
Reviewed-on: https://code.wireshark.org/review/7259
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years ago[bmp] Adding dissector for BGP Monitoring Protocol
Ebben Aries [Mon, 9 Feb 2015 18:20:20 +0000 (10:20 -0800)]
[bmp] Adding dissector for BGP Monitoring Protocol

* Support per draft-ietf-grow-bmp-07

Change-Id: Iadb833157e7832077429c048e28e9814da29e2c6
Reviewed-on: https://code.wireshark.org/review/7192
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years agolibnl: disable pedantic warning of libnl lib
Alexis La Goutte [Wed, 18 Feb 2015 19:00:38 +0000 (20:00 +0100)]
libnl: disable pedantic warning of libnl lib

Part 2...

Change-Id: I47b74c81ee7b7cd8296ce9da5a60ad6aecef8c78
Reviewed-on: https://code.wireshark.org/review/7239
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years agoQt Wireshark - Once a live capture is stopped the title bar persists in reporting...
Alexis La Goutte [Tue, 10 Feb 2015 10:02:42 +0000 (11:02 +0100)]
Qt Wireshark - Once a live capture is stopped the title bar persists in reporting "Capturing from interface name"

With Qt Wireshark the title bar persists in reporting "Capturing from <interface name>" even though capturing has stopped.

With GTK Wireshark once a live capture is stopped the title bar is updated to report the interface name(s) used for the unsaved capture file.

Issue reported by Jim Young

Bug:10948
Change-Id: Ia6099f63f82b6610ade5c81af0cf257236f076ec
Reviewed-on: https://code.wireshark.org/review/7050
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoopenSAFETY: Merge both CT values
Roland Knall [Thu, 19 Feb 2015 14:16:51 +0000 (15:16 +0100)]
openSAFETY: Merge both CT values

 Both values mean the same thing and should be found using
 the same hf_field, as this eases debugging scenarios.

Change-Id: I23f675e22623b5e66354708319a41dcf34143e30
Reviewed-on: https://code.wireshark.org/review/7257
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
9 years agopatch for PMIPv6 MAG GPS coordinates
Osman Sakalla [Thu, 19 Feb 2015 14:46:38 +0000 (15:46 +0100)]
patch for PMIPv6 MAG GPS coordinates

Change-Id: I25bbd67775e19c2a0199507538b7dcfe5ce28bf6
Reviewed-on: https://code.wireshark.org/review/7256
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoBugfix in nbns dissector.
Dario Lombardo [Wed, 18 Feb 2015 22:55:51 +0000 (23:55 +0100)]
Bugfix in nbns dissector.

Change-Id: I5375a1ae2e48fe0c7ff6e3dde24b8d7b02b1f27f
Reviewed-on: https://code.wireshark.org/review/7251
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoDocumentation fix (reported by Richard Sharpe).
Dario Lombardo [Wed, 18 Feb 2015 18:07:22 +0000 (19:07 +0100)]
Documentation fix (reported by Richard Sharpe).

Change-Id: Ie4979c1be0e325178e3c662e0b2c5bbfc58456d9
Reviewed-on: https://code.wireshark.org/review/7252
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoAdd some casts to satisfy the various compilers.
AndersBroman [Thu, 19 Feb 2015 14:21:34 +0000 (15:21 +0100)]
Add some casts to satisfy the various compilers.

Change-Id: I7687fc0b433774fe447757af00bdaa2fc44ac59d
Reviewed-on: https://code.wireshark.org/review/7254
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoAdd some casts to satisfy the various compilers.
Jeff Morriss [Thu, 19 Feb 2015 14:11:06 +0000 (09:11 -0500)]
Add some casts to satisfy the various compilers.

Change-Id: Ic6a1124da986555d07cfeb71167b74f192c1c062
Reviewed-on: https://code.wireshark.org/review/7253
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
9 years agoAdd name resolution support to address type.
Michael Mann [Thu, 12 Feb 2015 17:03:49 +0000 (12:03 -0500)]
Add name resolution support to address type.

Add address_with_resolution_to_str API that returns address string + name resolution in the format %s (%s), first string is resolved name (if available) and second string is raw address string.

Convert AT_FCWWN to using proper name resolution format

First use of address_with_resolution_to_str with field types in proto.c

Change-Id: I2ae77c29a4ffc30bb919fbec00f06629830898c2
Reviewed-on: https://code.wireshark.org/review/7196
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoDon't put CORBA IDL dissectors in ASN1_ variables.
Guy Harris [Thu, 19 Feb 2015 10:14:39 +0000 (02:14 -0800)]
Don't put CORBA IDL dissectors in ASN1_ variables.

Put them into separate CORBA_IDL_ variables, to keep the two types of
generated dissectors separate.

Change-Id: I4eb091a76ba5bc7d73533ef38fb29adc12a8ec42
Reviewed-on: https://code.wireshark.org/review/7250
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agolupdate for Italian (new strings translated)
Vincenzo Reale [Tue, 17 Feb 2015 17:39:32 +0000 (18:39 +0100)]
lupdate for Italian (new strings translated)

Change-Id: I22ecf6950d47b63d5512c029d745b75be932554d
Reviewed-on: https://code.wireshark.org/review/7197
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoAdd a dissector for Microsoft's SSTP protocol.
Hofer Manuel [Thu, 15 Jan 2015 02:15:05 +0000 (21:15 -0500)]
Add a dissector for Microsoft's SSTP protocol.

... with some changes from Jeff Morriss:
- Change how SSTP is "registered": rather than trying something complicated,
  just put the intelligence for recognizing SSTP into the HTTP dissector.
  (This does mean the SSTP dissector needs to do its own desegmentation now
  but it makes things much cleaner.)
- Use proto_tree_add_subtree_format() instead of proto_tree_add_text() +
  proto_item_add_subtree().
- The messagetype is 16 bits, use tvb_get_guint16() instead of tvb_get_guint8()
  (fixes COL_INFO display)
- A few other few misc. cleanups

(I didn't update NEWS because I can no longer build NEWS without adding UTF8
fancy quotes and so forth.)

Bug: 8239
Change-Id: I3631ae65f67bea69815ccf43472fdbcac3ca3499
Reviewed-on: https://code.wireshark.org/review/7227
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agossl: check for minimal SSLv3/TLS record size
Peter Wu [Wed, 18 Feb 2015 12:01:33 +0000 (13:01 +0100)]
ssl: check for minimal SSLv3/TLS record size

When a TLS record is fragmented over multiple TCP segments, with its
first byte in one segment, and the remainder over the others,
ssl_looks_like_sslv3() throws an exception because it tries to access
the third byte.

This breaks the encryption state, resulting in very weird (scrambled)
decrypted data. To fix this, check the record size before using it. Also
add TLSv1.1 and TLSv1.2 as known version.

Change-Id: Ie0ca78302a5d6c4241ea699d2ef6f7b873dd51ee
Reviewed-on: https://code.wireshark.org/review/7234
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoThat's not an ASN.1 dissector (and gets warnings).
Guy Harris [Thu, 19 Feb 2015 04:33:49 +0000 (20:33 -0800)]
That's not an ASN.1 dissector (and gets warnings).

Change-Id: I55b49080c64a44c1e5752ab986cb6b27772d14db
Reviewed-on: https://code.wireshark.org/review/7248
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoMove some ASN.1 dissectors to the clean list.
Guy Harris [Wed, 18 Feb 2015 20:51:43 +0000 (12:51 -0800)]
Move some ASN.1 dissectors to the clean list.

Change-Id: If642132eb4a2b77db5e56b150b85f064b4b10b30
Reviewed-on: https://code.wireshark.org/review/7244
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoCheck whether emmintrin.h can be used *without* -msse4.2.
Guy Harris [Thu, 19 Feb 2015 01:16:04 +0000 (17:16 -0800)]
Check whether emmintrin.h can be used *without* -msse4.2.

If not, we can't use SSE 4.2, as we need to be able to include it in
files that use tvb_pbrk_compile()/tvb_pbrk_exec() even if they're not
compiled with -msse4.2 (most files aren't, as we need to isolate SSE 4.2
instructions to a small bit of code that uses them only if running on
hardware that supports them).

Change-Id: I62262a3c45fa14e200967916ac0ffc283f8e322c
Reviewed-on: https://code.wireshark.org/review/7246
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoNot all compilers support turning of "format=".
Guy Harris [Wed, 18 Feb 2015 20:11:34 +0000 (12:11 -0800)]
Not all compilers support turning of "format=".

The clang on my machine doesn't; just do "format" instead.  (The best
way to handle this may be to do the formatting ourselves, so that we can
get thousands separators on *all* platforms, regardless of whether its
printf formatter supports it.)

Change-Id: I1948d1799688cb3cf1d7b0de0696c09f6bf23f1c
Reviewed-on: https://code.wireshark.org/review/7241
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoUse plain old ASCII for the SimpleDialog delimiter.
Gerald Combs [Wed, 18 Feb 2015 20:00:36 +0000 (12:00 -0800)]
Use plain old ASCII for the SimpleDialog delimiter.

Use a UUID for the SimpleDialog primary delimiter instead of trying to
leverage Unicode.

Bug: 10953
Change-Id: Ib518b32ef65b50f311b061ab5a267e7d1aa9f01b
Reviewed-on: https://code.wireshark.org/review/7240
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoH.248: fix dissection of ServiceChangeReason for version 1
Pascal Quantin [Tue, 17 Feb 2015 17:30:14 +0000 (18:30 +0100)]
H.248: fix dissection of ServiceChangeReason for version 1

My understanding of RFC 3015 is that the encoding of this field was not different in version 1 compared to newer releases

Bug: 10879
Change-Id: Iaa81679388860c0df4adc673ca6e56aff6f4591c
Reviewed-on: https://code.wireshark.org/review/7195
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoRADIUS: Add new dicto from FreeRADIUS
Alexis La Goutte [Tue, 17 Feb 2015 20:29:37 +0000 (21:29 +0100)]
RADIUS: Add new dicto from FreeRADIUS

commit 6c51e945a73844029f347c3fdaa0de1ec96473f1
Author: Alan T. DeKok <aland@freeradius.org>
Date:   Tue Feb 10 13:22:39 2015 -0500

    New dictionary

Change-Id: I60ba21dbadd3e35c1b0b01d7cea14b683f7f2a0c
Reviewed-on: https://code.wireshark.org/review/7237
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoSuppress a printf grouping warning.
Gerald Combs [Wed, 18 Feb 2015 18:34:20 +0000 (10:34 -0800)]
Suppress a printf grouping warning.

Suppress

    warning: ISO C does not support the ''' printf flag [-Wformat=]

We verify that we *do* support it via HAVE_GLIB_PRINTF_GROUPING.

Change-Id: Iedcf1d1856238e05babde5fe8ec23f64fbf2cdcf
Reviewed-on: https://code.wireshark.org/review/7238
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoAdd AddressSanitizer (ASAN) build option
Alexis La Goutte [Thu, 22 May 2014 19:44:06 +0000 (21:44 +0200)]
Add AddressSanitizer (ASAN) build option
--enable-asan for autotools
-D ENABLE_ASAN:BOOL=TRUE for CMake

Need Clang/LLVM >= 3.1 or GCC >= 4.9

More information about ASAN https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer

Change-Id: I833d4216d9508b8f7550ebc1dff6326734bdb53a
Reviewed-on: https://code.wireshark.org/review/1727
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years agoBugfix in ui/qt/CMakeLists.txt (missing file).
Dario Lombardo [Wed, 18 Feb 2015 13:45:53 +0000 (14:45 +0100)]
Bugfix in ui/qt/CMakeLists.txt (missing file).

Change-Id: I1db046f2e0555c8fc78d71ec6646c18cbb6f31eb
Reviewed-on: https://code.wireshark.org/review/7235
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
9 years agolibnl: disable pedantic warning of libnl lib
Alexis La Goutte [Tue, 17 Feb 2015 20:30:59 +0000 (21:30 +0100)]
libnl: disable pedantic warning of libnl lib

/usr/include/libnl3/netlink/types.h:25:15: warning: comma at end of enumerator list [-Wpedantic]
/usr/include/libnl3/netlink/handlers.h:65:9: warning: comma at end of enumerator list [-Wpedantic]
/usr/include/libnl3/netlink/handlers.h:81:18: warning: comma at end of enumerator list [-Wpedantic]
/usr/include/libnl3/netlink/handlers.h:113:18: warning: comma at end of enumerator list [-Wpedantic]
/usr/include/libnl3/netlink/utils.h:43:13: warning: comma at end of enumerator list [-Wpedantic]
/usr/include/libnl3/netlink/attr.h:47:16: warning: comma at end of enumerator list [-Wpedantic]
/usr/include/libnl3/netlink/route/link.h:95:23: warning: comma at end of enumerator list [-Wpedantic]
...

Change-Id: I3f14e9d4887569e5d7befe1adb77561c8793437e
Reviewed-on: https://code.wireshark.org/review/7201
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoEliminate some DIRTY_ file lists.
Guy Harris [Wed, 18 Feb 2015 08:03:42 +0000 (00:03 -0800)]
Eliminate some DIRTY_ file lists.

We don't want to encourage people to add to those lists, we want to
encourage people to subtract *from* those lists (either by fixing
warnings or, if an infelicitous API, or an infelicitous declaration of
an API on some platforms, or a program generator that doesn't take
sufficient care to avoid warnings - I'm looking at *you*, Flex - makes
it impossible to fix without introducing other problems, using the
DIAG_OFF()/DIAG_ON() macros if possible).  Eliminate the empty lists, to
make it harder to fill them up again.

Change-Id: I298d07952c0cb1842a4ea71ba7e07c68e94a04e9
Reviewed-on: https://code.wireshark.org/review/7229
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoUninstall wireshark.appdata.xml.
Gerald Combs [Wed, 18 Feb 2015 05:18:43 +0000 (21:18 -0800)]
Uninstall wireshark.appdata.xml.

Change-Id: Ic955e008b686af448f2091de891f8457623ae7d5
Reviewed-on: https://code.wireshark.org/review/7228
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoFix various warnings in wireshark-qt.cpp.
Gerald Combs [Tue, 17 Feb 2015 21:33:15 +0000 (13:33 -0800)]
Fix various warnings in wireshark-qt.cpp.

Squelch warnings due to (char *) casts.

Use "include_directories(SYSTEM..." in CMakeLists.txt so that we
don't get pedantic warnings about things we can't easily fix such
as QList loop optimizations. Not sure if there's an easy way to do
this in Autotools.

Pass get_gui_compiled_info to init_progfile_dir. C++ don't have to
show you any stinkin' ::main.

    warning: ISO C++ forbids taking address of function ‘::main’ [-Wpedantic]

Change-Id: If1c77284ab0d1b4786bce4e926a4109dd9b1ae34
Reviewed-on: https://code.wireshark.org/review/7207
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoUpdate Qt version checks.
Gerald Combs [Wed, 18 Feb 2015 02:11:01 +0000 (18:11 -0800)]
Update Qt version checks.

It looks like QPaintDevice::devicePixelRatio() was added in 5.1.

Back out some debugging code.

Change-Id: I40f19c0d7901ce95f587531983e5c6644daf64f4
Reviewed-on: https://code.wireshark.org/review/7226
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoAdd an appdata entry for Wireshark.
Jeff Morriss [Thu, 18 Sep 2014 15:47:21 +0000 (11:47 -0400)]
Add an appdata entry for Wireshark.

Based on the one from Richard Hughes.

A French translation of the description field is included.

Links to two screenshots are provided--they are stored in my home directory
on wireshark.org (for lack of a better place that I can put them).

Bug: 10479
Change-Id: Ida9b9e46c0fb23a7baff50f98afa597b25b8ca54
Reviewed-on: https://code.wireshark.org/review/4178
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
9 years agoSome additional UAT update callback changes.
Guy Harris [Wed, 18 Feb 2015 01:21:25 +0000 (17:21 -0800)]
Some additional UAT update callback changes.

I guess the signature mismatch must just be a warning with Clang; it's
not with MSVC.

Change-Id: Ic1f4cb88471f7e13019e891f111978310dfada73
Reviewed-on: https://code.wireshark.org/review/7225
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoFix QCustmPlot retina problems.
Gerald Combs [Wed, 18 Feb 2015 00:01:39 +0000 (16:01 -0800)]
Fix QCustmPlot retina problems.

Make sure our intermediate pixmaps have the same number of pixels as the
screen.

A merge request with the same changes has been made upstream.

Change-Id: I19950181d52f347e3aa7f5abb6e9ad33a4097abf
Reviewed-on: https://code.wireshark.org/review/7224
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoFix comments to reflect reality.
Guy Harris [Wed, 18 Feb 2015 00:48:10 +0000 (16:48 -0800)]
Fix comments to reflect reality.

Change-Id: I63aeb49e442eb6eba5cdf35ded221894c1d0ea6c
Reviewed-on: https://code.wireshark.org/review/7223
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoMake UAT record update callbacks return a success/failure indication.
Guy Harris [Wed, 18 Feb 2015 00:40:28 +0000 (16:40 -0800)]
Make UAT record update callbacks return a success/failure indication.

Have them return TRUE on success and FALSE on failure.  Check the return
value rather than whether the error string pointer is null or not.

Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c
Reviewed-on: https://code.wireshark.org/review/7222
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoAdd a CF_FUNC macro for casting BASE_CUSTOM functions.
Gerald Combs [Mon, 16 Feb 2015 01:58:12 +0000 (17:58 -0800)]
Add a CF_FUNC macro for casting BASE_CUSTOM functions.

Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid
the following warning:

    warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic]

We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be
more consistent with the other macros in proto.h. Update each instance
of BASE_CUSTOM to use CF_FUNC.

Adjust a dummy variable name generated by asn2wrs.py that was triggering
an invalid error in checkhf.pl.

Fix an encoding arguement in packet-elasticsearch.c found by
fix-encoding-args.pl.

Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22
Reviewed-on: https://code.wireshark.org/review/7150
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoMake it a bit more like the way it was before all these changes.
Guy Harris [Tue, 17 Feb 2015 22:56:31 +0000 (14:56 -0800)]
Make it a bit more like the way it was before all these changes.

Change-Id: I9fc0ef50574a7e068c32e3f6ffeb3634df9474d4
Reviewed-on: https://code.wireshark.org/review/7212
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoA UAT's update is expected to set *error; do so.
Guy Harris [Tue, 17 Feb 2015 22:54:37 +0000 (14:54 -0800)]
A UAT's update is expected to set *error; do so.

Its callers treat a non-null error pointer as a failure and a null error
pointer as a success, so it has to set *error, even if it's only setting
it to NULL.

Change-Id: I48b2faa4bc013e4a754180dfae487829c8fe35a6
Reviewed-on: https://code.wireshark.org/review/7211
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years ago[zvt] dissect some more fields
Martin Kaiser [Tue, 17 Feb 2015 22:13:00 +0000 (23:13 +0100)]
[zvt] dissect some more fields

Change-Id: I93ffcfddd59a196a7e4f9f354b99884a7f5a814c
Reviewed-on: https://code.wireshark.org/review/7208
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
9 years agoSTUN : fix indent (use 4spaces)
Alexis La Goutte [Tue, 17 Feb 2015 18:31:14 +0000 (19:31 +0100)]
STUN : fix indent (use 4spaces)

Change-Id: Ifbaf0f396b24d5506722f0e0df0dd17c1969a435
Reviewed-on: https://code.wireshark.org/review/7202
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years ago[Qt] don't clear the display filter when a capture file is closed
Martin Kaiser [Fri, 13 Feb 2015 16:19:48 +0000 (17:19 +0100)]
[Qt] don't clear the display filter when a capture file is closed

Bug: 10951
Change-Id: I958aa9e88c30ac20cd7d7971ee903ac97265c1f4
Reviewed-on: https://code.wireshark.org/review/7098
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
9 years agoWSUG: Add more dialog guidelines.
Gerald Combs [Tue, 17 Feb 2015 20:35:07 +0000 (12:35 -0800)]
WSUG: Add more dialog guidelines.

Change-Id: I59a14bf9712c05d75398b8ed2dc103fe3443f7af
Reviewed-on: https://code.wireshark.org/review/7203
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoSet a window icon for WiresharkDialog.
Gerald Combs [Tue, 17 Feb 2015 20:29:31 +0000 (12:29 -0800)]
Set a window icon for WiresharkDialog.

Otherwise it ends up with a generic icon.

Change-Id: I47292c966332073d07ef358316cf8b40bcf1329b
Reviewed-on: https://code.wireshark.org/review/7200
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years ago802.11: fix no previous prototype for 'wlan_col_filter_str' & 'wlan_bssid_col_filter_...
Alexis La Goutte [Tue, 17 Feb 2015 20:21:06 +0000 (21:21 +0100)]
802.11: fix no previous prototype for 'wlan_col_filter_str' & 'wlan_bssid_col_filter_str' [-Wmissing-prototypes]

Fix also some indent typo (3spaces -> 2spaces)

Change-Id: I1aa9df1540e80946b85dde0e6bd87bf39e8d8f19
Reviewed-on: https://code.wireshark.org/review/7199
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoCMIP: get rid of some evil global variables
Pascal Quantin [Fri, 13 Feb 2015 16:58:25 +0000 (17:58 +0100)]
CMIP: get rid of some evil global variables

Fixes an ASAN failure reported by Alexis
Note that some global variables remain as I do not know enough on this protocol to safely remove them

Change-Id: If392a8f09ef2fc2f2d46871a71149e29fe5e292c
Reviewed-on: https://code.wireshark.org/review/7099
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
9 years agoCorrected display format for EUI-64
Robert Cragie [Tue, 17 Feb 2015 17:56:06 +0000 (17:56 +0000)]
Corrected display format for EUI-64

Change-Id: I0913337a29efac5c39e30897cad7e90195fa984a
Reviewed-on: https://code.wireshark.org/review/7198
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoPCP: updated protocol dissection for new PDU types
Ryan Doyle [Sat, 31 Jan 2015 03:00:08 +0000 (14:00 +1100)]
PCP: updated protocol dissection for new PDU types

Introduce basic dissection for AUTH PDU type as well as detecting if a
conversation is about to initiate a secure sockets connection (kind of
like STARTTLS) and then pass all packets through the SSL dissector
if that is the case. Also clean up some duplication with constants.

Change-Id: I66f663ca6ab4291f8d0321430e3e126a0be77a93
Reviewed-on: https://code.wireshark.org/review/7109
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years agoGive users a more helpful error message if they enter an SSL protocol we don't
Jeff Morriss [Mon, 16 Feb 2015 20:14:57 +0000 (15:14 -0500)]
Give users a more helpful error message if they enter an SSL protocol we don't
know.

First, if we know the protocol (by filter name) tell them that the dissector
just isn't set up to run over SSL but it could be--if they contact the Wireshark
developers.

Second, don't tell them that the dissectors which have called
ssl_dissector_add() are the only ones that are valid; those are just commonly
used ones.

Change-Id: I1b72bccd4c96c21c73a19fa2d87fe2c0b875a0fa
Reviewed-on: https://code.wireshark.org/review/7185
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
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>
9 years agoDon't send an effectively empty message (no TVBs) to the SCTP tap.
Jeff Morriss [Tue, 17 Feb 2015 03:32:25 +0000 (22:32 -0500)]
Don't send an effectively empty message (no TVBs) to the SCTP tap.

This prevents the tap from crashing (asserting out) because there's no
(initialized) TVB to look at.

Bug: 9849
Change-Id: I370a49ef32a67e504c30cf1762a2180bf13c56ca
Reviewed-on: https://code.wireshark.org/review/7190
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoAdd missing json.h
AndersBroman [Tue, 17 Feb 2015 12:12:53 +0000 (13:12 +0100)]
Add missing json.h

Change-Id: Ib1d67fdcc016532ab6e4140df357a6d0dd5cf09d
Reviewed-on: https://code.wireshark.org/review/7193
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoAdded JSON native file support.
Dario Lombardo [Mon, 19 Jan 2015 18:54:41 +0000 (19:54 +0100)]
Added JSON native file support.

libjsmn has also been moved from epan/ to wsutil/ to make it visible from wiretap.

Change-Id: I59abb3419acb1baa83194b38152d3651ed5c123c
Bug: 10878
Reviewed-on: https://code.wireshark.org/review/6716
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
9 years agoFix up formatting and indentation a bit.
Jeff Morriss [Tue, 17 Feb 2015 03:39:27 +0000 (22:39 -0500)]
Fix up formatting and indentation a bit.

Change-Id: Ifdc6b8b2525efdc9e0f73519e73afbd4adbf65f4
Reviewed-on: https://code.wireshark.org/review/7191
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
9 years agoFix FSF address.
Guy Harris [Mon, 16 Feb 2015 21:35:16 +0000 (13:35 -0800)]
Fix FSF address.

Change-Id: I3881fcd211bbfbecd92c3a8c2a440da30b20393f
Reviewed-on: https://code.wireshark.org/review/7188
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoOK, at least on my system uic is called uic-qt5, same for moc and rcc.
Joerg Mayer [Mon, 16 Feb 2015 21:26:23 +0000 (22:26 +0100)]
OK, at least on my system uic is called uic-qt5, same for moc and rcc.
Found while doing an accidental autofoo build instead of cmake build.

Change-Id: Ie8ab648561f88e0a28a64c06d4d78652643c91dd
Reviewed-on: https://code.wireshark.org/review/7187
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
9 years agoWhitespace fix (space before tab)
Joerg Mayer [Sat, 7 Feb 2015 19:56:53 +0000 (20:56 +0100)]
Whitespace fix (space before tab)

Change-Id: Iccbac2ff5d95639d478437eefa16d1dd2757128b
Reviewed-on: https://code.wireshark.org/review/7186
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
9 years agoFix declaration and export the routines.
Guy Harris [Mon, 16 Feb 2015 19:50:40 +0000 (11:50 -0800)]
Fix declaration and export the routines.

Add a missing semicolon, and export the routines with WS_DLL_PUBLIC, so
they can be used by plugins.

Change-Id: Iaf52e70ce9fbfce3cfa675c453b7d39a0341dfeb
Reviewed-on: https://code.wireshark.org/review/7184
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoWe now get that from common libwireshark code.
Guy Harris [Mon, 16 Feb 2015 19:37:21 +0000 (11:37 -0800)]
We now get that from common libwireshark code.

Change-Id: If3b15d01689c6bbfad6422c4a30f9ece5e2b3b83
Reviewed-on: https://code.wireshark.org/review/7183
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoPut the 64-bit hash routines into a common file.
Guy Harris [Mon, 16 Feb 2015 19:32:39 +0000 (11:32 -0800)]
Put the 64-bit hash routines into a common file.

Some or all are used by the Infiniband, MBIM, and RSVD dissectors; put
them into a common source file, with a header for them, and just include
the header in the dissectors.

Change-Id: I724f0c2232ba751ccbd491222af6f03bafd6d63c
Reviewed-on: https://code.wireshark.org/review/7182
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoRSVD: fix compilation with GLib < 2.22.0
Pascal Quantin [Mon, 16 Feb 2015 19:24:51 +0000 (20:24 +0100)]
RSVD: fix compilation with GLib < 2.22.0

Change-Id: Ia82d42faa766f68e167b1c1affa5307980909fb8
Reviewed-on: https://code.wireshark.org/review/7181
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
9 years agoFix a portability problem raised by Guy Harris. My first implementation would
Richard Sharpe [Mon, 16 Feb 2015 15:48:57 +0000 (07:48 -0800)]
Fix a portability problem raised by Guy Harris. My first implementation would
not work on 32-bit platforms because I assumed that pointers were 64-bit
items. I have now moved to a slightly different scheme suggested by Evan Huus.

Change-Id: I34f4dceea9952d5633603e71a8e8ae8f4b9154cc
Signed-of-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/7179
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
9 years agoGet rid of duplicate typedef.
Guy Harris [Mon, 16 Feb 2015 18:37:58 +0000 (10:37 -0800)]
Get rid of duplicate typedef.

Change-Id: I389132ec27405394ca73fb9c09950d8a91ea32a7
Reviewed-on: https://code.wireshark.org/review/7180
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years ago[80211ac] Change VHT MIMO Control to use add_bitmask
Anish Bhatt [Sun, 15 Feb 2015 06:24:58 +0000 (22:24 -0800)]
[80211ac] Change VHT MIMO Control to use add_bitmask

Change-Id: If3d597dd6dbf746e0f971e52073f9790b6a0ceda
Reviewed-on: https://code.wireshark.org/review/7128
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years ago[80211ac] Add partial beamforming support
Anish Bhatt [Thu, 12 Feb 2015 09:32:02 +0000 (01:32 -0800)]
[80211ac] Add partial beamforming support

Adds support to decode beamforming report, but actual beamforming
matrices are not decoded. Requires bit level manipulation of varying lengths
of data which is not currently supported, and section spec only seems to
mention size and contents, not representation

Bug 10169
Change-Id: Icc2188b79f95b5e38b64ded348b7a0696b5504ed
Reviewed-on: https://code.wireshark.org/review/7111
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years ago[Diameter] Use proto_tree_add_bitmask() to add the diameter flags.
AndersBroman [Mon, 16 Feb 2015 14:13:25 +0000 (15:13 +0100)]
[Diameter] Use proto_tree_add_bitmask() to add the diameter flags.

Change-Id: I9cb6e46551b0a25a458311a53365469552d5c195
Reviewed-on: https://code.wireshark.org/review/7177
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoMake get_manuf_name return a const string.
Michael Mann [Thu, 12 Feb 2015 03:16:01 +0000 (22:16 -0500)]
Make get_manuf_name return a const string.

Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to worry about the wmem_allocator.

Change-Id: If976fe7b0c3f9cd053225096c2ac05418f061af6
Reviewed-on: https://code.wireshark.org/review/7081
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years ago[STUN] Avoid fetching stuff twice from the tvb.
Anders [Mon, 16 Feb 2015 09:53:05 +0000 (10:53 +0100)]
[STUN] Avoid fetching stuff twice from the tvb.

Change-Id: I923818ea41791b2f41c5bce3c5927014580eb2b7
Reviewed-on: https://code.wireshark.org/review/7174
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years agoTrivial Dead assignment fixes in configure
Peter Wu [Sun, 15 Feb 2015 23:14:18 +0000 (00:14 +0100)]
Trivial Dead assignment fixes in configure

Fixes a Dead assignment and unused variable warning.

With this patch and http://www.cmake.org/Bug/view.php?id=15203,
`scan-build cmake` will give zero warnings!

Change-Id: Idc7a03fbf1e8196bc139a2c6663ec48b897f2897
Reviewed-on: https://code.wireshark.org/review/7144
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years agoComplete the RSVD Dissector further by handling SCSI requests.
Richard Sharpe [Sat, 14 Feb 2015 23:28:01 +0000 (15:28 -0800)]
Complete the RSVD Dissector further by handling SCSI requests.

Still have to handle response, but this points the way, I think.
Handle responses. Still have to handle sense info.

Change-Id: Ic692de15b8178fbe274791ffbc000e8f35b40653
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/7127
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
9 years agoSuppress more pedantic warnings.
Gerald Combs [Mon, 16 Feb 2015 03:25:05 +0000 (19:25 -0800)]
Suppress more pedantic warnings.

Suppress

    warning: initialization of a flexible array member [-Wpedantic]

Change-Id: I49c2cf8b97539660742ef1b19752a0f56404d78a
Reviewed-on: https://code.wireshark.org/review/7155
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoRevert "Revert "Fix duplicate Display Filter Macro check""
Guy Harris [Mon, 16 Feb 2015 03:13:25 +0000 (03:13 +0000)]
Revert "Revert "Fix duplicate Display Filter Macro check""

This reverts commit 876c322df8b6a944cb4358c313c4fc46afe99719.

Wrong branch.  It builds in master; it does *not* build in 1.12 or 1.10.

Change-Id: I3a2409d5a37f08965d6caac64dc97a48a1c5d1b8
Reviewed-on: https://code.wireshark.org/review/7152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoRevert "Fix duplicate Display Filter Macro check"
Guy Harris [Mon, 16 Feb 2015 03:10:46 +0000 (03:10 +0000)]
Revert "Fix duplicate Display Filter Macro check"

This reverts commit f5902a677e24ff96869d3c335f4fb8aaa6d0e543.

This is not a simple cherry-pick; backporting this fix will have to be done manually.

Change-Id: I53efc06a8e35c6b1aa793edf4e702cabee2e929b
Reviewed-on: https://code.wireshark.org/review/7151
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoQt: fix "Assigned value is garbage or undefined"
Peter Wu [Sun, 15 Feb 2015 23:37:03 +0000 (00:37 +0100)]
Qt: fix "Assigned value is garbage or undefined"

Clang Static Analyzer reported that function link_changed uses a garbage
value for "device.links" which is indeed the case when
global_capture_opts.all_ifaces->len == 0.

There seem to be some issues here:
 - When global_capture_opts.all_ifaces->len == 0, then device is
   uninitialized.
 - When no interface name matches, the last entry will always be
   updated.
 - There is duplicate code querying for the interface by name.

This patch addresses the above issues by extracting the interface name
check into a new utility function which returns NULL when a device is
not found. Then the callers (such as link_changed) will check this
value.

While at it, stop storing a copy of (interface_t), use a pointer
instead. This allows for removal of g_array_remove_index followed by
g_array_insert_val.

Verified with clang 3.5.1.

Change-Id: I03e0f179577a23a3f1efdca768e67922273192f0
Reviewed-on: https://code.wireshark.org/review/7145
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoUpdate Release Notes
Alexis La Goutte [Sun, 15 Feb 2015 17:32:14 +0000 (18:32 +0100)]
Update Release Notes

Add QNEX6 (QNET) and add description for some other protocol (GVSP, corosync...)

Change-Id: Ia515a134e73835e6d2c81e8ccc210e9fcc424701
Reviewed-on: https://code.wireshark.org/review/7134
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoproto(.h): fix parameter 'offset' not found in the function declaration [-Wdocumentation]
Alexis La Goutte [Sun, 15 Feb 2015 17:08:38 +0000 (18:08 +0100)]
proto(.h): fix parameter 'offset' not found in the function declaration [-Wdocumentation]

Change-Id: Ib79831e02a9a6457ca49c21536ce46df7d4cafa0
Reviewed-on: https://code.wireshark.org/review/7133
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoFix handling of invalid UAT items
Peter Wu [Sat, 14 Feb 2015 14:36:09 +0000 (15:36 +0100)]
Fix handling of invalid UAT items

If the UAT file failed a field check, then the user_data pointer may be
empty. As a result uat_save() triggers an invalid write.

(Discovered while working with a dfilter_macros file having duplicate
names for bug 10957, caught by ASAN.)

The second issue fixed in this patch is that the validity of an item is
only calculated when a new record is added. So even if the user edits
the UAT and makes the entry valid, it would not be saved. This is solved
by adding a new uat_update_record() function which got wires up into GTK
and Qt.

Some open-coded g_array_index and UAT[_USER]_INDEX_PTR are also
converted.

Even after this patch, Qt has some issues with UAT handling. In
particular, it saves new, but empty/invalid, items. It also it does not
check individual fields when saving all fields (unlike Gtk). This patch
focused on getting Gtk fixed first so ignores those existing issues.

Change-Id: Ia35cfe9d2b793c65144ae7e29a1ed706b6668d99
Reviewed-on: https://code.wireshark.org/review/7120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoFix duplicate Display Filter Macro check
Peter Wu [Sat, 14 Feb 2015 16:59:27 +0000 (17:59 +0100)]
Fix duplicate Display Filter Macro check

Since commit 4a1bd75b60171d781dc9f2d3ffd6d498acc74b1a
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7471), the data
pointer does not match anything from the macros array.

This patch fixes a false warning by checking for duplicates before the
name is committed.

Bug: 10957
Change-Id: Id61110bf63de1de80b85524705a2df6a5e7be33a
Reviewed-on: https://code.wireshark.org/review/7119
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoHandle DLT_LOOP differently from DLT_NULL.
Guy Harris [Sun, 15 Feb 2015 22:46:30 +0000 (14:46 -0800)]
Handle DLT_LOOP differently from DLT_NULL.

That's a little cleaner, and lets us preserve the LINKTYPE_ value for
DLT_LOOP captures.  ("Preserve" here doesn't mean "write files with a
link-layer header type of 12", as that's ambiguous; we write it with a
link-layer header type of LINKTYPE_LOOP, i.e. 108.  If programs on
OpenBSD don't recognize that as DLT_LOOP, that's a bug in OpenBSD's
libpcap or in the program.)

Change-Id: I48a2e04aed41c013823ffb5c588d2a8e8b376e15
Reviewed-on: https://code.wireshark.org/review/7143
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoDon't base interpretation of LINKTYPE_ values on DLT_ value definitions.
Guy Harris [Sun, 15 Feb 2015 22:03:12 +0000 (14:03 -0800)]
Don't base interpretation of LINKTYPE_ values on DLT_ value definitions.

Instead, explicitly check for particular build platforms.  This means
that the interpretation of the link-layer type values with different
meanings on different platforms won't be dependent on the particular
version of libpcap with which Wireshark happens to be built, and also
means that we don't have to fix pcap-common.c to include pcap.h or
net/bpf.h.

Fix some comments while we're at it.

Bug: 10956
Change-Id: If331d9b92081fb0bdf416620fb2ad8dce57dea6b
Reviewed-on: https://code.wireshark.org/review/7140
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoEtherCAT: Suppress pedantic warnings.
Gerald Combs [Sun, 15 Feb 2015 18:25:17 +0000 (10:25 -0800)]
EtherCAT: Suppress pedantic warnings.

Try to suppress

warning: type of bit-field 'foo' is a GCC extension [-Wpedantic]

Change-Id: If161a509db2d6aaad3bb656318902f0bc7b0d0a9
Reviewed-on: https://code.wireshark.org/review/7136
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoui/gtk/*.c: Add editor modelines; As needed: Fix indentation
Bill Meier [Sun, 15 Feb 2015 18:58:39 +0000 (13:58 -0500)]
ui/gtk/*.c: Add editor modelines; As needed: Fix indentation

Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753
Reviewed-on: https://code.wireshark.org/review/7138
Reviewed-by: Bill Meier <wmeier@newsguy.com>
9 years agoepan/ftypes/*.[hc]: As needed: Add editor modelines & Fix indentation
Bill Meier [Sun, 15 Feb 2015 03:31:53 +0000 (22:31 -0500)]
epan/ftypes/*.[hc]: As needed: Add editor modelines & Fix indentation

Change-Id: Ib0bd1ea7801ab450b300a94c4757f16d0dd75760
Reviewed-on: https://code.wireshark.org/review/7137
Reviewed-by: Bill Meier <wmeier@newsguy.com>
9 years agoAdd ws_mempbrk_sse42_compile to Valgrind suppression list
Pascal Quantin [Sat, 14 Feb 2015 22:36:47 +0000 (23:36 +0100)]
Add ws_mempbrk_sse42_compile to Valgrind suppression list

When running Valgrind 3.10.0 on an Ubuntu 10.10 x64 guest with Virtualbox 4.3.22, ws_cpuid_sse42() call triggers a false positive when checking ECX bit 20
Guy kindly verified the assembler code and confirmed that everything seems fine
Let's remove the error to avoid noise when running Valgrind on a capture
Change-Id: I357633950249a0c781482865c3221a1babdc74e2
Reviewed-on: https://code.wireshark.org/review/7124
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
9 years agoOnly call tvb_get_ptr() once to set src and dst addresses-
Anders [Sun, 15 Feb 2015 17:54:28 +0000 (18:54 +0100)]
Only call tvb_get_ptr() once to set src and dst addresses-

Change-Id: I206b25ec512b3665b36307276ab3748e0a5ff73b
Reviewed-on: https://code.wireshark.org/review/7135
Reviewed-by: Anders Broman <a.broman58@gmail.com>
9 years ago[Automatic manuf, services and enterprise-numbers update for 2015-02-15]
Gerald Combs [Sun, 15 Feb 2015 16:04:51 +0000 (08:04 -0800)]
[Automatic manuf, services and enterprise-numbers update for 2015-02-15]

Change-Id: Ie7aa5657e123ef609e05fc6f09782cc5d2443308
Reviewed-on: https://code.wireshark.org/review/7130
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoIS-IS (LSP): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Alexis La Goutte [Sun, 15 Feb 2015 11:37:36 +0000 (12:37 +0100)]
IS-IS (LSP): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang

Change-Id: I1b68151f0cb09afd6a6aeba2a71a15624c2fbc97
Reviewed-on: https://code.wireshark.org/review/7129
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoTry to fix diagnostic suppression.
Gerald Combs [Sat, 14 Feb 2015 21:36:45 +0000 (13:36 -0800)]
Try to fix diagnostic suppression.

Test the compiler for "-Wpedantic" instead of "-pedantic" since DIAG_OFF
and DIAG_ON expect a "-W" flag prefix. Be more strict about the compiler
versions that DIAG_OFF and DIAG_ON support.

Change-Id: I9304c544912102f1719b79e9250f97b40a324430
Reviewed-on: https://code.wireshark.org/review/7123
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoNote why some header checks are done even if unnecessary on UN*X.
Guy Harris [Sat, 14 Feb 2015 22:52:24 +0000 (14:52 -0800)]
Note why some header checks are done even if unnecessary on UN*X.

Change-Id: I0ea8cbaed65922e4dd5e49bbb7578b392deb8c02
Reviewed-on: https://code.wireshark.org/review/7125
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoA small correction to the documentation to bring it in line with the code.
Richard Sharpe [Sat, 14 Feb 2015 19:41:47 +0000 (11:41 -0800)]
A small correction to the documentation to bring it in line with the code.

Change-Id: I5818b9f3348a70d817bf885697cd67440d812889
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/7121
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoWSUG and image updates.
Gerald Combs [Sat, 14 Feb 2015 18:18:26 +0000 (10:18 -0800)]
WSUG and image updates.

Update the protocol hierarchy, conversation, and endpoint sections of
the User's Guide. When everything is an admonition nothing stands out.
Make a series of "NOTE"s plain old paragraphs. Scale the new
conversation and endpoint images to fit the page width. This looks funny
in my browser but I'm not sure about the best way to fix it.

Move image/compress-pngs to the tools directory. Use it to reduce the
size of the WSUG and WSDG images.

Fixup traffic table column names and window titles.

Change-Id: I674342ed901fc64563b384ee5e1f35413736cb19
Reviewed-on: https://code.wireshark.org/review/7122
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoFix diagnostics macros and squelch a gcc warning.
Gerald Combs [Fri, 13 Feb 2015 21:51:05 +0000 (13:51 -0800)]
Fix diagnostics macros and squelch a gcc warning.

Both clang and gcc define __GNUC__. Make sure we account for that when
defining diagnostic macros.

Use DIAG_OFF + DIAG_ON to suppress gcc -pedantic warnings about
frame_data.

Get rid of packet_char_enc casts.

Change-Id: Idbcc61bcdb35c1d20f185461c69451dcdf73bae9
Reviewed-on: https://code.wireshark.org/review/7106
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoRemove a duplicate typedef.
Gerald Combs [Sat, 14 Feb 2015 17:00:36 +0000 (09:00 -0800)]
Remove a duplicate typedef.

Change-Id: Ie26785cc3577bda84cb4d244aab5a607797b99fb
Reviewed-on: https://code.wireshark.org/review/7118
Reviewed-by: Gerald Combs <gerald@wireshark.org>
9 years agoMIP6: Local Mobility Anchor Address mobility option code is treated incorrectly
Alexis La Goutte [Sat, 14 Feb 2015 12:03:45 +0000 (13:03 +0100)]
MIP6: Local Mobility Anchor Address mobility option code is treated incorrectly

The first packet is an IPv6 packet with Local Mobility Anchor Address mobility option with Option-Code=1. Wireshark parses its address as IPv4 address.

The second packet is an IPv6 packet with Local Mobility Anchor Address mobility option with Option-Code=2. Wireshark parses its address as IPv6 address.

According to RFC 5949 (https://tools.ietf.org/html/rfc5949#section-6.2.2), Option-Code=1 means IPv6 and Option-Code=2 means IPv4, exactly the opposite to what Wireshark does.

Bug: 10961
Change-Id: I03b76dda8beae211e67e6c9e1f40d122e851b1b5
Reviewed-on: https://code.wireshark.org/review/7113
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoMIP6: AUTH mobility option parses Mobility SPI and Authentication Data incorrectly
Alexis La Goutte [Sat, 14 Feb 2015 11:47:38 +0000 (12:47 +0100)]
MIP6: AUTH mobility option parses Mobility SPI and Authentication Data incorrectly

The authentication data in the AUTH option in attached IPv6 packet contains one byte too much. This byte is read beyond the option data.
In Wireshark, clicking on the AUTH shows that the option ends at 0xCE while clicking on the Authentication Data shows that it ends at 0xCF.

Reported by Boaz

Bug:10626
Change-Id: I0bcfd6331bc1de30f25d16590487c0e3bf5c002f
Reviewed-on: https://code.wireshark.org/review/7112
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years ago"Hide" hashether_t structure.
Michael Mann [Thu, 12 Feb 2015 01:13:36 +0000 (20:13 -0500)]
"Hide" hashether_t structure.

One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: Ic7dee275ba0a2bd4e19c06702a867417c5624c27
Reviewed-on: https://code.wireshark.org/review/7080
Reviewed-by: Michael Mann <mmann78@netscape.net>
9 years agoDon't check for C89 headers.
Guy Harris [Sat, 14 Feb 2015 08:04:36 +0000 (00:04 -0800)]
Don't check for C89 headers.

1988 called, they want their lack of a C standard back.  We don't need
to check whether we have stdarg.h, stddef.h, stdlib.h, or string.h, as
they're specified by C89 and I don't think there are any platforms we
care about that don't have a C89 environment in which we could be built.

Change-Id: I447551181284fab7722354b62774625ed8ee94bc
Reviewed-on: https://code.wireshark.org/review/7110
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
9 years agoWe use GLib's directory-reading routines, so we don't need <dire[cn]t.h>.
Guy Harris [Sat, 14 Feb 2015 02:08:47 +0000 (18:08 -0800)]
We use GLib's directory-reading routines, so we don't need <dire[cn]t.h>.

Change-Id: Id86e5d6d0ab24adb1bfff0688f33a40f2fdaed8d
Reviewed-on: https://code.wireshark.org/review/7108
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>