Commit Graph

1850 Commits

Author SHA1 Message Date
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
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
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
Roland Knall 3c00899144 extcap: Fix NMake build issue
The new source was not added to the project file.

Change-Id: I58d65bcab1d1b468f14c224cc8a4ae15e9fbbbf8
Reviewed-on: https://code.wireshark.org/review/12947
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-30 11:12:46 +00:00
Roland Knall 0d47113ddc extcap: Add file extension check
The file-open dialog can now be set with file extensions, allowing
 the exclusion of unwanted file types. The syntax is the same
 as for the Qt QFileDialog, e.g.: "Wireshark (*.pcap *.pcapng)"

 Also, the mustexist option is now considered correctly

Change-Id: I9d4efbb5089ce1af640b2a894de07ed79520271e
Reviewed-on: https://code.wireshark.org/review/12913
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-30 08:11:57 +00:00
Roland Knall 0921c8214e extcap: Add Required and cleanup
An option may now use the "required=true" argument (see sshdump.c)
 which will ensure, that the capture can only be started via the
 dialog, if the option has been provided. To ensure, that this is
 working properly, multiselect has been moved to a separate source
 file.

 Renamed one method so it may not interfere with a future save
 functionality, and cleaned up the interface to use only default
 buttons and roles

 ONLY the Qt interface is being supported.

Change-Id: Ie1c9a63c1bba2e557d55b1de6f4775d8b9fce515
Reviewed-on: https://code.wireshark.org/review/12912
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-30 08:10:54 +00:00
Gerald Combs b152ca3c20 Qt: Show physical interfaces first.
List physical interfaces before virtual (extcap) interfaces in the main
window. As cool and interesting as the randpkt interface is, I'm not
sure it should come before interfaces with live traffic.

Resize our columns once instead of each time we add an interface.

Change-Id: I917532ab1d76b48c3e307d1f5a1c6c02def4e8aa
Reviewed-on: https://code.wireshark.org/review/12933
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>
2015-12-30 05:34:39 +00:00
Guy Harris 36615661d5 Fix compile problems on OS X.
Apparently, the C++ compilers on the OS X buildbots don't realize that a
reference cannot be null and therefore that there's nothing ambiguous
about QString(NULL) - the NULL must be a "const char *".  Instead, use a
constructed null QString.

Change-Id: Ibc56ea7f84c5e49cf3b1974c3de905bf23e90ff0
Reviewed-on: https://code.wireshark.org/review/12928
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 23:13:43 +00:00
Alexis La Goutte 936359053a Qt: Add gui.prepend_window_title option
Bug: 11102
Change-Id: I659b6be4652a65542c217370e01340e4696c0e31
Reviewed-on: https://code.wireshark.org/review/12653
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>
2015-12-29 18:01:27 +00:00
Alexis La Goutte 6c42a103e8 Qt: Add support of gui.window_title
Ping-Bug: 11102
Bug: 11691
Change-Id: I7b1673ffafcda644f4905265061ba11733dd91d3
Reviewed-on: https://code.wireshark.org/review/12650
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-29 18:00:47 +00:00
Alexis La Goutte f145108f5e Qt: Remove usage of setWindowFilePath
Change-Id: I29591709d88d1858e44c753d09e4a29d0f28ce53
Reviewed-on: https://code.wireshark.org/review/12781
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-29 18:00:14 +00:00
Guy Harris ddd217469d Always supply a g_mallocated error message from select_rlc_lte_session().
That way, we don't have to pass a "free this" indication separately.

While we're at it, don't just free the error message, *display* it in
all cases where rlc_graph_segment_list_get() fails.

(I wish more programming languages had a proper string type, including
some whose names consist solely of the third letter of the alphabet, but
I digress....)

Change-Id: I99f8b088aa19bc8fbb178bdb36d85ba5b89c06e0
Reviewed-on: https://code.wireshark.org/review/12902
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 08:01:54 +00:00
Guy Harris 9067ee8f5a Rename new_stat_tap_ui to stat_tap_table_ui.
A "new" statistics tap UI is a statistics tap UI where the statistics
are maintained as tables and common code handles the tables; what
matters is the tables, not that it's "new".

Change-Id: I7a0e63cfac98c24cd5e7dce973b9a0cc5b6a03ba
Reviewed-on: https://code.wireshark.org/review/12897
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 00:31:37 +00:00
Guy Harris 0c156fec93 There's no "old" stat_tap_table, so remove "new_" from the name.
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72
Reviewed-on: https://code.wireshark.org/review/12896
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 00:20:09 +00:00
Stig Bjørlykke df9e7d5937 Code cleanup
This is a small code cleanup to sync with master-2.0.

Change-Id: I96a0fbd8bbb7bfde9d69a9bf512de839b2ca1536
Reviewed-on: https://code.wireshark.org/review/12894
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-28 23:18:27 +00:00
Pascal Quantin a1c27ef7cf Qt: fix QString::arg: Argument missing: "PT=%u telephone/event" warning
Change-Id: If6065d0895a4bf8311badfff74bb1dff5841490d
Ping-Bug: 11918
Reviewed-on: https://code.wireshark.org/review/12881
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>
2015-12-28 19:27:49 +00:00
Michael Mann 5e4bbcda98 Refactor GUI dependencies out of color_filters.[ch] and move it to epan directory.
This also moved color.h into color_filters.h

Change-Id: Ic19e27aa1b3ec67e764aa7ee8bbef7b1187bb12e
Reviewed-on: https://code.wireshark.org/review/12831
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-28 18:33:41 +00:00
Gerald Combs e7da80d9ed [Automatic update for 2015-12-27]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ib19b36e9bc2d5c8cdbbeb3291b32f4291e619851
Reviewed-on: https://code.wireshark.org/review/12876
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-27 16:10:15 +00:00
Michael Mann ea2a3ac402 Initialize Qt info_data_t structure in constructor.
GTK and TShark should already have structure initialized to 0 because they are global variables.

Change-Id: I43a38c58f32967d201ddf78e450b2483f28f8bd6
Reviewed-on: https://code.wireshark.org/review/12847
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-23 18:22:38 +00:00
Stig Bjørlykke 8bd135366e Added HAVE_LIBPCAP guards
The info_data struct is only when HAVE_LIBPCAP.

Change-Id: I30a3f974cbe3c1474bfe288b222f5871d674bada
Reviewed-on: https://code.wireshark.org/review/12846
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-23 12:11:21 +00:00
Roland Knall 35ee09e0f0 capture_info: Fix initialization of packet counter
g_hash_table_destroy will crash, if it is called on
 non-initialized memory. For some reason, this does not happen
 with other glib lists (e.g. GList seems to guard cleanly).

 This change initializes at the earliest possible time the
 packet counter hash with NULL

Change-Id: Ice66652fc9639d10b49d006ecbe80efe3f41e2ff
Reviewed-on: https://code.wireshark.org/review/12841
Reviewed-by: Roland Knall <rknall@gmail.com>
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>
2015-12-23 11:35:25 +00:00
Stig Bjørlykke 2997178795 Qt: Plug memory leak in ByteViewText.
Each time we create a ByteViewText, which is twice when a packet is
selected, the menu items leaks.  Ensure we clear the items when done.

Change-Id: Idf0c7b82bf241120dd4c42ba85c56c0a2bf8db46
Reviewed-on: https://code.wireshark.org/review/12826
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>
2015-12-22 20:43:02 +00:00
Michael Mann 39bdeb2706 Confirm discarding data before restarting capture.
Modify existing MainWindow::testCaptureFileClose() to handle restart scenario.

Bug: 9605
Change-Id: Ie57624ca482b050745474f5e1c61343f60292a42
Reviewed-on: https://code.wireshark.org/review/12733
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-21 13:26:30 +00:00
Stig Bjørlykke 25e417f01a Qt: Fix Confirm unsaved capture files preference.
Set initial value for confirmUnsavedCheckBox.

Change-Id: I7dfebf21e516a9d1be1bd3f543a00834222c9ff7
Reviewed-on: https://code.wireshark.org/review/12739
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-20 20:31:23 +00:00
Stig Bjørlykke 8fe68db944 Add COL_CUSTOM_PRIME_REGEX
Use this as a common regex to split multi-field custom columns.

Change-Id: I40f76743284c5981c95d2e47d6d1d2a7f357d2ea
Reviewed-on: https://code.wireshark.org/review/12753
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-20 20:26:20 +00:00
Gerald Combs c067ba606e [Automatic update for 2015-12-20]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I888e6e56894ab3226ad32e8f1d5e3d351cfcd8d8
Reviewed-on: https://code.wireshark.org/review/12747
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-20 16:10:26 +00:00
Michal Labedzki 9bb3f6be4c Qt: Add missing multi-field column validation
GTK already has it, but Qt forgot about it, so multi-field custom column
works ok if previously saved in GTK-shark. Invalid validation prevent from
modifying and saving multi-field custom column in Qt version.

While at it, rename "custom field" to "custom fields" to ensure
we think about multi-field custom column.

Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb
Reviewed-on: https://code.wireshark.org/review/12685
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-20 08:21:02 +00:00
Jeff Morriss 714c59777a Qt UI: use a default (and minimum) value of 2 for the number of files in a
ring buffer.

This matches the Gtk UI.

(Note that the Qt UI's upper limit for this option (1k) is much lower than
the Gtk UI's (100k).)

Change-Id: Ie5b5b7b4bdb9205594ed7fcc38630a6268cc3acf
Reviewed-on: https://code.wireshark.org/review/12711
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>
2015-12-19 14:56:21 +00:00
Michael Mann 444dfda793 Allow "capture info data" to not be a singleton.
It was buried as a static variable in capture_info.c, and functions were refactored to allow a pointer to the info_data_t structure to be passed in. TShark and GTK will have their own single (global) copy of the structure, while it opens up Qt to have multiple instances.

Change-Id: Ic2d7a2ad574de43f457cb18b194d6bc3fffb6120
Reviewed-on: https://code.wireshark.org/review/12691
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-19 14:22:56 +00:00
Michal Labedzki 7baac67149 Qt: Try to fix Main Welcome Interfaces List Scrollbar
Bug: 11733

Change-Id: Ic144634acce7b9e9eb9821ca6452694cb2dcf4dd
Reviewed-on: https://code.wireshark.org/review/12684
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-12-19 12:51:03 +00:00
Jeff Morriss 8d8f37e28c Qt UI: there's no need to capitalize kilobytes, megabytes, and megabytes in
the ring buffer and autostop configuration sections.

Change-Id: I2a260e4f9e52444ee9d6c072bce34067dd74cc19
Reviewed-on: https://code.wireshark.org/review/12712
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>
2015-12-18 17:05:57 +00:00
Pascal Quantin 47a4c8f395 Qt: use recent.gui_bytes_view preference to remember bits / byte view
While we are at it, let's centralize bytes_view_type definition

Bug: 11903
Change-Id: I606c779a8efaea668db1b440d3ae0336e6e3fc67
Reviewed-on: https://code.wireshark.org/review/12706
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: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-18 06:46:46 +00:00
Pascal Quantin 38cde83a5c Qt: reset columns when applying a display filter
Bug: 11786
Change-Id: I7d3b4139328adaf2f79f008a8772b3182c1eb1f0
Reviewed-on: https://code.wireshark.org/review/12688
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-17 18:12:51 +00:00
Michal Labedzki 2da59158a0 Try to fix some PVS Studio warnings
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 626
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 661
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 678
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 689
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 700
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 711
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 728
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 739
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 750
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 761
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 810
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 867
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 889
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 949
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 971
V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 1876
V512 A call of the 'memcpy' function will lead to underflow of the buffer 'packet + exported_pdu_headers_size'. androiddump.c 1950
V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 2053
V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 2056
V512 A call of the 'memcpy' function will lead to underflow of the buffer 'packet + exported_pdu_headers_size'. androiddump.c 2122
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. androiddump.c 2207
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. androiddump.c 2227
V530 The return value of function 'freopen' is required to be utilized. androiddump.c 2275
V530 The return value of function 'freopen' is required to be utilized. androiddump.c 2279
V808 'name' object of 'QString' type was created but was not utilized. bluetooth_devices_dialog.cpp 201
V807 Decreased performance. Consider creating a pointer to avoid using the 'ui->tableTreeWidget->headerItem()' expression repeatedly. bluetooth_devices_dialog.cpp 337
V807 Decreased performance. Consider creating a pointer to avoid using the 'item->child(i_item)' expression repeatedly. bluetooth_hci_summary_dialog.cpp 648
V807 Decreased performance. Consider creating a pointer to avoid using the 'ui->tableTreeWidget->headerItem()' expression repeatedly. bluetooth_hci_summary_dialog.cpp 669

Change-Id: Ia81b5f867b2b1e0ee58eed0bd297800774bc37f9
Reviewed-on: https://code.wireshark.org/review/12683
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>
2015-12-17 14:17:27 +00:00
Pascal Quantin ad36e1b43e Qt: deactivate "limit to display filter" checkbox when retapping
Bug: 11848
Bug: 11900
Change-Id: I39bc1f6d8006ee9c258c986a69b460cf99c7e65a
Reviewed-on: https://code.wireshark.org/review/12687
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>
2015-12-17 08:13:28 +00:00
Pascal Quantin bfe73e3ad7 Qt: save custom colors in recent_common file
This allows to save colors across sessions for systems other than
OSX that do not provide a system wide color picker

While we are at it, let's stop reading the recent file twice at startup

Bug: 11888
Change-Id: I69ff14d699d8111fe6a8bdac0157fcd115a60c2b
Reviewed-on: https://code.wireshark.org/review/12659
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: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-16 06:53:24 +00:00
Peter Wu e3dd3f97f1 Qt: fix memleaks related to interface dialog
Also fix a not-so-problematic recent files "leak" when quitting
Wireshark.

Change-Id: I8556b07c197f0934f93d6da8c573c47fbd3fc060
Reviewed-on: https://code.wireshark.org/review/12529
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>
2015-12-16 05:43:58 +00:00
Pascal Quantin 9ad40ff6c9 Qt: resize Follow Stream conversation QComboBox to its content
Bug: 11887
Change-Id: Ibc3bd6ed8c0615f8bcf417ca1ba4d872f81ade92
Reviewed-on: https://code.wireshark.org/review/12644
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>
2015-12-15 09:10:47 +00:00
Dario Lombardo 862625f430 qt: add init values to make clang happy.
Found by clang analyzer.

Change-Id: I04598e8e9fcb716b373d4b2f707de8f263ff36b0
Reviewed-on: https://code.wireshark.org/review/11029
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>
2015-12-15 08:57:40 +00:00
Pascal Quantin 01de59202d Qt: TCP/UDP streams are off by one in follow stream window
Bug: 11889
Change-Id: I6a274c8b1df8b78f4063534d534002848bd0f199
Reviewed-on: https://code.wireshark.org/review/12642
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-15 08:00:44 +00:00
Stig Bjørlykke e73fc7e51e Qt: Removed applyRecentColumnWidths from recentFilesRead
Adjusting column widths from recent settings is only needed
when columns has changed.

Don't recreate the columns when changing timestamp options or
name resolution, only reset columns.

Change-Id: I4c9a9f63c34542935dd282188d98b2b5b013c5f3
Reviewed-on: https://code.wireshark.org/review/12579
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>
2015-12-13 18:50:53 +00:00
Gerald Combs 9fcf004cdb [Automatic update for 2015-12-13]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I690eec9b47df9bbc770773f8c7a8e1c4b4ef5415
Reviewed-on: https://code.wireshark.org/review/12588
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-13 16:11:35 +00:00
Gerald Combs 76dd8a27b7 Start deprecating the capture info API.
The GTK+ UI has a capture info dialog which shows a summary of captured
protocols, including IPX (!), NetBIOS (!!) and VINES (!!OMG!!). It's
been disabled by default since 2006 (g59aa9e40).

Remove the preference in the Qt UI capture pane. It's still available
via the advanced prefs. Add comments in various parts of the code noting
that the capture_info routines and structs are GTK+ only. Also note that
if we *do* want to add a Qt capture info dialog we'll probably want to
modernize the information we show.

Change-Id: I3c63f6f01b60f0767fb33602a7f0c3b537dbde51
Reviewed-on: https://code.wireshark.org/review/10991
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13 04:25:13 +00:00
Pascal Quantin f06bbe37c1 Qt: validate format string before calling strftime()
According to https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx
an invalid string will trigger invalid parameter handler

Also check the validity of each field before activating import button

Bug: 11873
Change-Id: I9fc1c6e061a02354690871410f0e2cf2e0dd86a7
Reviewed-on: https://code.wireshark.org/review/12537
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: Guy Harris <guy@alum.mit.edu>
2015-12-12 23:49:50 +00:00
Stig Bjørlykke 5133221a19 Qt: Apply recent column widths when columns changed
When changing columns in the preferences or when removing a column
from the packet list header menu we need to apply recent column
widths to preserve the remaining columns widths.

Change-Id: Ie5c074722424b5cee31af3b6953ab1b026ba7fa5
Reviewed-on: https://code.wireshark.org/review/12575
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-12 22:15:39 +00:00
Mikael Kanstrup 3120d1f801 Fix memory leaks in all_ifaces when interface list changes
Valgrind report leaks of several allocations like these:
590 bytes in 50 blocks are possibly lost in loss record 29,818 of 31,670
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xCB9C8A7: __vasprintf_chk (vasprintf_chk.c:82)
   by 0xA3D8DCA: g_vasprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
   by 0xA3B846C: g_strdup_vprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
   by 0xA3B850B: g_strdup_printf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
   by 0x6F4B51: scan_local_interfaces (iface_lists.c:254)
   by 0x6EF3D8: iface_mon_handler2 (iface_monitor.c:113)
   by 0xBE56F1D: ??? (in /lib/libnl-3.so.200.3.0)
   by 0xBA16F19: ??? (in /usr/lib/libnl-route-3.so.200.3.0)
   by 0xBE54E5E: nl_cache_parse (in /lib/libnl-3.so.200.3.0)
   by 0xBE585CA: nl_msg_parse (in /lib/libnl-3.so.200.3.0)
   by 0x6EF372: iface_mon_handler (iface_monitor.c:123)

When the list of network interfaces is updated allocations done
for global_capture_opts.all_ifaces elements leak memory. Fixed by
introducing a helper function to be used for removing an interface_t
element from all_ifaces array. While at it also fixed misc leaks when
updating individual allocated records of all_ifaces elements.

Change-Id: I035e6936a44edeef2ebe4780931c14cde99e93a4
Reviewed-on: https://code.wireshark.org/review/12209
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>
2015-12-11 10:38:32 +00:00
Peter Wu 19cbcca594 Qt: restore conversation coloring rule shortcuts
GTK+ had this very useful Ctrl+1 .. Ctrl+9 shortcuts for conversation
coloring rules. Add this functionality to Qt too.

Ctrl+0 is not ported though, this now means "Restore zoom" which is
quite logical. Also, Ctrl+= (shortcut in GTK+) somehow does not work in
Qt 5.5.1 (it is detected as Ctrl++ instead).

Change-Id: I5528c723ef6d4ea11298a135db8539a8d03d9aae
Reviewed-on: https://code.wireshark.org/review/12506
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>
2015-12-11 05:20:04 +00:00
Stig Bjørlykke bfcd1e6514 Qt: Reset preferences when reloading Lua plugins
Reading configuration files may duplicate some entries, so ensure
we reset preferences before reloading.

Change-Id: I746414cbc10c206ddf47669856f329b9e0202a0d
Reviewed-on: https://code.wireshark.org/review/12496
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-10 14:08:58 +00:00
Stig Bjørlykke 7e06334a87 Qt: Disable Refresh Interfaces while refreshing
Doing multiple Refresh Interfaces simultaneously will end up in
duplicated interfaces.

Change-Id: If9bb4252bbfabc557b78ad42efc0011050012417
Reviewed-on: https://code.wireshark.org/review/12414
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>
2015-12-09 17:01:43 +00:00