Commit Graph

473 Commits

Author SHA1 Message Date
Guy Harris be000686de prefs: use g_error() to report certan errors.
Other errors use g_error(); use it for these errors, so the message is
more meaningful.
2021-03-20 01:33:44 -07:00
João Valverde cff3a1c08d prefs: Don't clobber env variable G_MESSAGES_DEBUG
Avoid silently overwriting the user's configuration.

Ping #17271.
2021-03-06 12:40:20 +00:00
Gerald Combs c7f66cf934 TShark: Load extcap preferences only when needed.
In our first pass through our options, look for ones that might require
extcap. Call extcap_register_preferences() only when that's the case.

Warn about missing extcap preferences only when we've loaded them.
2021-02-11 13:36:22 +00:00
Jirka Novak cf9ffd3d83 All RTP dialogs: Added option to specify count of decimal places
Preferences are extended with advanced settings:
gui.decimal_places1 - 2
gui.decimal_places2 - 4
gui.decimal_places3 - 6

rtp_analysis_dialog, rtp_player_dialog and rtp_stream_dialog uses new settings
for formating numbers. Same information in all dialogs uses same settings.
It solves request #15481.

Note: Other UI dialogs can be adapted later.
2021-01-01 12:41:09 +00:00
Moshe Kaplan e16166a74c Detect and replace bad allocation patterns
Adds a pre-commit hook for detecting and replacing
occurrences of `g_malloc()` and `wmem_alloc()` with
`g_new()` and `wmem_new()`, to improve the
readability of Wireshark's code, and
occurrences of
`g_malloc(sizeof(struct myobj) * foo)`
with
`g_new(struct myobj, foo)`
to prevent integer overflows

Also fixes all existing occurrences across
the codebase.
2020-12-22 14:56:38 +00:00
Stig Bjørlykke 9cafd342ac Lua: Add get_preference() and set_preference() utility functions.
Support uint, bool, enum, string, range, filename and directory preferences.
Added apply_preferences() to write to file and apply changes.
2020-12-08 22:56:50 +00:00
John Thacker 524a28c4b1 QT/CLI: Move max tree items and depth to prefs
Move the maximum number of tree items and maximum tree depth to
preferences instead of hardcoded values. Refer to issue #12584 for
an example VNC capture where real data exceeds the current limit.
2020-10-23 04:18:36 +00:00
Martin Mathieson 218881dd13 Fix some spelling errors detected in epan/prefs.c
Ignored "st_sort_casesensitve", as it will not normally be seen by users,
and changing it would lose the previous setting (if set).
2020-09-01 20:43:42 +00:00
Gerald Combs 9b07412277 Qt: Add a packet diagram view.
Add a new top-level view that shows each packet as a series of diagrams
similar to what you'd find in a networking textook or an RFC.

Add proto_item_set_bits_offset_len so that we can display some diagram
fields correctly.

Bugs / to do:
  - Make this a separate dialog instead of a main window view?
  - Handle bitfields / flags

Change-Id: Iba4897a5bf1dcd73929dde6210d5483cf07f54df
Reviewed-on: https://code.wireshark.org/review/37497
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-10 18:17:50 +00:00
Guy Harris bab7b8d638 prefs: plug a memory leak.
Don't allocate the cols_hidden GString until we know we need it.

Change-Id: I02966d2820efeb5d61d259a567bf9063d8b519f1
Ping-Bug: 16335
Reviewed-on: https://code.wireshark.org/review/37043
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 00:06:57 +00:00
Peter Wu ef717da61a CMake: remove ENABLE_PCAP_NG_DEFAULT option
pcapng has been the compile-time default since 2011. If there are any
users who would like to use the libpcap format, then they should use
runtime options instead (e.g. `tshark -P` or `editcap -F pcap`).

Change-Id: I54b70368cdc3ca78bc8617bc488cc687740a1eb9
Reviewed-on: https://code.wireshark.org/review/36721
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-06 01:29:37 +00:00
Guy Harris e1e8e2dce9 Clean up some comments in the preferences file.
Automatic software updates are now supported in macOS as well.

In the file, the channel name doesn't have UPDATE_CHANNEL_ in front of
it; it's just DEVELOPMENT or STABLE.

Change-Id: I11a8e10b3c0ee6c4eec2568bf94d42c4098b82a5
Reviewed-on: https://code.wireshark.org/review/36207
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-27 05:17:57 +00:00
Orgad Shaneh b6ce60afbb Prefs: Fix name of deprecated TPNCP port preference
Change-Id: I6a5d2ca72b59ee1a77ad37b6fe6b87c6ba9d9bef
Reviewed-on: https://code.wireshark.org/review/35805
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-01-14 13:52:03 +00:00
Roland Knall 936a844cc3 Qt: Fix PacketListHeader column
Due to changes in #35206, if you have a lot of columns the display
of all columns may be hindered depending on your screen resolution.

With this change, displaying the column information can be disabled
via a Preferences->Layout checkbox element. Additionaly, the column
information will always be displayed as a tooltip element

Bug: 16317
Change-Id: Ib8c0fc0a84deaca96631270b320f3a530ba87d89
Reviewed-on: https://code.wireshark.org/review/35706
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-01-09 12:32:34 +00:00
Orgad Shaneh e0bb1ddea7 TPNCP: Update from downstream
* Support little-endian systems
* Improve error reporting
* Implement some new features in the protocol

Change-Id: I73e07a588c4a028fd0c22e1570adb7957ba2d52f
Reviewed-on: https://code.wireshark.org/review/35467
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2020-01-09 11:25:22 +00:00
Huang Qiangxiong 623b347d1e Protobuf: add dissecting protobuf fields as wireshark fields preferences, etc.
Two enhancements and one fixed bug:

1. Add dissecting protobuf fields as wireshark (header) fields preferences. User
can input the full names of protobuf fields or messages in Filter toolbar for
searching.

2. Add 'protobuf_field' dissector table. Dissector based on protobuf can register
itself to 'protobuf_field' keyed with the full names of fields of BYETS or STRING
types.

3. A bug about search MESSAGE or ENUM type in context is fixed.

4. Another small enhancement is adding prefs_set_preference_effect_fields() which
can mark a preference that affects fields change (triggering FieldsChanged event).

See the linked bug for sample capture file and .proto files.

Ping-Bug: 16209
Change-Id: Ibc3c45a6d596a8bb983b0d847dd6a22801af7e04
Reviewed-on: https://code.wireshark.org/review/35111
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-19 05:04:17 +00:00
Uli Heilmeier 3361109b15 QT/CLI: Remove limit for object export files
Removes the limit to export more than 1000 files with the same name
when exporting objects.
For this a preference name gui.max_export_objects is used.

Bug: 16010
Change-Id: Iefc138ac2617491aad3b6ad5827c9058aed112c7
Reviewed-on: https://code.wireshark.org/review/34339
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-05 22:40:27 +00:00
Michael Mann c556f307c9 Add support for "custom" DNS servers to be used in address resolution
Use the C-ARES ares_set_servers() API to set a list of DNS servers to use.
The list of DNS servers is controlled through a UAT. There is also a boolean
preference to determine if the custom list should be used.  The boolean preference
was added to arbitrate between the "default" list of servers that C-ARES creates
during initialization and using the "custom" list (which may be empty and we don't
want the "default" list to be overwritten)

Bug: 15960
Change-Id: I4ba071777f6bb9bc2fef313b7618908d805c0690
Reviewed-on: https://code.wireshark.org/review/34419
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-09-15 14:10:38 +00:00
Tomasz Moń c42433b6bb Qt: Support setting custom preferences
This makes it possible to set the console.log.level from the Advanced
preferences window.

Change-Id: I5c5551f089a935eef77f54fdcad0ba060f14edfd
Reviewed-on: https://code.wireshark.org/review/32930
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-24 00:33:37 +00:00
Guy Harris da4aea6b55 Remove a no-longer-needed DIAG_OFF/DIAG_ON pair.
If you're not casting anything, you're not casting away qualifiers, so
there's no need to disable warnings about casting away constness.

Change-Id: Ib6bb75a8683ce129078a09df385159c13d2cf306
Reviewed-on: https://code.wireshark.org/review/31355
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-04 02:28:19 +00:00
Dario Lombardo b67b47558d epan: remove redundant casts.
Found by clang-tidy.

Change-Id: Iaf6cf84c33b03ddfcd39a333b49f4987002afa56
Reviewed-on: https://code.wireshark.org/review/31338
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-03 23:39:43 +00:00
Jim Young 530c64f22c prefs: Document the possible hidden interface types
The preferences file includes an optional comma-separated string of
hidden interface type integer values (gui.interfaces_hidden_types).
Augment the interface_type enum and the preferences file to better
document what these interface type integer values stand for.

Change-Id: Idd268ed7f252cfa56dd046d24ff7ff597018f5d3
Reviewed-on: https://code.wireshark.org/review/31191
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-25 21:22:54 +00:00
Michael Mann 6db67117b5 Add ability to disable autocomplete suggestions for filter controls.
Add a preference (enabled by default) that can enable/disable the ability for Wireshark to autocomplete display and capture filter controls.

Bug: 14368
Change-Id: Ib2b688bb75c4465dab14a6a635a870d7e5c4fe80
Reviewed-on: https://code.wireshark.org/review/30320
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-22 04:45:59 +00:00
Guy Harris b77e5c93a6 Do error checking for the console log level.
Use ws_strtou32(), and do the same error checking for it that's done for
other numerical preferences.

Change-Id: Id8158129e626fa39bf221c27a8b0fc1ebf992f31
Reviewed-on: https://code.wireshark.org/review/30274
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-20 06:03:11 +00:00
Guy Harris 3fdc40f434 Use ws_basetostru32(), rather than strtoul(), when parsing uint preferences.
Also use ws_hextostru32() when parsing color preferences.

This detects additional errors such as negative values.

Addresses part of
https://ask.wireshark.org/question/5538/preference-range/.

Change-Id: I526a96fcd3c4ad1ee96b3bd682d7c7fa0bfe3434
Reviewed-on: https://code.wireshark.org/review/30269
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-19 21:15:21 +00:00
Uli Heilmeier 8dfaa8fa7c *shark: Update help and manpage for name resolving
Add 'v' option for VLAN ID resolving and get rid of
deprecated 'C' option.

Bug: 14826
Change-Id: I63104f4a465d251048693ad02882ea7eb2c4d926
Reviewed-on: https://code.wireshark.org/review/30029
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-05 13:19:05 +00:00
Guy Harris a699fbdf45 Add a mechanism to register aliases for preference modules.
That way, we don't need a chunk of code in epan/prefs.c that knows about
various preference module mappings; individual dissectors can register
aliases as appropriate.

(The Nortel Discovery Protocol never *had* any preferences, even when
it was the SynOptics Network Management Protocol, so there's no need for
it to register an alias.)

Change-Id: I4a718dac6bb06801cc06a6ee5a28d7ed81e67e5d
Reviewed-on: https://code.wireshark.org/review/29914
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29 03:24:15 +00:00
Guy Harris cc3d23fc69 Clean up indentation.
Change-Id: Ib88054f7fa3d69faf78f889e3c7fed723055b4d4
Reviewed-on: https://code.wireshark.org/review/29913
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29 01:39:32 +00:00
Guy Harris 09698df0b4 Get rid of some no-longer-supported GUI preferences.
Make them obsolete preferences; if they had any use, it was with the
now-removed GTK+ UI.

Change-Id: I2b514148c8066c5c79cb402493f47a21d3679819
Reviewed-on: https://code.wireshark.org/review/29912
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29 01:24:27 +00:00
Guy Harris 586ad18159 Get rid of the printing preferences.
They're no longer used by any of the printing code; mark them as
obsolete.

Change-Id: Iceaf14f48f1bd35757a9a158a5348f6202b90fc7
Reviewed-on: https://code.wireshark.org/review/29911
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29 00:33:20 +00:00
Dario Lombardo 7a07832712 prefs: add the option not to load interfaces on startup.
Change-Id: I2ade0647a8c32b76aebd60117b4317cd005aff91
Reviewed-on: https://code.wireshark.org/review/29854
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-26 17:11:47 +00:00
Gerald Combs 8f08a4e74e Try to discourage the use of APIs via counting.
Add the ability to specify maximum function counts for each group to
checkAPIs. Add maximum counts for the "termoutput" and "abort" groups
where needed. Show summaries in various checkAPI targets.

Switch uses of ws_g_warning back to plain g_warning.

Change-Id: I5cbddc8c671729e424eed8551f69116d16491976
Reviewed-on: https://code.wireshark.org/review/29721
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-19 16:07:03 +00:00
Gerald Combs aeadce8478 Prefs: Add a check for aliased protocol preferences.
Add a check to set_pref for aliased protocols alongside the checks for
protocols we've renamed in the past.

Change-Id: I62ad2ddb17d66bd7385635bfa6ca1dd58fad6ad5
Reviewed-on: https://code.wireshark.org/review/29651
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-13 20:48:56 +00:00
Stig Bjørlykke 400f748b04 Qt: Add some window title variables
Add some new variables to be used in custom window title.

%F = file path of the capture file
%S = a conditional separator (" - ") that only shows when surrounded
     by variables with values or static text

Change-Id: I20a60a3018cc86236f4991030eadb7f51681cc32
Reviewed-on: https://code.wireshark.org/review/29534
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10 19:50:55 +00:00
Peter Wu 8f4b040124 prefs: pacify checkAPIs by using ws_g_warning
Change-Id: I15ead09ed5b8df33d795d2c6ed75cd911790113b
Reviewed-on: https://code.wireshark.org/review/29560
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-10 13:37:54 +00:00
Peter Wu ad0de0ffbc prefs,ui: properly migrate old filter expressions
When legacy filter expressions preferences are present, be sure to
(1) save the dfilter_buttons file when updating the preferences file and
(2) save the preferences file after updating the dfilter_buttons file.

Without doing (1), the old buttons will be lost. Without (2), restarting
Wireshark will result in duplicate buttons. Only write the files if the
user actually made other changes to avoid breaking profiles by just
opening Wireshark.

Bug: 15114
Bug: 15121
Change-Id: I5b9417c34146c4450526781a20308c9c98fb44a1
Reviewed-on: https://code.wireshark.org/review/29488
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-10 09:27:34 +00:00
Stig Bjørlykke 2f297457af prefs: Improve check for visible custom columns
Add a check for the resolved setting when searching for hidden columns
in prefs_is_column_visible(). This allows hiding one of two equal custom
columns where the only difference is the resolved setting.

Change-Id: Iafb4ffa7bf258948fbe973e038bbeb26d6e8d2e3
Reviewed-on: https://code.wireshark.org/review/29433
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-05 17:51:18 +00:00
Stig Bjørlykke 5af98d9be5 prefs: Remove prefs.gui_use_pref_save
This setting was only used in GTK.

Change-Id: If184c61e4e081992e517f480b4faf129b81508c1
Reviewed-on: https://code.wireshark.org/review/29388
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-02 18:36:25 +00:00
Peter Wu 0be9d149d0 prefs: fix range preferences-related crash after switching profiles
The HTTP dissector could crash (use-after-free) after switching
profiles. In reinit_http, it would assign the return value from
prefs_get_range_value to a global variable which is consulted during
dissection. This value is invalidated while switching profiles (via the
"prefs_reset" function), but is not reinitialized (because the
reinit_http function was not called).

A similar issue exists in the Kafka, UAUDP, VNC, TFTP, Gopher and TDS
dissectors. To reproduce using a capture from the SampleCaptures wiki,
start "wireshark -r vnc-sample.pcap -ovnc.tcp.port:1" and switch
profiles. For the HTTP crash, load any HTTP pcap and switch profiles.

Change-Id: I8725615504a8a82ae46255625a41e2188c07320a
Fixes: v2.3.0rc0-2097-g21a3b8cc71 ("Internalize struct preference")
Reviewed-on: https://code.wireshark.org/review/29030
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-09 04:52:53 +00:00
Peter Wu d3e3c00fbb prefs: fix crash when importing old filter expression preference
When the filter label was missing, it would result in a crash
(use-after-free) while reading the next expression. For example:

    gui.filter_expressions.label: Not-Junk
    gui.filter_expressions.expr: tcp.flags.reset==1
    # note: missing label preference
    gui.filter_expressions.expr: dns

While at it, do not duplicate the filter expression,
"filter_expression_new" has always been copying it.

Change-Id: I980fd720c9a04b679a71dd2e7e8bf5e53c72ac43
Fixes: 1a046d693b ("Added Filter Toolbar Save functionality.")
Bug: 11648
Reviewed-on: https://code.wireshark.org/review/28471
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-27 06:10:04 +00:00
Paul Zander 53dfec9b99 Qt: Configure the selection color via the preferences
The active selection color and inactive selection color can be configured via Edit / Preferences / Font and Colors
There are 3 styles that can be used for the selection color:
Default: legacy behavior
Flat: Use background and foreground color with no gradient.
Gradient: Use background and foreground color with a gradient.

Bug: 14714
Change-Id: Ieca293bb9830d2c5702949d0459d1d6f679e41e4
Reviewed-on: https://code.wireshark.org/review/27701
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-25 11:07:01 +00:00
Michał Łabędzki bded74eb66 Do not use #if* in struct
Do not assume that somebody always includes "config.h" with "epan/prefs.h",
because I do not include that one and I notice a lot of bugs, like:
in one file sizeof(prefs) is 538 but in another is 544...
and of course preferences do not work as expected - order of fields
in the struct was changed. Try to avoid #if in struct.

Remove dependency of config.h for prefs by removing #ifs, because all prefs
should be registered also if not used.

Change-Id: I02f71d2e64acf3e0f90c802b1610cc4620727051
Reviewed-on: https://code.wireshark.org/review/27654
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-21 12:05:26 +00:00
Paul Zander e4edeab1e0 prefs: fix bug in color saving
Colors were only saved and effectuated when all 3 color components are changed.

Change-Id: I0d82ac8d62780e507714bc48c310338e87deefea
Reviewed-on: https://code.wireshark.org/review/27639
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-19 06:19:30 +00:00
Peter Wu 819696eaa7 prefs: remove wimaxasncp.udp.wimax_port compatibility
This fixes a warning when plugins are not built ("Deprecated ports pref
check - module 'wimaxasncp' not found").

This warning was added in v2.9.0rc0-372-gf7296644c5 ("prefs: fix
importing some old protocol preferences") which also corrected the
wimaxasncp module name, but as this broken preference was never noticed
before, just remove the compatibility pref to fix the warning.

Change-Id: I97430fcb00ce0e489bcf0ae3ac47c9b211705518
Reviewed-on: https://code.wireshark.org/review/27632
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-18 12:48:59 +00:00
Gerald Combs 9ec5b2b0fe Qt: Implement the capture info dialog.
Add back the capture info dialog. Draw sparklines for each protocol.
Update the User's Guide.

Bug: 12004
Change-Id: I45be8a0df4752255831a8b139ee84bb34d675ba9
Reviewed-on: https://code.wireshark.org/review/27565
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:26:36 +00:00
Guy Harris 4e0de38081 Get rid of GTK+-only structure member.
Change-Id: I93e1a44ff3b22ba6ff0c14853e78c935347ed290
Reviewed-on: https://code.wireshark.org/review/27478
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-12 22:47:24 +00:00
Pascal Quantin 092564a336 prefs.c: fix compilation with gcc 8
error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: Id9f791c78e45d2373c3c1ce57059ef1e973a2fb1
hange-Id: I25597a730efcd580a1dd327d4fc38ab940a8b4d8
Reviewed-on: https://code.wireshark.org/review/27263
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-03 04:12:14 +00:00
Peter Wu f7296644c5 prefs: fix importing some old protocol preferences
Some preference modules did not exist, so importing would not work.
While vuze-dht used to have a configurable protocol name, it no longer
supports that, so remove it from the list.

Add some sanity checks to prevent bug 14316 from going undetected again,
and to ensure that dead code is removed when prefs are removed.

Change-Id: I5df809af66a6c19f9eb9a6b75d5e60c96008cde4
Fixes: v2.3.0rc0-971-g268841f3e0 ("Combine Decode As and port preferences for tcp.port dissector table.")
Reviewed-on: https://code.wireshark.org/review/27227
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 04:09:57 +00:00
Peter Wu 2ed9115a4b prefs: fix crash when setting certain obsolete port preferences
Loading an old Wireshark profile with certain deprecated preferences
could result in a crash due to type confusion. If the new preference was
a range type, then four bytes of the pointer (address) to the range was
overwritten with the numeric value of the deprecated preference.

Minimal reproducer:

    tshark -opgm.udp.encap_ucast_port:0 -r ../test/captures/empty.pcap

Bug: 14316
Change-Id: Ia8dc24f81f6b2e6494448dadffe810606765cb9e
Fixes: v2.3.0rc0-971-g268841f3e0 ("Combine Decode As and port preferences for tcp.port dissector table.")
Reviewed-on: https://code.wireshark.org/review/27226
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 10:27:53 +00:00
chinarulezzz 993b47eb40 remove redundant break statement
Change-Id: Ib6d4bbb1662d921fc4b5920b50e47d2b30ebb95c
Reviewed-on: https://code.wireshark.org/review/27103
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 04:33:12 +00:00