Commit Graph

4122 Commits

Author SHA1 Message Date
Stig Bjørlykke 6e53a06678 Qt: No capture filter bookmarks in capture interfaces list
Change-Id: I4f53758c0fa4448656daac3ad186a6b0e687fc5c
Reviewed-on: https://code.wireshark.org/review/13593
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-29 08:24:36 +00:00
Stig Bjørlykke 3c1d05d5a0 Qt: Enable capture filter bookmarks
Update the code handling capture filter bookmarks and enable the
bookmark button and clear button in CaptureFilterEdit().

Disable the apply button (which starts a capture) for now.

Bug: 11836
Change-Id: Ia33cbb8c9bb839be037112eef26daf744c4ea8f8
Reviewed-on: https://code.wireshark.org/review/13568
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-28 21:56:43 +00:00
Stig Bjørlykke 7fdf4ceaa6 Qt: Update display filter bookmarks when list changed
Recreate the display filter bookmarks menu only when the list
has changed, not every time the display filter changes.

The list changes when removing an entry from the menu and
when changing the list in the "Manage Display Filters" dialog.

Save the list when removing an entry from the menu.

Change-Id: Icd08e0a80085cca55c0e63177d45abe4902c7c3e
Reviewed-on: https://code.wireshark.org/review/13567
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-28 18:28:30 +00:00
João Valverde 265a41e14d autotools: Don't use "user variables" to set build flags
GNU coding standards recommend against it and automake is designed
around it.

This allows overriding the global build flags using AM_CFLAGS, etc.,
or per object flags, something that is difficult or impossible currently
because of automake precedence rules.

Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12
Reviewed-on: https://code.wireshark.org/review/13455
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-28 18:13:48 +00:00
Roland Knall 97a1a50e20 extcap: Cleanup complex types and add save option
Cleanup handling of complex data types and use only
glib defined datatypes while handling argument values.

Add a save parameter, which (additionally) can set, that
a parameter is not saved in a configuration file. Passwords
are by default not saved, which may be overwritten using
this parameter

Change-Id: I67eff0f3286170f082d532e806a39511c40df647
Reviewed-on: https://code.wireshark.org/review/13573
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-28 14:51:14 +00:00
Gerald Combs e57bb1919c Make Qt UI capture filter behavior more closely match the GTK+ UI.
If the user enters a capture filter in the Capture Interfaces dialog and
presses "Start", make sure we copy the filter to the main welcome
screen.

Back out capture filter code from g0ce9ac4. Leave out the code that set
the global capture filter. Move the code that set individual capture
filters to the welcome screen.

Fix multiple interface selection in the welcome screen.

Rename allFilterComboBox in the capture interfaces dialog to
captureFilterComboBox to match the main welcome screen.

If the user starts typing in captureFilterComboBox, make sure the
"Capture Filter" column is visible. Update the "Capture Filter" column
as the user types. Conversely, if the user edits the "Capture Filter"
column, update captureFilterComboBox accordingly.

If we're editing a per-interface filter make sure we commit its contents
before starting capture.

Map our device index directly to each tree item instead of using a
separate map which will no longer be valid any time our sort order
changes (which we do right away in our constructor).

Don't set prefs.capture_devices_filter in the Qt UI. The GTK+ UI doesn't
and doing so can lead to surprising behavior. Note that it's mostly
unused.

Note that we don't multiple selected filters very well.

Ping-Bug: 11886
Change-Id: I3c052f4f464411e2fb8fb7d96b218e1ce2bac3fd
Reviewed-on: https://code.wireshark.org/review/13410
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-27 16:13:19 +00:00
Mike78 ef752689da Allow/Create an option to use "capture filter" labels defined in wireshark GUI from CLI
Move ui/filters.[ch] to filter_files.[ch] because dumpcap is using functionality.

Bug: 8091
Change-Id: I195c82fc023f97d6f331b8718c45a2d83d30faea
Reviewed-on: https://code.wireshark.org/review/5925
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-27 13:40:24 +00:00
Stig Bjørlykke a7d07e9edc Qt: Check for file changes on Reload
Check if having unsaved changes and offer a save before reload
and reload as file format/capture.

Bug: 12003
Change-Id: Ic4282e0a17a4ec745e729eb93863fc15e7ec611b
Reviewed-on: https://code.wireshark.org/review/13535
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-26 18:14:17 +00:00
Stig Bjørlykke 06e5197867 Qt: Improved testCaptureFileClose dialog texts
Make the "Unsaved packets" dialog question and informative text
use the same layout for all cases.

Added before_what texts when opening another file and closing the
file.  Changed the texts for restarting the capture.

Renamed FileCloseButtons to FileCloseContext to use it for other
checks than just button texts.

Change-Id: I4a39852a1c18e8ffb7fa6b5c800a84500f995bc8
Reviewed-on: https://code.wireshark.org/review/13524
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-26 18:03:45 +00:00
Roland Knall 1c822e7130 prefutils: Add convenience function
This is a convenience function for allowing multiple
key/values to be saved to the preference system, without
having to reference pref_t or the real underlying value.

It is used by the extcap save functionality, to store the
saved values

Change-Id: I1c8bf787db8ed2d17628024ec1cd19073e49d017
Reviewed-on: https://code.wireshark.org/review/13471
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-26 16:37:06 +00:00
Uli Heilmeier 7e72253c0e Qt: Detect language on Windows and load qt_xx.qm/qt_xx_XX.qm
Sytem language is reported as xx_XX (e.g. de_DE). As we're only
shipping qt_xx.qm in the Windows installer the langfile is missing.

This commits searches for qt_xx_XX.qm and qt_xx.qm files and loads it.
See also https://wiki.qt.io/How_to_create_a_multi_language_application

Furthermore it fixs commit 137dba6e66f58c0dae371e7fb98d3fdd6dc8c1f4
to load qt_xx.qm in the right way.

Change-Id: Iba9e597a44eb42b867542d1d6ffccc55f824bbe1
Reviewed-on: https://code.wireshark.org/review/13525
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>
2016-01-26 16:36:00 +00:00
Alexis La Goutte 4f2ce4cc2e capture(.h): fix api reference
The following parameters of capture_start(capture_options *capture_opts, capture_session *cap_session, info_data_t *cap_data, void(*update_cb)(void)) are not documented:
  parameter 'cap_data'

Change-Id: I5953b35155de49ead64be263b32da2aa671f2206
Reviewed-on: https://code.wireshark.org/review/13546
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-26 09:10:25 +00:00
David Morsberger 469a231707 Change filter button label in qt follow window to 'Filter Out This Stream' to match label in gtk version.
Change required because functionality is now the same between two windowing systems (Hide vs. Filter)

Change-Id: Iec321c93cfe8eefe15bb287ea3267956146255c7
Reviewed-on: https://code.wireshark.org/review/13321
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-26 09:04:19 +00:00
Stig Bjørlykke cb0f530cae Qt: Fix checkSaveAsWithComments() button check
When using QMessageBox with custom buttons, exec() function returns
an opaque value.  Therefore we should use clickedButton() to determine
which button was clicked.

Example in https://wiki.qt.io/Custom_QMessageBox_Buttons

Change-Id: I81824414e31345bb9ea77f72f1b4cdeaa21d2781
Reviewed-on: https://code.wireshark.org/review/13523
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-25 11:37:54 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Gerald Combs 107d681e8f [Automatic update for 2016-01-24]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Iaac61b4a2f446b99d4600ae8ae56405ae6fb21da
Reviewed-on: https://code.wireshark.org/review/13512
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-24 16:05:55 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
Guy Harris bd4644b336 Indicate what an InterfaceTree is.
(I.e., it's just names, traffic sparklines, and, if available, extcap
options; it's not the more detailed list of capture options seen
elsewhere.)

Change-Id: I21cc244ae17abab95f8124e39425e8beae564380
Reviewed-on: https://code.wireshark.org/review/13507
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 00:51:55 +00:00
Jim Young 0fa13371d1 Qt io_graph: Use Interval value when generating Y-axis label or legend
The I/O Graph allows the user to choose from several different Y-axis units.
Three of the selectable Y-axis units unconditionally imply a per-second
time unit (/s) regardless of the actual I/O Graph Interval value selected.
In addition the Y-axis label includes the “/s” as a suffix regardless of the
current Interval value.

This patch removes "/s" suffix from the Y-axis pick-list units.  This patch
also dynamically adds the selected Interval value to the Y-Axis label or
alternatively as the first line of the legend box that is displayed if the
various enabled graphs have differing Y-axis values.  For readability the
pick-list values for sub-second Interval values are changed to 1 ms, 10 ms
and 100 ms from the original pick-list values of 0.001 sec, 0.01 sec and
0.1 sec respectively.

To support adding a “Title” to the legend, the QCustomPlot widget is
augmented with “Legend Title” source authored by “David” as posted at:

  http://www.qcustomplot.com/index.php/support/forum/443

Note: This patch changes the valid Y-axis unit values stored within the
io_graphs preferences files.  Any io_graphs files having entries with the
now obsolete Y-Axis values of “Packets/s”, “Bytes/s” or “Bits/s“ will be
silently upgraded to “Packets”, "Bytes" and "Bits" respectively when
saved.

Bug: 11855
Change-Id: I503ff6dc20b09d90f087342084fb0db6e0080c7f
Reviewed-on: https://code.wireshark.org/review/12219
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-24 00:13:42 +00:00
Uli Heilmeier 88cd6552ea Qt: Load qt_XX.qm to translate Qt Strings
The Windows installation includes the Qt translations files qt_XX.qm
in the installation directory (e.g. C:\Program Files\Wireshark\).

However we've tried to load the files only from the
QLibraryInfo::TranslationsPath (C:\Qt\5.3\msvc2013_64_opengl\translations\).
This path is missing in a normal Windows environment.

Therefore strings like "Ctrl" haven't been translated.

Change-Id: I45bc873fdd95fd0ab5c79e70d9ff062274f899fe
Reviewed-on: https://code.wireshark.org/review/13485
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>
2016-01-24 00:02:43 +00:00
Stig Bjørlykke 720f57d000 ui: Code cleanup
Fixed code layout to use common style in the file.
Mostly whitespace changes.

Change-Id: Id37b57717a9e26248fad07322dff09b1d1f45ac2
Reviewed-on: https://code.wireshark.org/review/13504
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-23 23:15:54 +00:00
Guy Harris a7f470fa24 More pinfo->fd->abs_ts to pinfo->abs_ts.
Change-Id: I70db0a345cc4c5c57c454371deb4f92f9ac4b9ac
Reviewed-on: https://code.wireshark.org/review/13501
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 03:58:56 +00:00
João Valverde 3343729457 Fix warnings for qt_ui_utils.cpp [-Wcast-qual]
Change-Id: Ie1d2779d9eaf59c2f440efa096f6707375f11c6f
Reviewed-on: https://code.wireshark.org/review/13443
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-22 19:29:42 +00:00
Stig Bjørlykke 77046c0c2d Qt: Add some window title variables
Add some variables to be used in custom window title.

%P = profile name
%V = version info

Change-Id: I049717432a4d3523b541bb4f6f882c75abc38ddb
Reviewed-on: https://code.wireshark.org/review/13419
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-21 18:22:05 +00:00
João Valverde d403c15739 decode_as_utils: Fix warning [-Wcast-qual]
Change-Id: Ia30c3fd579a72b3bff882cb03c06de12bcd743b3
Reviewed-on: https://code.wireshark.org/review/13442
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-21 02:37:01 +00:00
João Valverde faedd049af profile_name_is_valid() returns a malloced string [-Wcast-qual]
Change-Id: I584cdbf6a09e818e0d14c951defdde2fc96787f3
Reviewed-on: https://code.wireshark.org/review/13440
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-21 02:32:46 +00:00
João Valverde 4dd3f668dc Avoid returning malloced memory as const [-Wcast-qual]
Change-Id: I0b2c03cbde963d13d07ef13284d85b922eec3be9
Reviewed-on: https://code.wireshark.org/review/13439
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-21 02:30:18 +00:00
Pascal Quantin 06b75181a0 Qt: fix a crash when trying to open TCP stream graph on a truncated TCP packet
Do not try to show TCP stream graph window if it was rejected in constructor

Change-Id: I4d1401e2c356391ceb8c8e3d37a668fc2a9fc92f
Reviewed-on: https://code.wireshark.org/review/13454
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
2016-01-20 23:39:15 +00:00
Pascal Quantin 4b35048af3 Qt: ensure to call destructor when closing a few QDialog windows
Change-Id: I10d2a610e852fdc2f38b84e561f04783af0d612e
Reviewed-on: https://code.wireshark.org/review/13453
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-20 23:38:26 +00:00
Michal Labedzki 0dbe79c53f Qt: Resize columns to contents in DecodeAs
If user first time run DecodeAs columns width are not enough,
so content are trimmed. Do resizing whenever add new item.

Change-Id: I378e2a5b2134479d961f3f00d398d8052f7e556d
Reviewed-on: https://code.wireshark.org/review/13392
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-01-20 07:02:12 +00:00
Stig Bjørlykke 56bffba031 Qt: Update window title when preferences changed.
When switching profile the prefs.gui_window_title may have changed
so ensure we update the main window title.

Change-Id: Ic1f9c7ac075d77c60cfbebb20624e597f7eb8449
Reviewed-on: https://code.wireshark.org/review/13418
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-19 18:13:02 +00:00
Gerald Combs 9988542fd5 Add a copy button to the Filter Expression preferences.
Add a "copy" button to match other parts of the UI.

Change-Id: I4240aaaaf18a6bbf8e6737a12bcfead2248acca7
Reviewed-on: https://code.wireshark.org/review/13322
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-18 16:38:03 +00:00
Gerald Combs 6d0bc20d4e Qt: Fixup the Display Filter Expression syntax logic.
In the Display Filter Expression dialog, only disable the OK button when
we have an invalid filter.

Move the deprecated warning string from DisplayFilterEdit::checkFilter
to SyntaxLineEdit::checkDisplayFilter so that we can use it in more
places.

Change-Id: I938f5f10258f4fd9dd3a33c174dd9958c9634766
Reviewed-on: https://code.wireshark.org/review/13317
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-18 16:37:43 +00:00
Dario Lombardo ff033c6a2f extcap: add masked to options.
This allows an option to be masked (like a password), by using
the argument-type password.

Change-Id: I2eae1be2e6672bff28ba5f749d7a3f687ebd4631
Reviewed-on: https://code.wireshark.org/review/13385
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-18 15:04:33 +00:00
João Valverde b87a5af633 Fix build [-Werror=maybe-uninitialized]
Found building with GCC 5.3.0 and CFLAGS="-g -Og".

Change-Id: I5bc29b6e91cc98332a513c9d03b02d2f6906608d
Reviewed-on: https://code.wireshark.org/review/13362
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-17 19:12:45 +00:00
Gerald Combs 65ee5f9a5c [Automatic update for 2016-01-17]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I4aacb3b957cbb04f1848504bfb6880fe010723a3
Reviewed-on: https://code.wireshark.org/review/13356
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-17 16:05:40 +00:00
Gerald Combs bebb63bea9 Keep comments from stealing hierarchy statistics.
If a packet has a comment, the Protocol Hierarchy Statistics dialog will
add its stats to a top-level "Packet comments" node instead of the
"Frame" node. Add a check for the pkt_comment protocol ID and skip over
it if we find it. Affects Wireshark 2.0, 1.12, 1.10, and probably
earlier versions.

As an alternative we could always force "Frame" to be the first item in
the tree.

Change-Id: If7cd817071caf6219515f5d8121b3a1a2c0d79a6
Reviewed-on: https://code.wireshark.org/review/13297
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-15 17:56:46 +00:00
Paul Offord d1cb746822 plugin_if: Add function to get capture file info
This is an enhancement to allow a plugin to obtain capture file
and other status information via a simple plugin_if call

Added GTK port to this revision

Bug: 11968
Change-Id: Ibcf4e8b43c6f3b48e971fa4020a07cc273234fb8
Reviewed-on: https://code.wireshark.org/review/13103
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-15 11:39:58 +00:00
Roland Knall 75ff25f285 extcap: Add list of extcaps to about dialog
Adds the list of available extcaps to the plugin list in the
About dialog of Wireshark (Qt only). To do this, and additional
sentence is provided in the extcap arguments list, which allows
for additional information to be passed (as of right now, just
version and display is used)

Additionally, cleans up the code when using g_free.

Bug: 11683
Change-Id: I04a958e2b73c9a707ab1cb4f2fc8345833a854a9
Reviewed-on: https://code.wireshark.org/review/13224
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-15 11:30:39 +00:00
Pascal Quantin 11b581be09 Qt: fix Z-order assignment: '' is not a valid widget warning
Change-Id: Ic9f41f34b017d161f13604cf8813bc70aa7a68d4
Reviewed-on: https://code.wireshark.org/review/13284
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-14 13:21:25 +00:00
Stig Bjørlykke 8572c6abe7 Qt: Separate window titles with Em dash on OS X
The window titles on OS X are usually separated by Em dash,
so use this when appending prefs.gui_window_title.

Change-Id: Ice46179fc872eefc7662b42052b428eabf1b6d61
Reviewed-on: https://code.wireshark.org/review/13256
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-14 07:28:43 +00:00
Stig Bjørlykke 91c166867d Qt: Add back setWindowFilePath
With support for prepend and append to the window title.

Change-Id: I2215a080b85d36ceb47495bbb94617743fc3f83e
Reviewed-on: https://code.wireshark.org/review/13031
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-14 07:27:36 +00:00
Gerald Combs 8fe1cf77eb Fix capture output options.
Remove the "permanent file" checkbox. We weren't properly checking its
value and it was extraneous. Add placeholder text about temporary files.

Move the filename above the other options. That's where it is in the
GTK+ UI and it's arguably the most important.

When capturing to multiple files the size and duration settings aren't
mutually exclusive.

Change-Id: I1da1d3524e3c2de2361050913281472a172faa3a
Reviewed-on: https://code.wireshark.org/review/13269
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-14 05:22:08 +00:00
Gerald Combs cd5b932812 Qt: "Conversation" → "Coloring"
Change actionViewColorizeNewConversationRule to
actionViewColorizeNewColoringRule and change its text accordingly.
We're building a rule based on a general filter, not a conversation.

Change-Id: Ic408050eed6f24690e3e759e6963f9930fe4b5e9
Reviewed-on: https://code.wireshark.org/review/13266
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-14 05:21:28 +00:00
Gerald Combs 7c2eaefd07 Qt: Show the horizontal scrollbar in the packet detail.
Call resizeColumnToContents when we fill, clear, expand, or contract
items. This make sure the horizontal scrollbar shows up instead of
eliding items.

A commonly suggested solution is to call
header()->setSectionResizeMode(QHeaderView::ResizeToContents) followed
by header()->setStretchLastSection(false). This makes the scroll bar
show up when the tree is wider than the window, but when the column is
narrower than the window we end up with unused white space on the right.

Change-Id: I5896f6048385bed27858f0ac676b29a1bf1255cd
Reviewed-on: https://code.wireshark.org/review/13265
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-13 21:28:07 +00:00
Peter Wu 5539dba1df Do not apply color rule filter every dissection
Introduce a frame_data flag "need_colorize" to indicate that coloring
rules need to be evaluated and set it for the GUI (not tshark). This
restores the original performance characteristics.

It additionally fixes a regression where the color filter name and
filter is not shown anymore in the tree (I guess it is related to the
edt->tree being NULL when re-selected, resulting in empty color_filter).

Remaining problems:

 - Display filter cannot contain frame.coloring_rule.* fields. Code is
   present to enable this, but then a method is needed to avoid an
   expensive second calculation (which is why it is disabled).
 - The columns are still not updated after coloring rule change.
 - The two frame.coloring_rule fields in the tree are not updated when
   the coloring rule is changed (e.g. Ctrl-1).

The last two issues were supposed to be fixed by the previous patch, but
there is probably some missing code... Tested with GTK and Qt.

Bug: 11980
Change-Id: I3ef7713b28db242e178d20f6a5f333374718b52e
Reviewed-on: https://code.wireshark.org/review/13170
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>
2016-01-13 07:38:25 +00:00
Gerald Combs 1f0c9f6693 Qt: Update some keyboard shortcuts to match the GTK+ UI.
As the QKeySequence documentation says,

  "On Mac OS X, references to "Ctrl", Qt::CTRL, Qt::Control and
   Qt::ControlModifier correspond to the Command keys on the Macintosh
   keyboard, and references to "Meta", Qt::META, Qt::Meta and
   Qt::MetaModifier correspond to the Control keys. Developers on Mac OS
   X can use the same shortcut descriptions across all platforms, and
   their applications will automatically work as expected on Mac OS X."

This also applies to Qt Creator on OS X. If you assign a shortcut to an
action that contains the Control key, it will draw the ^ symbol in the
UI but will save "Meta" in the .ui file instead of "Ctrl", in the manner
of a well-meaning-but-not-helpful comedy sidekick.

This happened for the actions listed below. Replace "Meta" in their
shortcuts with "Ctrl".

- Unmark all (Ctrl+Alt+M)
- Next marked packet (Ctrl+Shift+N)
- Previous marked packet (Ctrl+Shift+B)
- Show packet times... (Ctrl+Alt+1 - Ctrl+Alt+8)

This matches the GTK+ UI on Windows and Linux, and uses the Command key
on OS X. If we really want to use the Control key everywhere we can
override the action sequences in main_window.cpp. We might want to do
this for the "mark" actions since Command+M is the standard key for
"Minimize this window".

Change-Id: I1537cee5bc27a32b505bace01c1de3703a18dd6a
Reviewed-on: https://code.wireshark.org/review/13238
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-13 06:06:50 +00:00
Guy Harris fea05007e4 Need to include <epan/prefs.h> to declare preference functions.
Change-Id: I5fbc9d25dde30ce8d14c80e765a3a8a630fec708
Reviewed-on: https://code.wireshark.org/review/13239
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 19:03:28 +00:00
Evan Huus 4802325ea6 Fix type: strlen returns a size_t
Change-Id: I5a3ea655c4a362bbacb72e8c7a19f3c96d22a0fc
Reviewed-on: https://code.wireshark.org/review/13231
Reviewed-by: Evan Huus <eapache@gmail.com>
2016-01-12 15:17:40 +00:00
Michael Mann c62547b951 Refactor "Follow Stream" functionality on all GUI interfaces.
Create a "registration" system for Follow functionality so most of the work can be abstracted into a dissector and GUI can just be responsible for "display".
This also removes the global variables in follow.c to open up multithreading possibilities.

TCP, UDP and HTTP all have the same "tap interface" for Follow functionality (passing a tvb with byte data to "follow"). SSL still has it's own behavior, so Follow structures have to take that into account.

TShark through the Follow registration now has support for HTTP.

The only thing possibly missing is dynamic menu generation to further reduce explicit knowledge of Follow "type" (and rely on registration)

Bug: 11988
Change-Id: I559d9ee1312406ad0986d4dce9fa67ea2103b339
Reviewed-on: https://code.wireshark.org/review/13161
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-12 15:08:18 +00:00
Stig Bjørlykke da798683de Qt: Refactor testCaptureFileClose
Cleanup arguments and simplify code for button texts.

Change-Id: Ie505650889212082e088a525f4b82e62b9177b0d
Reviewed-on: https://code.wireshark.org/review/13180
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-12 14:20:25 +00:00
Guy Harris 694036c0e0 Fix indentation.
Change-Id: Icefabed4c9069bb3fe015739c805cd8fb2426ea5
Reviewed-on: https://code.wireshark.org/review/13213
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 07:24:07 +00:00
Guy Harris a5dee51a1a Move some definitions and declarations around.
This removes duplicates (including one incorrect duplicate), and also
means we have only one chunk_type_values[] value_string.

Change-Id: I4c3035b1cfb5c86cc7a5bf79feb9a5b0204b6dcc
Reviewed-on: https://code.wireshark.org/review/13212
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 07:22:30 +00:00
Guy Harris 95d6848253 Add some missing curly braces.
Change-Id: Ifcacd1fedd8c71d47ab618d036765b8195d4ccbb
Reviewed-on: https://code.wireshark.org/review/13209
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 05:24:11 +00:00
Guy Harris 8a5b29c8f3 Fix indentation.
Change-Id: I5b01865b33b65ee55718be680b6d17cdeee1a809
Reviewed-on: https://code.wireshark.org/review/13208
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 05:20:42 +00:00
Stig Bjørlykke ebdaace002 Lua: Added reload_lua_plugins
This makes it possible to trigger reloading Lua plugins from
within a Lua plugin.  This can be used when having a plugin to
update local plugins from a external source.

Renamed reload() to reload_packets() to clarify what's reloaded,
and added a alias (marked as obsoleted) from reload().

Change-Id: I4e529992af5f651613950329e73718dbda317d2e
Reviewed-on: https://code.wireshark.org/review/13024
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-11 07:43:36 +00:00
Gerald Combs 8ee0be1513 Qt: Restore the filename in the status bar.
Change isNull checks to isEmpty. This keeps us from pushing an empty
field status and clobbering the file name in the status bar. Make sure
we do the same for other statuses.

Change-Id: I68ea669bdafc6e1177c1b8aaa07781464371de96
Reviewed-on: https://code.wireshark.org/review/13175
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-10 23:02:39 +00:00
Stig Bjørlykke 2440f534b1 Qt: Fix testCaptureFileClose without packets
In MainWindow::testCaptureFileClose() we must always stop a running
capture if closing, even if not having any packets, because
cf_close() will fail (assert) if still in progress.

This fixes an issue (crash) when closing the application with
a running capture without packets.

This also fixes restarting current capture without packets, both
with and without "Confirm unsaved capture files".

Bug: 11981
Change-Id: Id0655fcc799682a4f45c855bc2e76386dffc35a5
Reviewed-on: https://code.wireshark.org/review/13121
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-10 19:23:19 +00:00
Gerald Combs 2227b6fa70 Add a comment about improvements for the OverlayScrollBar.
Change-Id: I2953deaa29691a2d12cb158456a650202dfeec77
Reviewed-on: https://code.wireshark.org/review/13171
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-10 18:43:12 +00:00
Gerald Combs f0fd052185 Update the packet list documentation.
Update images and describe related packets and the intelligent
scrollbar. Suggest a way to make it easier to get a screenshot of
related packets.

Change-Id: I5bf27b0c53fb62f3e567765400141a374a465e4e
Reviewed-on: https://code.wireshark.org/review/13159
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-10 18:43:05 +00:00
Gerald Combs a19b2a4a1e [Automatic update for 2016-01-10]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I2087677da0b09293ff156e39acbdbab8486262f4
Reviewed-on: https://code.wireshark.org/review/13167
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-10 16:11:10 +00:00
Peter Wu 33f8f48bc0 GTK: fix infinite loop at startup
Add the tap timer after validating all preferences, otherwise a zero
timeout will result in an infinite loop, visible by a splash screen that
never goes away.

Change-Id: I180a123ac2cc7774356e17f1f1d4dcaf38f252b4
Reviewed-on: https://code.wireshark.org/review/13156
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-10 08:10:34 +00:00
Peter Wu 174dc98892 Qt: fix infinite loop when gui_recent_files_count_max is negative
Change-Id: I7cfddd865ebe0cd01230e19bf20fee7964c40324
Reviewed-on: https://code.wireshark.org/review/13155
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-10 08:07:31 +00:00
Gerald Combs 628c068a94 Qt: Save the default capture device name.
Make sure we save the device name in capture.device. This should fix
the default device selection in the welcome screen on Windows.

Change-Id: I19337cf2813f3b5aba75228e855dad0a0f5e0f78
Reviewed-on: https://code.wireshark.org/review/13138
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-09 01:33:54 +00:00
Gerald Combs 8a23da3fd2 Revert "Qt: Try to fix Main Welcome Interfaces List Scrollbar"
Instead of calling InterfaceTree::reset (which clears our selection)
when we resize, just pass our resize event to QTreeWidget.

Additionally, select our default interface using setCurrentItem. This
fixes behavior broken in gb152ca3.

This reverts commit 7baac67149.

Bug: 11733
Change-Id: I58855de38561fcb6984273ae3910c0dfcda04e69
Reviewed-on: https://code.wireshark.org/review/13135
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-08 22:46:09 +00:00
Gerald Combs 308b653da2 Qt: Queue up redissection.
Make the WiresharkApplication::packetDissectionChanged →
MainWindow::redissectPackets connection queued rather than direct.
redissectPackets eventually calls update_progress_dlg, which processes
UI events.

This should keep the profile dialog from destroying itself prematurely
in a nested event loop when the user hits "OK".

Bug: 11979
Change-Id: I7276e08c1911708c3aca5ff05ab6a40bfc336add
Reviewed-on: https://code.wireshark.org/review/13134
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-08 21:44:48 +00:00
moshekaplan cd7026951b Fix a lot of typos and misspellings
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3
Reviewed-on: https://code.wireshark.org/review/13069
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>
2016-01-08 20:04:56 +00:00
Gerald Combs 0ce9ac4137 Add a Busy status to SyntaxLineEdit.
For CaptureFilterEdit it's possible to have an indeterminate state while
we're waiting on name resolution. Add a Busy status to SyntaxLineEdit
and set the text color to a mix of the normal foreground and background
colors (gray on most platforms).

Make the Busy state valid so that we don't have to wait on an
annoyingly-long name resolution to start capturing.

Update the global capture option filters using the main welcome capture
filter when we start a capture instead of when we've finished checking
the filter syntax.

Connect the CaptureFilterEdit returnPressed signal no matter what so
that we can start a capture by pressing return in the welcome screen
CaptureFilterEdit.

Add a fake resolution timeout to the CaptureFilterSyntaxWorker debug
code to make testing the different states easier.

Bug: 11950
Change-Id: I0cf01c0fbc0dd8065cdf5a91f1d6b224291b1ce6
Reviewed-on: https://code.wireshark.org/review/13110
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-08 17:53:28 +00:00
Pascal Quantin af6768d3ef QT: add same warning as GTK when trying to save a decoded RTP stream that is not alaw/ulaw
Change-Id: Ia11e58a20c879d1ca3ead8479f8082e204d92caf
Reviewed-on: https://code.wireshark.org/review/13131
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-01-08 15:54:27 +00:00
João Valverde d3e480ac76 Fix warnings for epan/prefs.c [-Wcast-qual]
Change-Id: I86032d624ee37edc86a868eb2aaaffce81a8807b
Reviewed-on: https://code.wireshark.org/review/12719
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-08 15:28:45 +00:00
Stig Bjørlykke 5dcce344ac Qt: Sort traffic table default protos
When changing conversation types in Conversations and endpoint types
in Endpoints the tabs will be arranged alphabetically, so ensure that
the default protos also are alphabetically.

Change-Id: Ib0e8ffb744f63867e93282b7a81b1c11b0ee3dc4
Reviewed-on: https://code.wireshark.org/review/13107
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-07 12:35:55 +00:00
Guy Harris 949b9ba755 Don't include much of anything if HAVE_LIBPCAP isn't defined.
We don't need it.

Change-Id: Idca29cbd7208c388a1f5d4e2b0131f5cfddc7896
Reviewed-on: https://code.wireshark.org/review/13096
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07 05:25:19 +00:00
Guy Harris 69a81b02f5 "#ifdef" out a definition not used if HAVE_LIBPCAP isn't defined.
Change-Id: Ifc0f89706c0633925c57d1fed3a56c7e531a3b39
Reviewed-on: https://code.wireshark.org/review/13095
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07 05:20:39 +00:00
Gerald Combs 613b406023 Qt: Add recent capture filter entries.
Copy over and adapt missing logic from the GTK+ UI which adds recent
capture filter entries when we start a capture.

Change-Id: Ifcf8b719e53727b7c269d9890731d542d1759efc
Ping-Bug: 11950
Reviewed-on: https://code.wireshark.org/review/13086
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-07 01:19:21 +00:00
João Valverde f410121cf2 Remove some unnecessary dependencies and cleanup some code
No need for the GTK dependency on dissectors/packet-ipv6.h.

Add the stream_addr typedef in follow.h to make some code simpler.

Change-Id: I1cf906f58734a90263141362f2da33a140f93533
Reviewed-on: https://code.wireshark.org/review/13063
Reviewed-by: João Valverde <j@v6e.pt>
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-07 01:09:35 +00:00
Guy Harris 32cfb5a0ce Get rid of unused #define.
Change-Id: I16abf022ea79f763b82a28f9dffccbf56630f14c
Reviewed-on: https://code.wireshark.org/review/13087
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07 00:34:28 +00:00
Michael Mann 57acc227f0 KISS the Follow TCP functionality.
[KISS - Keep It Simple, Stupid]
Convert the Follow TCP functionality to use a tap from the TCP dissector that passes the tvb of the payload.  This makes things A LOT simpler, but relies on the TCP dissector to make all decisions.
The "tap" logic passes tvb data
1. Before calls to process_tcp_payload
2. Before hf_tcp_segment_data fields (that aren't retransmissions or otherwise handled)

Follow up patches will be necessary to clean up all of the supporting "follow" functionality that is now useless.

Bug: 6925
Bug: 9780
Change-Id: I4e7f5d453519be839de39a109bafa899b9987139
Reviewed-on: https://code.wireshark.org/review/13038
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-06 13:35:45 +00:00
Guy Harris 71c603b2fc Clean up more includes of wtap.h.
Change-Id: Ie53b64f7e5b39a50dffb62fc0b886da71e0a3bd2
Reviewed-on: https://code.wireshark.org/review/13066
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-06 00:25:19 +00:00
Stig Bjørlykke ffb51b3afb Qt: Disable configurable interface settings for extcap
Disable promiscuous mode, snaplen, buffer size and monitor mode
settings for extcap interfaces.

Bug: 11865
Change-Id: I20c67815ece99b8e742e36c727f415931b87af1f
Reviewed-on: https://code.wireshark.org/review/13023
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-05 14:46:12 +00:00
Roland Knall cfd5457ec0 extcap: Add regular expression validation support
Regular expressions follow the Qt Regex syntax, which is
 formulated after the Perl Regex syntax. A more detailed
 overview of the possible rules can be found at:
 http://doc.qt.io/qt-4.8/qregexp.html

 If a required option is present, even the double-click on
 the interface will first start the options dialog (Qt only)

 Required fields are marked bold and put first in the dialog.
 Additionally if validation failes (which it will if a required
 field is kept empty, but also if a non-required textfield is
 violating the defined regex), the label of the field is marked
 with red.

Change-Id: If04a1146d0dfa778332ab2a39122c7a6ee1e93d2
Reviewed-on: https://code.wireshark.org/review/12914
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-05 14:41:12 +00:00
Stig Bjørlykke a7e3ba03ce Qt: Show capture filter warning
Change-Id: I080bcb25edcee0c38984cd1a7f7f36a7fd3ff36c
Reviewed-on: https://code.wireshark.org/review/13055
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-05 14:40:27 +00:00
Stig Bjørlykke dfbea5d47c Qt: Don't check capture filter for user DLTs
This makes it possible to use a capture filter on an interface
with user DLTs (147-162).

Bug: 11656
Ping-Bug: 11668
Change-Id: Ie9931b27e8dc8ea239e7e04e26d0ae1cacba50c9
Reviewed-on: https://code.wireshark.org/review/12996
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-05 09:13:39 +00:00
Guy Harris c1d447fc88 Remove unneeded "#if 0"ed out code.
If we ever need to look at the value of any field in the packet, we
should do it the way we do in the RTP analysis code, rather than walking
the entire protocol tree.

Get rid of an unnecessary extra level of indirection for the filter
string.

Change-Id: Ie95c0171da79e7f24019a3f67396f6a533959881
Reviewed-on: https://code.wireshark.org/review/13046
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-04 21:30:54 +00:00
Guy Harris cdf9943717 Don't walk the entire protocol tree to extract the value of one field.
Instead, prime the epan_dissect_t's tree to look for rtp.ssrc, and
extract that value with proto_get_finfo_ptr_array().

Also, have the filter used to check whether the packet is a candidate
for RTP analysis to check for RTPv2 (and add a check for IPv4 or IPv6
back to the Qt version), and get rid of an unnecessary extra level of
indirection for that string.

In the Qt version, if findStreams() set the error string, don't
overwrite it with a "No streams found." indication, and fix error
handling for the "filter didn't compile" case.

Change-Id: I09d0ea37ccd4806d99e3b6394f2a8a376e974705
Reviewed-on: https://code.wireshark.org/review/13045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-04 21:14:42 +00:00
Pascal Quantin 849d87af1c PPP: fix registration of CRTP (CNTCP) protocol
Also protect against any badly registered protocol

Bug: 11958
Change-Id: I0c03f50c2c5478a9524ad06e669510ffb5739b21
Reviewed-on: https://code.wireshark.org/review/13041
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>
2016-01-04 19:17:50 +00:00
Pascal Quantin 28287ec8a7 cli: packets / bytes conversation statistics are swapped
Bug: 11959
Change-Id: I594413b26bb33f38099046e26c1d20bba7f649fa
Reviewed-on: https://code.wireshark.org/review/13042
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
2016-01-04 17:47:10 +00:00
David Morsberger fc13bf5361 Bugfix Follow HTTP byte stats
Change-Id: I23806012fc4f7f3a791e380de0c364b5825f8951
Reviewed-on: https://code.wireshark.org/review/13037
Reviewed-by: David Morsberger <dave@morsberger.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-04 01:26:59 +00:00
Michael Mann c6dee15489 Bugfix some issues with Follow HTTP Qt dialog
1. Populate packet number on follow HTTP handler.
2. Remove stream navigation (until its a little less buggy).  This follows the convention of SSL which runs on top of a stream protocol (TCP), it's not a stream itself, which seems to be why its buggy.

Change-Id: Idf21be2a00a8fde0fbf16f40ca8c36a2a44b8993
Reviewed-on: https://code.wireshark.org/review/13027
Reviewed-by: David Morsberger <dave@morsberger.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-04 01:26:22 +00:00
Guy Harris 32f9f92487 Rename ipv4_addr and ipv6_addr to indicate their full contents.
They're not just addresses, they also include a mask length for IPv4 and
a prefix length for IPv6.  Rename them appropriately.

Rename the old ipv4_addr_and_mask() and ipv6_addr_and_mask() to reflect
that 1) they fetch data from a tvbuff and 2) *don't* fetch the mask
length or prefix length, those lengths are passed as arguments to
indicate how many bytes worth of address to fetch.

Change-Id: I4cad5a186ad7bfcb60022a91dbe8bc8479e6471f
Reviewed-on: https://code.wireshark.org/review/13035
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>
2016-01-04 00:03:34 +00:00
Gerald Combs 53ba6f401f [Automatic update for 2016-01-03]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ia31206d914b7e024d71a88edd2c66ed8b3cbf4be
Reviewed-on: https://code.wireshark.org/review/13028
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-03 16:05:44 +00:00
Michael Mann 6e60dffc10 Pass SslPacketInfo structure directly to SSL tap instead of having listeners get it themselves anyway.
Change-Id: I3817d12e473b67e26159e1562a08169e91f51d46
Reviewed-on: https://code.wireshark.org/review/13019
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 15:24:33 +00:00
Michael Mann 5dd1401291 Cleanup follow stream code
Adding Follow HTTP Stream justified some refactoring and code removal.

Change-Id: I9b7ace83f8517e880e78193bb97ac32e3fc91114
Reviewed-on: https://code.wireshark.org/review/13015
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-03 15:24:21 +00:00
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
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
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
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