Commit Graph

3460 Commits

Author SHA1 Message Date
Guy Harris 08ccac8704 Do all floating-point work in double-precision.
That squelches some double -> float warnings.

Change-Id: I19b8049698c7931e8c146d9532fc65ee091e4c24
Reviewed-on: https://code.wireshark.org/review/8490
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-16 22:50:15 +00:00
Guy Harris 1715be25b1 Use nstime_t for time stamps.
Don't roll our own time stamp handling, use nstime_t.  That also gives
us nanosecond resolution, for what that's worth.

Change-Id: Ib9945bdef5a70e1656b96995f510507da36b4b59
Reviewed-on: https://code.wireshark.org/review/8489
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-16 22:24:29 +00:00
Alexis La Goutte aa6466a7b5 Main (menubar): fix C++ style comments are not allowed in ISO C90
Change-Id: Ia8ae6780027a63c4a88ea8d2a10ba1e0f8931f25
Reviewed-on: https://code.wireshark.org/review/8472
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-16 01:16:32 +00:00
Gerald Combs a04a894731 Qt: Stop tapping when the I/O Graph dialog closes.
Add a setCaptureStopFlag function to ProgressBar. Add a stopTapping
function and setCaptureStopFlag signal to CaptureFile. Use the new
plubming to stop tapping when the IO Graph dialog closes.

Bug: 10116
Change-Id: Ic46814eed18933f511d9d1ff37e2e7918741f353
Reviewed-on: https://code.wireshark.org/review/8480
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 21:48:03 +00:00
Gerald Combs a1eb0aaeb3 Qt: Make sure we can fetch ExportDissectionDialog's layout.
Make sure ExportDissectionDialog is a non-native, funny-looking file
dialog so that we can fetch its layout.

Fix and add some URLs while we're here.

Bug: 11122
Change-Id: Icf62f7a436c7ba27ec20f84e7c1af1a5d7c9b949
Reviewed-on: https://code.wireshark.org/review/8479
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 18:14:20 +00:00
Gerald Combs 0ae949643f Qt: Fixup sequence dialog buttons.
Switch from "Save As" + Cancel + OK to "Save As" + Close.

Change-Id: I6f1093965f90fe9cbbfbf053779c05388c897641
Reviewed-on: https://code.wireshark.org/review/8474
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 16:45:42 +00:00
Gerald Combs 76a5465cf0 Qt: Fix packet deselection.
When no packets are selected, clear the related item delegate, packet
detail, and byte view. Also, don't crash.

Bug: 10529
Change-Id: I1f46d0d60d060d517f1ee2f8b5a9124bc1fad00e
Reviewed-on: https://code.wireshark.org/review/8470
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 16:07:29 +00:00
Edwin Groothuis f1a747e96e ui/mcast_stream.c: Add dependency on sys/time.h for struct timeval
Needed to compile on FreeBSD.

Bug: 11199
Change-Id: I6b10a0954020d58dcec93364ebecc8a7069ac8f3
Reviewed-on: https://code.wireshark.org/review/8467
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
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-05-15 13:16:48 +00:00
Roland Knall 57716e1365 Qt: Implement "Apply as Column" for packet context
Implement the same functionality for "Apply as Column" as it
 exists in the GTK version of Wireshark. Especially for the
 context menu in the packet view panel.

Change-Id: Id25b7797616ff3b3acf7aa920395516c8a4e9bf9
Reviewed-on: https://code.wireshark.org/review/7604
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-15 06:05:01 +00:00
Gerald Combs 7f424b5a55 Pop the display filter status when it loses focus.
Change-Id: I7878fd99f8b773f8c550a6d2416e9e2d44abd321
Reviewed-on: https://code.wireshark.org/review/8466
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 22:41:42 +00:00
Gerald Combs 4ba370e0d4 Don't complete the current field.
Change-Id: If2b16783d08d23df427ac9b9c86984245db56d53
Reviewed-on: https://code.wireshark.org/review/8465
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 22:12:56 +00:00
Gerald Combs 63e94c5af1 Fix display filter completion behavior.
Allow completion for mismatched protocol and filter names.

Change-Id: I1d1e6b8f16d4d2d331b915c199f857835dcc1c53
Ping-bug: 11187
Reviewed-on: https://code.wireshark.org/review/8464
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 22:03:35 +00:00
Gerald Combs 294706a1bf Fix packet list font zooming.
Change-Id: I376fc3b41e9ebbe1353527d8d3bbf8d4b86cc29a
Reviewed-on: https://code.wireshark.org/review/8463
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 18:04:09 +00:00
Gerald Combs 2e7524085c Qt: Apply protocol preferences.
Make sure we call prefs_apply_all when saving preferences.

Bug: 11119
Change-Id: Iacf1e28e69c2aebcbbd7dceaa210c8219663665f
Reviewed-on: https://code.wireshark.org/review/8462
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 16:31:38 +00:00
Gerald Combs 2156413bf9 Qt: Column preference fixes.
Don't call redrawVisiblePackets in PacketList::sectionResized. Otherwise
we trigger the crash in bug 11179. Call recent_set_column_width instead.

Clean up the slots called when column preferences change and when recent
column widths change.

Update our column visibility in redrawVisiblePackets.

Use recent_get_column_width when writing the recent file. columnWidth
doesn't return a valid value when we're not visible.

Bug: 11179.
Change-Id: I34ab93d944b341e42129a1c8ff94ba8f7ad4f5fc
Reviewed-on: https://code.wireshark.org/review/8457
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 15:37:35 +00:00
Gerald Combs 2793069020 Add a comment explaining completion misbehavior.
Note that field name completion won't work correctly if a field's abbrev
doesn't match its protocol filter name. Fixing this is left as an exercise
for the reader.

Change-Id: Ia9b55f20bf58b8252e27506bcce4a0dd71cc199c
Reviewed-on: https://code.wireshark.org/review/8460
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 15:36:24 +00:00
Gerald Combs 4a37dfc57e Qt: Add the correct column width padding.
When applying recent column widths, add the correct padding in the
right place.

Bug: 11175
Change-Id: I5a6fe7975764ddc5d9024d8839a837579b2bf799
Ping-Bug: 11179
Reviewed-on: https://code.wireshark.org/review/8456
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 20:41:51 +00:00
Gerald Combs 703b5dc48a Qt: Don't set ProtoTree::uniformRowHeights.
Some packet detail items contain multiple lines. Show them, which
duplicates the GTK+ UI behavior. Add a note about adding a custom item
delegate if this affects performance.

Make item labels QStrings while we're here.

Bug: 10225
Change-Id: Ia39320028ecff5fe7fa3e4c09ff37405986b7f6e
Reviewed-on: https://code.wireshark.org/review/8445
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 19:37:58 +00:00
Gerald Combs 84db6a661d Fix an error found by Valgrind.
Change-Id: I9f0adac70129c90b4bf1e678bece6c6b8b8b4b75
Reviewed-on: https://code.wireshark.org/review/8455
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 19:04:51 +00:00
Alexis La Goutte a3666e5e39 QCustomPlot: fix division(or modulo) by zero found by Clang and Coverity (CID 1159170 & 1159171)
Try 2

Change-Id: I10c439ccd4b8e5ac24275332e35fb35ad95b8d1b
Reviewed-on: https://code.wireshark.org/review/8447
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-05-13 17:38:04 +00:00
Gerald Combs 4c4328e316 Try to avoid duplicate display filter completions.
When adding recent filters to the completion list, skip over items that
look like fields and assume they'll be added further down the line.

Change-Id: Ief1e7aeebf91504becc2e07ba9cad66a90d8c7f3
Reviewed-on: https://code.wireshark.org/review/8453
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 16:37:03 +00:00
AndersBroman 6d1b6f4692 [VoIP] There has to be two separate routines for MEGACO and H248 as
tap_id_offset is used to access tapinfo. Fixes a crash rported in

Bug: 11132
Change-Id: I32ada3e0eb16d0e128ff67c5aec499890602eab0
Reviewed-on: https://code.wireshark.org/review/8449
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-13 11:31:31 +00:00
Michael Mann 0bf4299ec9 Change the formatting strings used to create the Conversation Filter submenu
Bug: 11178
Change-Id: I4a5ae1399da8206efb29c059437d56da06a539a9
Reviewed-on: https://code.wireshark.org/review/8417
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: Evan Huus <eapache@gmail.com>
2015-05-13 01:44:49 +00:00
Gerald Combs 99ca42153b Qt: Display filter completion fixes.
Fixup the logic for adding field names to the list.

Connect our completer activation signal to its slot once, not twice.

Bug: 11187
Change-Id: Ife1879fe05c870094ee31e59dd62e3004f588bfc
Reviewed-on: https://code.wireshark.org/review/8440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-12 22:05:57 +00:00
Gerald Combs a7fcfeaca3 Qt: Add packet list navigation checks.
Add sanity checks to go{First,Last,Next,Previous}Packet.

Bug: 11085
Change-Id: I6c33ea314720935aa1881257e9f32732134eec31
Reviewed-on: https://code.wireshark.org/review/8433
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-12 18:39:57 +00:00
Gerald Combs a0046c344d Qt: Expert info → Expert information.
Change-Id: I6cf87a1c63a4b34678667396d836d15766155b1a
Reviewed-on: https://code.wireshark.org/review/8420
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-12 00:17:07 +00:00
Gerald Combs b55d801392 Speed up display filter completion.
Don't loop over non-matching fields. This improves completion performance
considerably on Windows (where it was noticeable).

Change-Id: I7f526fe960c5c41da5ae847b04be25d65ca42bb1
Reviewed-on: https://code.wireshark.org/review/8418
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 23:50:40 +00:00
Gerald Combs 1daf6e9e7b Qt: Provide a hint about the current display filter field.
If the field under the DisplayFilterEdit cursor is valid, push its
description. In the main window this shows up in the status bar.

Change-Id: I7ba1255694941c64aa8cce896283a426b9a69f2c
Reviewed-on: https://code.wireshark.org/review/8413
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 22:23:56 +00:00
Gerald Combs 7ebe97a4b9 Qt: Fix the main welcome banner.
Leave the text empty, otherwise it overwrites "Development Version" at
inopportune times. Remove a QDebug include.

Change-Id: I94060ef69cc3b42dda39adfe34d2c0bfbe564ec2
Reviewed-on: https://code.wireshark.org/review/8407
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 21:02:31 +00:00
Alexis La Goutte 1fa0e72d53 Wireshark (Qt): The lower left status bar reports "Ready to load or capture" when a live capture is active
10947 Qt Wireshark - The lower left status bar reports "Ready to load or capture" when a live capture is active

Reported by Jim Young

Bug: 10947
Change-Id: I7dcd5081194bbeab43fef4d994220ac3ea23f536
Reviewed-on: https://code.wireshark.org/review/8067
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-11 20:21:10 +00:00
Gerald Combs 341f2cee6b Qt: Packet list fixes.
When updating the monospace font, don't apply it to PacketList itself.
On Windows and Linux here it sets the header font as well.

Add the item delegate width to the column size hint. This correctly
resizes column 0 on Windows. It seems to add extra space on OS X and
Linux, unfortunately.

Change-Id: I294cd9868fe00144b896636be65896e8557ab208
Reviewed-on: https://code.wireshark.org/review/8402
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 19:24:11 +00:00
Gerald Combs e37ae1000d Use setPlaceholderText in CaptureFilterEdit.
Matches a recent change in DisplayFilterEdit.

Change-Id: I22d0f4a327ecae0e2065302a003037d19162b74d
Reviewed-on: https://code.wireshark.org/review/8401
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 17:26:51 +00:00
Gerald Combs 60803f376b Qt: Add display filter completion.
Add completion to DisplayFilterEdit. Disable autocompletion in
DisplayFilterCombo.

New behavior: If we're at the beginning of the entry "recent" display
filters appear at the top of the list.

Start using QLineEdit::placeholderText while we're here.

Bug: 10923
Ping-Bug: 9254
Change-Id: Ic8dd37768abb83d50d4e6c849bb51095fc3742d2
Reviewed-on: https://code.wireshark.org/review/8360
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 16:08:28 +00:00
Evan Huus c01f369b73 qt: minor string change in capture options
Replace "Capture in" with "Enable" for promiscuous mode; the checkbox doesn't
actually affect which interfaces get captured on, which is the way I wanted to
read the old text.

Change-Id: I35dd2c8f9523311cb267515804b1421e50e60e06
Reviewed-on: https://code.wireshark.org/review/8374
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-10 16:17:24 +00:00
Gerald Combs af7bdfcbee [Automatic update for 2015-05-10]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I9ee8a6cb84ceb23340af3562cfa9927357319ee6
Reviewed-on: https://code.wireshark.org/review/8376
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-10 15:07:36 +00:00
Guy Harris 3859e552e3 A NULL is needed at the end of the argument list for g_object_set().
Change-Id: I086403275d596f19ef44374f956654cf94ac9a11
Reviewed-on: https://code.wireshark.org/review/8343
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-08 07:11:14 +00:00
Jiří Engelthaler 7d0049c7fd Recent files: Disable mnemonic accelerator key for menu item
If recent file name contains underscore, menu item parses it as mnemonic accelerator. So disabled using underline for recent file menu item.

Change-Id: I1253a0103e750a14a69f0d064587e0eb56581b82
Reviewed-on: https://code.wireshark.org/review/8325
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-08 04:33:03 +00:00
Gerald Combs f77e02ccc6 Expert Info dialog.
Show all expert messages in a combined view. Group top-level items by a
(severity, group, protocol) tuple.

Let the user enable and disable messages via a check menu.

Add ProtoTree::goToField and expert_info_t.hf_index. Use them to jump to
what we hope is the afflicted item.

Enable the context menu only if the user has selected a packet item.

Add a free-form search field that matches expert summaries.

This differs from the GTK+ version but hopefully provides a smoother
workflow.

Bug: 10931
Change-Id: Ia12cb7c27cdea1634fa2798fb7e4c1b23bd16ad2
Reviewed-on: https://code.wireshark.org/review/8294
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-05-08 04:29:59 +00:00
Gerald Combs e55ac64077 Qt: Fix packet list column resizing.
The size hint changes in g5ab8490 broke packet list column resizing. Add
back a way to force the hinting necessary for sizeHintForColumn to work
properly.

Bug: 11067
Ping-Bug: 10924
Change-Id: Icd525200f7a88f2b6d22a3039cda98ad0527239e
Reviewed-on: https://code.wireshark.org/review/8334
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-07 20:15:29 +00:00
Alexis La Goutte 0310c72377 Revert "QCustomPlot: fix division(or modulo) by zero found by Clang and Coverity (CID 1159170 & 1159171)"
This reverts commit b394aa5f1e.

The patch don't fix this issue...

Change-Id: I654933ec4ebebdef840f24ba20162f1f1a5321cc
Reviewed-on: https://code.wireshark.org/review/8332
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-07 12:16:27 +00:00
Guy Harris 8886fbd608 Fix some --without-pcap build problems.
Change-Id: Ic80de2bf2e2e047667784b8d19207f7f097b3d5c
Reviewed-on: https://code.wireshark.org/review/8317
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-06 19:50:33 +00:00
Michael Mann 050de6aa2f Set tap filter when WLAN "Limit to display filter" option is checked.
Bug: 11160
Change-Id: Ic2f1475a3b51eb8919435f1064fc0faf3c4da3eb
Reviewed-on: https://code.wireshark.org/review/8296
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-05-06 06:12:22 +00:00
David Creswick b5ef92efc0 GTK UI: remove eo_saveable_pathname in favor of eo_massage_str
The function had several deficiencies:

- When "" is passed as the filename, the function returns a null
  pointer (due to the quirky behavior of g_strsplit_set), which causes a
  segfault when it's dereferenced later. I'm not sure what the correct
  return should be, but it shouldn't be NULL.

- It leaks memory. (The array of strings returned by
  g_strsplit_set are never freed.)

- It only strips out backslashes. That is not the only character that
  is disallowed in filenames, even on windows.

- The functionality is already provided by eo_massage_str and
  it does a more complete job of it.

Change-Id: I4d9eab7506048c5d04de8f163b8af1e3f67c163d
Reviewed-on: https://code.wireshark.org/review/7996
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>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-05 23:49:28 +00:00
Roland Knall 5727ebe689 extcap: Implement QT extcap options
Implementing a button in the interface list, to bring up
 the extcap options dialog, as well as a dialog, which will
 be generated depending on the selected extcap options.

Change-Id: I1733dc6a8c1a121089a9c353aff10bc4a53e86de
Reviewed-on: https://code.wireshark.org/review/8224
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-05 09:35:10 +00:00
YFdyh000 800fd17ece Add accesskey to Bluetooth menu
Change-Id: I81e0edf8622579ec711d15077f62c31048837bf8
Reviewed-on: https://code.wireshark.org/review/8282
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-05-04 09:07:17 +00:00
Gerald Combs 0d6581c152 Add a note about slot naming.
Note that QMetaObject::connectSlotsByName looks for slots which follow a
specific naming convetion, and that manually connected slots should not
use that convention. This isn't obvious and seems to trip people up from
time to time.

Change-Id: I81f05519fcba672dcca8ccd82bbafa4d1559cebf
Reviewed-on: https://code.wireshark.org/review/8279
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-03 18:32:32 +00:00
Roland Knall 812d31122a ext_menubar: Change action name to remove warning
on_actionExternalMenu_triggered() triggered a warning, as no menu
 exists on the automatic UI configuration.

Change-Id: Ic3dc4c2c9e4c95ec4bbea01bd53af9a8c831e0d7
Reviewed-on: https://code.wireshark.org/review/8276
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-03 17:14:28 +00:00
Gerald Combs 3d4646e978 [Automatic update for 2015-05-03]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I4d5f34d1b803d478101ba4a1388ac3d71c641918
Reviewed-on: https://code.wireshark.org/review/8273
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-03 15:07:25 +00:00
Michael Mann 91515a0081 Add tshark -z "ncp,srt"
Change-Id: Iab2559c2bac5550987c108c6e917506fcec525e9
Reviewed-on: https://code.wireshark.org/review/8221
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: Anders Broman <a.broman58@gmail.com>
2015-05-01 06:04:12 +00:00
Alexis La Goutte fbec73db25 cli_service_response_time_table.h: fix api reference
The following parameters of draw_srt_table_data(srt_stat_table *rst, gboolean draw_header, gboolean draw_footer) are not documented: parameter 'draw_header', 'draw_footer'

Change-Id: Idda62f1195f08eb2272c731db663c1eca886906d
Reviewed-on: https://code.wireshark.org/review/8231
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-29 10:56:55 +00:00
Michael Mann aeab984510 Bugfix string compare length
Change-Id: Iddaad1ae5b80d5d10b482790c5c7a017fc94328b
Reviewed-on: https://code.wireshark.org/review/8220
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-28 11:49:35 +00:00
Michael Mann 0b368ea23f Add service_response_time_table for TShark srt stats.
This is a "refactoring part 1" of the srt stats.  This first step is using the service_response_time_table for all (possible) TShark srt stats.  Next step will be combining the GTK and TShark service_response_time_table, so there is more code reuse and the "shared structure names" between GTK and TShark service_response_time_table won't seem as bad.

Maybe it can even go one step farther and handle a dynamic number of columns so this refactoring can apply to all srt stats.

Change-Id: Ief28e7e55f7dbbf4f2d9bb6f1a1592b87b866137
Reviewed-on: https://code.wireshark.org/review/8210
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-28 07:37:14 +00:00
Michael Mann 8c996a2736 Add tshark -z "smb2,srt"
Change-Id: I66247132f00c83f35cf78cb63ea00a5ce923fddb
Reviewed-on: https://code.wireshark.org/review/8211
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-28 04:22:36 +00:00
Michael Mann 0b97f0dcf3 Add tshark -z "ldap,srt"
Bug: 9363
Change-Id: Ic64716ef0156607ca40773cef8e76fc4a0825b3c
Reviewed-on: https://code.wireshark.org/review/8196
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-27 23:18:50 +00:00
Roland Knall 5b1d62c50b ext_menubar: Add pointer to GUI main structure
Add a pointer to the callback, which will provide an enum value,
 for each calling GUI entity, as well as a pointer to the main
 structure for that entity.

 For Qt this can be used for instance, to connect to slots of the
 main instance, to update a calling dialog.

Change-Id: Ifa6b04f868512574de53b6bce507e343f6e219d4
Reviewed-on: https://code.wireshark.org/review/8085
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-27 11:20:52 +00:00
Guy Harris 25fd18a397 Include "config.h" first, even before <glib.h>, as is done in other files.
Also move system and GLib includes before Wireshark includes.

Change-Id: I6636c9fdafb69b6dcf297d4c2632f5e8448e1d93
Reviewed-on: https://code.wireshark.org/review/8207
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>
2015-04-26 21:55:41 +00:00
Gerald Combs 9b5a09aa34 [Automatic update for 2015-04-26]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I431063783434a6f7a9a4f4b8186316ed3f98005b
Reviewed-on: https://code.wireshark.org/review/8199
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-26 15:07:50 +00:00
Gerald Combs daafb9d700 [Automatic update for 2015-04-19]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Id9886f878c4d7422b779f1361fd9f7fcfb315982
Reviewed-on: https://code.wireshark.org/review/8120
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-19 15:08:02 +00:00
Alexis La Goutte b394aa5f1e QCustomPlot: fix division(or modulo) by zero found by Clang and Coverity (CID 1159170 & 1159171)
Change-Id: Iba9317436983bb4b3730be8b80e7b9c107ffc3a9
Reviewed-on: https://code.wireshark.org/review/8112
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-04-19 05:56:09 +00:00
Gerald Combs 51d4d0af72 Minor Win32 console fix.
Fix a no-op in set_has_console. Mark it and set_console_wait GTK+ only.

Change-Id: Ifc6540b30edc0296c4a47c004a397cc309e71d2b
Reviewed-on: https://code.wireshark.org/review/8099
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-16 21:33:39 +00:00
Gerald Combs 40ce324f4d Set the extcap working directory on Windows.
On Windows, prepend the main program directory to %Path% when spawning
extcap processes. This lets us place androiddump in extcap while allowing
it to locate its DLLs.

Change-Id: I406c47ce71323266d5f14fb596931398464e452d
Reviewed-on: https://code.wireshark.org/review/8057
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: Gerald Combs <gerald@wireshark.org>
2015-04-15 20:26:13 +00:00
Roland Knall eeed4d1121 UI: Implementing menus for plugins
Plugins may utilize the tap interface to provide special tools
 or analysis options, not otherwise available in Wireshark, or
 perhaps not allowed to be distributed freely. Up until now, those
 tools either had to start automatically, or could not be started
 at all, or had to be started separately.

 It should be possible, that those tools may be started using a
 menu entry directly from Wireshark. This interface tries to achieve
 exactly that.

 This interface uses a clean interface, which can be implemented in
 any plugin or dissector. Documentation for this has been added to
 README.plugins.

 Separators are only supported for now in the Qt interface, but
 URLs can now be added as a simple item, and the UI will use the
 same methods used for other URL calls to open them.

Change-Id: I170107dafb66f6badaa864d05a9091e5cbbf52c2
Reviewed-on: https://code.wireshark.org/review/7865
Reviewed-by: Roland Knall <rknall@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-04-14 04:00:39 +00:00
Michal Labedzki 9ea521532e Qt: Add option to copy all visible item or selected tree items in Packet Details pane
The idea is allow to copy data from GUI by user,
what is currently case only for tshark.

The first option copy every item from Packet Details that are expanded (visibled).
The second option do the same but start on currently selected item/tree.
(let think about protocols like BT SDP where there is a lot of recursive subtrees)

Change-Id: I19c925d21293ceb8af2167c7d2c1b1b36507124e
Reviewed-on: https://code.wireshark.org/review/8047
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>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-04-13 15:58:57 +00:00
Pascal Quantin 0c700d8958 Windows: fix generation of PortableApps.com installer
Change-Id: I249268ce21ddfbdc7f149609a950736b4fe2ae07
Reviewed-on: https://code.wireshark.org/review/8036
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-04-12 21:30:54 +00:00
Gerald Combs 5b80ccb434 [Automatic update for 2015-04-12]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ide45514d6fd320962b642ed7c86bca959f2c58f7
Reviewed-on: https://code.wireshark.org/review/8029
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-12 15:07:24 +00:00
Pascal Quantin 461666bcd1 Qt: fix maximized state apply
Preferences are not loaded yet when we call MainWindow::loadWindowGeometry()
Anyway, prefs.gui_geometry_save_maximized should only be checked when saving preferences (MainWindow::saveWindowGeometry() method) like what we do in GTK UI

Change-Id: I8eb01a5f4f7672fbf5846bc576584e28f72d5e31
Reviewed-on: https://code.wireshark.org/review/7978
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-07 21:03:18 +00:00
Alexis La Goutte 77f87b7a01 Byte view tab (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Remove unused bmask variable

Change-Id: I44613f1d949dbaf8e559b3bfb2196609d821c4f3
Reviewed-on: https://code.wireshark.org/review/7496
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-07 18:34:38 +00:00
Guy Harris 3a87a32a57 See if this squelches warnings when compiling without libpcap.
Change-Id: I29441ff47365e302b0ef6dfd54e94f4bf1def08a
Reviewed-on: https://code.wireshark.org/review/7958
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 22:45:55 +00:00
Guy Harris ba0b348d28 Show a count in the status bar for all captures.
(I'd have said "for non-update-list-of-packets-in-real-time captures",
but that's too long for the holy Git "first line of the commit message
is a summary" rule.)

For non-update-list-of-packets-in-real-time captures, show a packet
count in the status bar.

Change-Id: I31670770e3772e9f772f0c9a6438fc6d053560aa
Reviewed-on: https://code.wireshark.org/review/7957
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 21:56:49 +00:00
Gerald Combs ec8ed1511a Use zlib 1.2.8 on Windows.
Change-Id: I3df88b1e891f43cd6b6ed089f6c3d20a942e68bc
Reviewed-on: https://code.wireshark.org/review/7952
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-06 21:34:10 +00:00
Guy Harris 0ef2fd5d53 Reset the captured-packet count when we start or restart a capture.
Bug: 6217
Change-Id: I916e9a6fdb0e114d5f8f123153c213af9273bbc3
Reviewed-on: https://code.wireshark.org/review/7954
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 21:07:58 +00:00
Guy Harris 1871fb2b0d Keep a captured-packet count in a capture_session and use that.
Have the count in a cfile_t structure always reflect the actual number
of packets that have been read from the file, rather than, when doing a
non-update-list-of-packets-in-real-time capture, falsely increasing the
count in the cfile_t to reflect the number of packets captured but not
yet read.

Have the status bar base its captured-packet count on the count in the
capture_session structure, and base the "sorry, no packets were
captured" message on the count in the capture_session structure, as
we're no longer using the count in the cfile_t structure to count
anything in the process of a non-update-list-of-packets-in-real-time
capture.

That way, we preserve the invariant that the "frames" member of a
cfile_t will be non-null if the "count" member is non-zero, fixing bug
6217.

It also means we can get rid of cf_set_packet_count(), as we only set
the count in the capture-file-reading code.

Bug: 6217
Change-Id: I72c0e2c07c30782bad777995370b7c19e1460cc2
Reviewed-on: https://code.wireshark.org/review/7950
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 19:15:24 +00:00
Guy Harris bfd3d269e2 Show a list of interfaces on the welcome screen when capturing.
In a non-update-list-of-packets-in-real-time capture, once the capture
starts, put up a message on the welcome screen indicating on what
interfaces we're capturing, rather than leaving the "waiting for stuff
to arrive from dumpcap" message up.

Make some routines not used outside main_welcome.c static while we're at
it.

Change-Id: I461dd1333d3fa2b64f20310f7b77b45578f9b40d
Reviewed-on: https://code.wireshark.org/review/7942
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 08:01:28 +00:00
Guy Harris d4bfa9c43b Have a common routine for constructing strings listing interfaces.
We have a bunch of duplicated code to make those lists; make a common
routine for that.  (dumpcap currently doesn't use it, as the routine in
question uses a routine in libui, which dumpcap doesn't use.  We should
probably fix that.)

Change-Id: I9058bf3320d420b8713e90743618972da1d1c6ed
Reviewed-on: https://code.wireshark.org/review/7934
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-05 23:43:01 +00:00
Guy Harris 24af6eeeea Pop the welcome screen message when we close a file.
That fixes a bug where the welcome screen gets stuck at "Waiting for
capture input data..." if you do a non-update-list-of-packets-in-real-
time capture, stop the capture, and close the capture.

Change-Id: Ia77900707c6287e091a1acd2a6640462e0e4fb37
Reviewed-on: https://code.wireshark.org/review/7931
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-05 22:13:45 +00:00
Guy Harris fd510bef34 Give the welcome screen its own set of callbacks.
Don't have the status bar code know about the welcome screen; instead,
give the welcome screen its own callbacks, so that it can modify the
welcome screen as appropriate.

Change-Id: Id38d66edeaea085f114b47d6361312450435b58a
Reviewed-on: https://code.wireshark.org/review/7927
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-05 20:02:20 +00:00
Gerald Combs d4c8dca5d3 [Automatic update for 2015-04-05]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: If98edeab7a413c33e54fbd579e975da26993a380
Reviewed-on: https://code.wireshark.org/review/7922
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-05 16:13:53 +00:00
Michael Mann 8699bc2858 Remove epan member from PacketWinData and just use cfile.epan when redissecting a packet window.
A pointer to cfile.epan was saved by the window when it's created, but any redissection will remove the epan_session used by cfile.epan underneath the window, so let's just use cfile.epan directly.

Bug: 11043
Change-Id: Ie6b85708025f8ab7d5e5dc48ad99fee0931af472
Reviewed-on: https://code.wireshark.org/review/7915
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: Guy Harris <guy@alum.mit.edu>
2015-04-05 06:55:58 +00:00
Guy Harris 8327921a32 Fix another capture_dev_user_pmode_find() call.
Missed by the previous commit.

Change-Id: I0882e2cf7a734f93e59dbfd1aab564a2fd65d316
Reviewed-on: https://code.wireshark.org/review/7917
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-04 21:43:53 +00:00
Guy Harris c67bc03355 Let capture_dev_user_pmode_find() say "not found".
"Not found" is different from "found, and false".  Have it return a
boolean "did I find the property" indication and, if it did, supply the
property value through a pointer.

Change-Id: Iaa942ea346410b35e512ff1a3821cbf60c88dfd6
Reviewed-on: https://code.wireshark.org/review/7916
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-04 21:03:34 +00:00
Alexis La Goutte a5b51d5a82 TX: Update translations (Manual sync 2015-04-03)
Change-Id: I8f7860707fea0bfb6b2ff36fb445cf4e91917e06
Reviewed-on: https://code.wireshark.org/review/7890
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-03 10:37:48 +00:00
Michal Labedzki c164534b7e Qt: Add Capture Restart feature
Change-Id: Ied33dd43bb16660aec7063ddf81982ee48226e9e
Reviewed-on: https://code.wireshark.org/review/7737
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-04-01 07:30:45 +00:00
Pascal Quantin 606fa969ba Extcap: fix USBPcap capture broken by g8204578
g8204578 was not the right way to do things: if_type is used to identify an extcap interface

Change-Id: Iead6c5e63f6874012c27ed7c1bf7152a5891ad65
Reviewed-on: https://code.wireshark.org/review/7849
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-29 17:48:28 +00:00
Michael Mann 9a9413f9f4 Generate the filter using _ws.expert.message instead of expert.message
Bug: 11073
Change-Id: Ie98d52561b7aebe6875392cf3efeb22adb2ac499
Reviewed-on: https://code.wireshark.org/review/7813
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: Anders Broman <a.broman58@gmail.com>
2015-03-25 05:00:17 +00:00
Guy Harris 083f6b6e6d Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).

Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.

Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 03:22:33 +00:00
Guy Harris 493ddd5963 OK, this appears to be what's intended.
Include a column to describe what's intended.  If that's *not* what's
intended, fix the comment and the twisty little maze of #defines.

Change-Id: Ic5d120c401d8aba23a19e9d042b1460621b80e0b
Reviewed-on: https://code.wireshark.org/review/7815
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 02:41:41 +00:00
Guy Harris 77bc38e498 Clean up handling of buffer size.
Instead of a twisty little maze of #if, #ifdefs, and #elifs, all
different, define HAVE_BUFFER_SIZE upfront iff we can set the buffer
size - i.e., if this is Win32, and thus we're using WinPcap, or if we
have pcap_create() and thus pcap_set_buffer_size() - and use that to
govern whether to have a buffer size setting or not.

Always put the buffer size setting in the right vertical box.  If that
doesn't work well for some configurations of available interface knobs,
feel free to change the checks, but please make it less opaque what's
going on (include a comment if necessary).

Change-Id: I384c601982b470ae08de271431eac06d6c925332
Reviewed-on: https://code.wireshark.org/review/7814
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 01:30:28 +00:00
Roland Knall 8a3bd9ee38 Win32: Compilation error if winpcap remote capturing disabled
If HAVE_PCAP_REMOTE is not set, this code is not defined and therefore will not be
compiled correctly.

Change-Id: Ie08a6f99598d46cfa38e2448ea979a8a9aa7c7fc
Reviewed-on: https://code.wireshark.org/review/7803
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-24 23:59:41 +00:00
Guy Harris 1b4120846e Centralize the code to set the active_dlt value for a device.
We were doing it similarly, but not the same, in several places; make a
common routine for it.

Have that code check to make sure the DLT_ value in question is actually
supported by the device; if not, pick the first supported DLT_ value, if
any; this keeps it from, for example, picking a bad DLT_ value if your
defaults were set based on monitor mode being on but monitor mode
actually being off, or vice versa.

Change-Id: I1722bfeaf60429bc5c6f665fdea3d466052b13bd
Reviewed-on: https://code.wireshark.org/review/7795
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-23 00:00:42 +00:00
Guy Harris f0311abe72 Rename update_interface_list() and remove local interface code from it.
It's only used to update the remote interface list, and never updates
anything else (it sets iftype_id to CAPTURE_IFREMOTE and never changes
it, so all tests for whether iftype_id is == or >= CAPTURE_IFREMOTE
succeed); remove the code that would be executed if, somehow, iftype_id
got stomped on, and rename it to update_remote_interface_list().

Change-Id: I3bd80fb19bb14ef5bdf2c1a77a10f1f32bb62aba
Reviewed-on: https://code.wireshark.org/review/7773
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>
2015-03-21 10:06:14 +00:00
Gerald Combs 751df4e1fd Try to fix interface property fetching.
Use g_strdup instead of calculating string lengths manually. Return NULL
for empty strings, otherwise lo0 shows up as ": lo0" instead of
"Loopback: lo0" here.

Change-Id: I143aa5e12c9512b7a9f4729b62b353c13ee3635a
Reviewed-on: https://code.wireshark.org/review/7764
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 23:28:40 +00:00
Guy Harris da3e4f92d5 Make the snapshot-length member of interface_t an int.
That matches what it is in other structures, and eliminates a compiler
warning.

While we're at it, remove an empty if statement revealed by that change.

Change-Id: I5e8c8f92fdb3567e75800c729443737032a1bcc7
Reviewed-on: https://code.wireshark.org/review/7752
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 06:38:44 +00:00
Guy Harris a1ea3ce81c Fix another call to capture_dev_user_snaplen_find().
Change-Id: I20064f782b7ad8ebffc70322a877d88501d6ef60
Reviewed-on: https://code.wireshark.org/review/7749
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 01:16:55 +00:00
Guy Harris a4eb512531 Squelch a "no implicit conversions in C++" warning.
Change-Id: Ib2876e055e8bfb1d0de36bbf7bb3b1e52217f108
Reviewed-on: https://code.wireshark.org/review/7748
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 01:13:52 +00:00
Guy Harris cb31cc61d7 Fix extracting of parameter.
We have to find the closing parenthesis before overwriting the opening
parenthesis, otherwise the end of the string, from which strrchr()
searches, is at the point where the opening parenthesis was.

Fix incorrect arithmetic (-1 + -1 + 1 = -1, not 1).

Change-Id: Ida47dd9670b36269eef28368aa845301a7185c3f
Reviewed-on: https://code.wireshark.org/review/7747
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:48:22 +00:00
Guy Harris c691af8737 Fix a comment.
Change-Id: I6e85f4abdc41ac01296b276f6b394376e75abe47
Reviewed-on: https://code.wireshark.org/review/7746
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:30:39 +00:00
Guy Harris 1fdfee69d6 Patch some memory leaks.
capture_dev_user_descr_find() and capture_dev_user_cfilter_find() return
g_malloc()ated strings; we don't need to g_strdup() them to get a
g_malloc()ated string, and we *do* need to free them if we aren't going
to use them any more.

Document that while we're at it, and give more details for the functions
returning integer user-specified interface parameters as well.

Change-Id: Icf98a48992b1c4168ead54bdc4cc2847da89d665
Reviewed-on: https://code.wireshark.org/review/7745
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:28:40 +00:00
Guy Harris ab45f1d290 Unused parameters are done differently in C++.
Change-Id: If6324e7ee57156e067c2584b80df835620f94ac0
Reviewed-on: https://code.wireshark.org/review/7744
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:24:39 +00:00
Gerald Combs 04f6b557b7 Add a comment.
Change-Id: I82d31ce4435f1c136e158a007c9d4507e47a73a6
Reviewed-on: https://code.wireshark.org/review/7743
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 00:02:11 +00:00
Guy Harris face2c7946 Fix space before tab.
Change-Id: I8e9de014bd1e69102edb0eb2ec65d8da12ab8311
Reviewed-on: https://code.wireshark.org/review/7742
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-18 23:59:58 +00:00
Guy Harris 096e5231ff Fix parsing of interface properties strings.
The first entry in the list does not have a leading comma, so a strstr()
for ",{ifname}(" will not work.  Instead, use g_strsplit() with a comma
for all of the preferences.

Have common code for all the "uncomplicated" preferences.  Have a
specialized handler for the one "complicated" preference.

Change-Id: I2144a98ab0cb70db56eaaba88175d6e03885de2a
Reviewed-on: https://code.wireshark.org/review/7741
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-18 23:58:54 +00:00
Michal Labedzki e6f3da96f8 Qt: Fix recent files threads
Fix crash and memory leak. Please not that
Recent File Status objects and threads still
continously grow and shrink memory usage, but do not
grow continuously.

Bug: 10893
Change-Id: Icc8b7fefd6572b902ac81d22e5f7b16e304fcf16
Reviewed-on: https://code.wireshark.org/review/7699
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-18 08:51:55 +00:00
Michal Labedzki 4e82b9c7de Qt: Start address resolver timer
Change-Id: Ic3de3db089f25d9fdfd6100f916b3960e52046f0
Reviewed-on: https://code.wireshark.org/review/7715
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-17 22:00:43 +00:00
Guy Harris 6637f4d144 Fix "Save All" for Export Objects.
Fix the loop that goes through all the objects to be saved so that it
looks at all the objects to be saved rather than repeatedly looking at
the first object.

When letting the user select a directory in which to save, restrict them
to looking at directories.

QDir doesn't do what we actually want here - QDir.setCurrent() might do
a chdir() but it doesn't appear to set the QDir's path, so when we use
it to construct pathnames it constructs them based on
wsApp->lastOpenDir() rather than the directory the user selected.  Use
Boring Old GLib's g_build_filename(), as we do in the GTK+ version, for
now.  (It also does something we *don't* want, namely, at least as the
documentation implies, a chdir().)

Bug: 11062
Change-Id: I705292dc2713b9dba615b0d59a4cf8313f357d82
Reviewed-on: https://code.wireshark.org/review/7720
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-17 18:47:30 +00:00
Michal Labedzki 80939682f9 Qt: Fix overloaded CPU
QTreeView also use timerEvent() to do something... so call its overloaded
method and make CPU happy again.

Bug: 11035
Change-Id: I405c8c2763ae0b96c0483aedcb314a5f259e76a1
Reviewed-on: https://code.wireshark.org/review/7696
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-03-15 18:50:20 +00:00
Michal Labedzki bed6816879 Qt: Sort names in DecodeAs dialog
This should increase user experience.

Change-Id: Id2713e7c5af8ca0f0d87e3ae52542b4f189ace9a
Reviewed-on: https://code.wireshark.org/review/7681
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-03-15 13:38:10 +00:00
Alexis La Goutte 9babe6b6b5 TX: Update translations (Manual sync 2015-03-14)
Change-Id: I1aca20f4fd091db5d835d1ee12123a5f7cafe08d
Reviewed-on: https://code.wireshark.org/review/7680
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-14 17:49:15 +00:00
Michal Labedzki 77d9a059fe Qt: Fix DecodeAs
Previously DecodeAs neither save its changes nor changes dissector tables.
Do that and redissect packets to refresh view.

Bug: 10553
Change-Id: Icd8453c9650f0265852f6b6b58bc483b35570a15
Reviewed-on: https://code.wireshark.org/review/7676
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-03-14 14:26:17 +00:00
Gerald Combs 2ef72cb7aa CMake: Add a top-level nsis_package target.
Add packaging/nsis/CMakeLists.txt and use it to generate each NSIS include
file. Add macros to generate packaging-related targets and invoke them
from the top-level CMakeLists.txt.

Add a top-level "plugins" target. Copy plugins to "plugins" in each of
our staging directories instead of "plugins/$VERSION".

Add missing files to the copy_data_files and copy_cli_dlls targets.

Add all files in the NSIS package from the staging directory.

Drop a bunch of no-longer-needed defines, e.g. MSVC_VARIANT.

Change-Id: Ib1079260d164c65118050f1431af8e582cd577fa
Reviewed-on: https://code.wireshark.org/review/6459
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-12 22:47:42 +00:00
Gerald Combs 8bae919a5d One check mark for ACKs, two check marks for dup ACKs.
Add FT_FRAMENUM_ACK and FT_FRAMENUM_DUP_ACK and set them for
tcp.analysis.acks_frame and tcp.analysis.duplicate_ack_frame. Draw a
single or double check mark in the packet list accordingly.

These are probably specific to TCP, but as it happens there are a lot of
TCP packets.

Change-Id: I35416506419159a79ad8cc2e35f8a14485edfb7e
Reviewed-on: https://code.wireshark.org/review/7568
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 16:47:17 +00:00
Peter Wu ad1b3ee110 Qt: enable autoscroll on initial capture start
The capture timer was never enabled on capture start or disabled on
capture stop. This is now implemented.

Bug: 10601
Change-Id: Iae23a952986a2c5dddf92b6ac0d1f1bc1c83719c
Reviewed-on: https://code.wireshark.org/review/7582
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
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-03-12 16:33:56 +00:00
Gerald Combs 5ab8490088 Qt: Allow multiple lines in the packet list.
Remove the setUniformRowHeights(true) call in the PacketList
constructor. This means that the packet list now calculates its height
by querying the Qt::SizeHintRole for every item instead of simply
multiplying item_height * number_of_rows.

Implement SizeHintRole in PacketListModel::data so that size
calculations aren't unbearably slow. We don't have any row text until an
item is drawn (via DisplayRole), so items with multiple lines end up
being rendered twice. Note where we make assumptions on line heights.

Although we call gtk_tree_view_set_fixed_height_mode() in the GTK+ UI we
don't have this problem there. GTK+ is apparently less strict about
enforcing row heights.

Bug: 10924
Change-Id: I98e9f4f5f321c2e03f18498e0a7e7556f88792a1
Reviewed-on: https://code.wireshark.org/review/7430
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 16:29:58 +00:00
Peter Wu 410b40d371 Export CLIENT_RANDOM with Export SSL Session Keys
This allows for exporting the SSL session keys for captures which were
decrypted using a RSA certificate, but where the server does not support
session resumption.

To avoid frequent reallocations, the expected length is used as initial
string size.

Tested against a nginx server with ssl_session_cache off.

Note that all keys loaded via ssl.keylog_file are exported, not just the
displayed ones!

Change-Id: Ie3a93d3692885502f46442953fa53303d16672d7
Reviewed-on: https://code.wireshark.org/review/7175
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 16:27:10 +00:00
Jeff Morriss 8e709fca69 Assert that the row number passed to packet_list_get_row_data() is valid.
Unfortunately that row number may come from a dissector/tap but allowing us
to continue just causes us to die horribly later (and we can't except out of
processing a tap).

Change-Id: I37f03385db55dbe55f91e2ec6a03add5664857ba
Ping-Bug: 10885
Reviewed-on: https://code.wireshark.org/review/7652
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 05:18:39 +00:00
Gerald Combs cac102eee3 Change a lot of http:// URLs to https://.
Most of our sites are now HTTPS-only. Update URLs accordingly. Update
other URLs while we're at it. Remove or comment out dead links.

Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33
Reviewed-on: https://code.wireshark.org/review/7621
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-10 19:30:50 +00:00
Alexis La Goutte 296bb23697 ui uitls (Qt): fix parameter 'val' not found in the function declaration [-Wdocumentation]
Change-Id: I5fb1afca4b412697c56d80a8eb7be4140cd9420f
Reviewed-on: https://code.wireshark.org/review/7612
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-10 07:21:25 +00:00
Gerald Combs 44dbae72ba ProtoTree: Fix crashes.
Don't dereference a null pointer. Remove g_assert()s copied from ui/gtk.
This fixes problems mentioned in bug 11044 but not the bug itself.

Change-Id: Iab75ab5cc6a184c8145a094b1c529a634e3c1c0d
Ping-Bug: 11044
Reviewed-on: https://code.wireshark.org/review/7610
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-09 21:33:29 +00:00
Peter Wu 6bc138c87a Qt: fix heap use-after-free wrt. data sources
When a different packet is changed, the packet scoped memory for tvbuff
is freed before clearing data source tabs. This results in
heap-use-after free when resizeEvent is called as a result of clearing
tabs for data sources.

Avoid resize events by hiding the tabs.

Caught with ASAN:

    ==18816==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060004cd970 at pc 0x7fffebf46618 bp 0x7fffffffbb10 sp 0x7fffffffbb00
    READ of size 4 at 0x6060004cd970 thread T0
        #0 0x7fffebf46617 in tvb_captured_length epan/tvbuff.c:423
        #1 0x773062 in ByteViewText::updateScrollbars() ui/qt/byte_view_text.cpp:489
        #2 0x76f307 in ByteViewText::resizeEvent(QResizeEvent*) ui/qt/byte_view_text.cpp:197
        ...
        #24 0x9f2348 in ByteViewText::~ByteViewText() ui/qt/byte_view_text.h:46
        #25 0x9f23f5 in ByteViewText::~ByteViewText() ui/qt/byte_view_text.h:46
        #26 0x76b9d6 in ByteViewTab::clear() ui/qt/byte_view_tab.cpp:54
        #27 0x5de685 in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:477
        ...

    freed by thread T0 here:
        ...
        #5 0x53d763 in cf_select_packet file.c:3827
        #6 0x5ddfa5 in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:454
        #7 0x7fffe58ec980 (/usr/lib/libQt5Widgets.so.5+0x3bc980)
        #8 0x7fffe4d55dd6 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) (/usr/lib/libQt5Core.so.5+0x23fdd6)
        ...

Change-Id: I9c1c01398713389de58259d13ebbaddd2d6e5c52
Reviewed-on: https://code.wireshark.org/review/7589
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 21:56:42 +00:00
Peter Wu 758ee3dc89 Qt: fix use of uninitialized variable
Fixes error reported by UBSan:

    ui/qt/packet_list.cpp:537:13: runtime error: load of value 190, which is not a valid value for type 'bool'

The method is apparently called earlier for other timers, resulting in
an error on startup. Initialize rows_inserted_ to avoid warnings when
the event is triggered later.

Change-Id: Iad919d79264ff1c3c17c9458c869d584234fcd5d
Reviewed-on: https://code.wireshark.org/review/7575
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-03-08 21:54:52 +00:00
Gerald Combs 54c301a0d6 Add the @2x expert indicators.
We currently load the expert indicator resources using an <img> tag.
According to QTBUG-36383 the @2x versions won't load unless you've built
with Qt 5.4.0 or later.

Change-Id: I003fd5d5f10e779f2e7ca6ba9fbb8e033df85b80
Reviewed-on: https://code.wireshark.org/review/7601
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 18:12:06 +00:00
Gerald Combs 29f7c7af7d Update the expert indicators.
Add @2x versions. Remove expert_ok. It appears to be unused.

Change-Id: If36f839f622e235334a4237a9c5424c15a9945bc
Reviewed-on: https://code.wireshark.org/review/7594
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 16:18:48 +00:00
Gerald Combs 87c0df36c8 Qt: Paint elided LableStack text by hand.
Change-Id: I9481598f59531c219a20209429e6ff876ba50cf0
Reviewed-on: https://code.wireshark.org/review/7591
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 16:16:30 +00:00
Martin Kaiser 1a572019fe Revert "[Qt translations] create the .qm files during the build"
This reverts commit 7d01a84d0e.

cmake doesn't get the dependencies right if the .qm files are gone
I'll work on this off-line and resubmit it as one commit rather than
trying to approach this step-by-step

Change-Id: Ibbd60163f910adbd571b3df2a980d64dbf1ea924
Reviewed-on: https://code.wireshark.org/review/7596
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-08 12:18:12 +00:00
Martin Kaiser 7d01a84d0e [Qt translations] create the .qm files during the build
create the .qm files from the .ts files at compile time
for now, this works for autotools only

don't fail if Qt's lrelease tool is not available,
skip building the .qm files in this case

Change-Id: I869a6dc8220eb03e7ffc8bfdb2b6f3930f6cac72
Reviewed-on: https://code.wireshark.org/review/7460
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-07 18:26:12 +00:00
Peter Wu 56a903608c Qt: fix CPU hogging due to status bar
http://doc.qt.io/qt-5/qwidget.html#updatesEnabled-prop says:

    "Re-enabling updates implicitly calls update() on the widget."

This results in an infinite paintEvent series, hogging the CPU. Updating
the text twice does not seem to be a bad idea after all...

Change-Id: Id6cd733e68512f6963fc7d70d91859ca88ab8d38
Reviewed-on: https://code.wireshark.org/review/7581
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-07 16:55:57 +00:00
Guy Harris 5e67ae78ba Get rid of an unused structure member.
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801
Reviewed-on: https://code.wireshark.org/review/7573
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-07 04:41:09 +00:00
Gerald Combs 394d23ed7b Qt: Automatic scrolling shouldn't select the last packet.
If packet_list_moveto_end does anything it should scroll, not select. Make
it a no-op for the time being.

Change-Id: I149815c8f9e50e95a4a77b91b7582c44eed6db4b
Ping-Bug: 10601
Reviewed-on: https://code.wireshark.org/review/7564
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-06 20:21:22 +00:00
Gerald Combs df8b1a0154 Qt: Fix a couple of resource leaks found by Coverity.
Change-Id: Ic3156d8afc2fa237407f3893c34672b1306866fa
Reviewed-on: https://code.wireshark.org/review/7420
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-06 04:05:26 +00:00
Gerald Combs 8664de017f Qt: Constify a bunch of strings.
Change-Id: I601e429408fc042fc5b18a4750d40e260da47f43
Reviewed-on: https://code.wireshark.org/review/7535
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 20:17:29 +00:00
Alexis La Goutte 9076bf3119 Qt: Display only filename on status bar and display full path and size on tooltip
Ping-Bug: 10949
Change-Id: Ic735afdb7994a4c10b527217327831138362ffc9
Reviewed-on: https://code.wireshark.org/review/7538
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 16:57:31 +00:00
Gerald Combs f2b35a180f Qt: Add extra related packet indicator types.
Add the ability to set frame number types: none, request, or response.
Use the types to draw different related packet indicators in the packet
list.

Track the conversation in PacketListRecord. Use it to draw dashed lines
for unrelated frames.

Set frame number types for DNS and ICMP.

Instead of drawing a transparent QImage, alpha blend our foreground
color and draw directly in our painter. Blend more toward the foreground
color.

Add FRAMENUM_TYPE to checkAPIs.

Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214
Reviewed-on: https://code.wireshark.org/review/7436
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 16:45:04 +00:00
Alexis La Goutte 3948d82872 TX: Update translations (Manual sync 2015-03-05)
Change-Id: I7469fbfa799dae5857c6f0df710438f28d77f43a
Reviewed-on: https://code.wireshark.org/review/7505
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Uli Heilmeier <openid@heilmeier.eu>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-05 15:26:46 +00:00
Gerald Combs ce3ec6a6f7 Qt: Redraw the packet list when a column is resized.
...otherwise the packet list and header columns don't match until
the next redraw.

Change-Id: Ice9c17c93badec93839be7c100ca27d8dc493daa
Reviewed-on: https://code.wireshark.org/review/7536
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 02:08:59 +00:00
Gerald Combs 0a4f93ab2b Qt: Show the full file path in the status bar.
Add file_size_to_qstring and use it to show the file size. Add a
"shrinkable" property to LabelStack. Make the info status shrinkable.
Elide text so that long file paths don't widen the main window.

Change-Id: Ieb1caaf7e016384609d41fcabaa63d8f7a293eff
Bug: 10949
Reviewed-on: https://code.wireshark.org/review/7534
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 00:49:11 +00:00
Martin Kaiser 5c2810eb21 build the list of .qm files from the list of .ts files
(2nd attempt: yesterday's builbot failure wasn't caused by this commit)

Change-Id: If87d6b55cc733ff35a3677860b4559a7082a15b2
Reviewed-on: https://code.wireshark.org/review/7502
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-03 11:41:36 +00:00
Guy Harris 499d95964d Eliminate e_uuid_t in favor of e_guid_t.
That eliminates a redundant and confusing data type, and avoids issues
with one piece of code using e_uuid_t but wanting to use routines
expecting an e_guid_t.

Change-Id: I95e172d46d342ab40f6254300ecbd2a0530cde60
Reviewed-on: https://code.wireshark.org/review/7506
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-03 10:55:29 +00:00
Michael Oed 599dd4ffcc Qt: Do not close file while trying to open new one
Wireshark QT will close current opened file when popup open dialogue (File -> open), instead of keeping current file opened till new file is to be opened

Bug: 10962
Change-Id: I2062514ae648c95492e0160953c80d5303b8aba2
Reviewed-on: https://code.wireshark.org/review/7452
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-03-03 07:37:54 +00:00
Alexis La Goutte 6878122187 Main window (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ia8d37b33ee30f09cfe5e0cd00820d84e171deb1c
Reviewed-on: https://code.wireshark.org/review/7494
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-02 19:02:43 +00:00
Alexis La Goutte 0ebbb60279 Byte view text (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I507b27bbf3c2877517cc9613ada1b182becfa98f
Reviewed-on: https://code.wireshark.org/review/7495
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-02 19:02:24 +00:00
Jeff Morriss 701be1f052 RTP player: don't crash when drawing channel graphs for very long calls.
X11 can't handle pixmaps more than 32k pixels wide so don't try to feed it
one.  This avoids crashes with the complaint "BadAlloc (insufficient
resources for operation)".  Instead we simply truncate the graph (and tell the
user).  Do this in a way that shows the user the empty portion of the graph.

Hopefully the Qt port can fix this properly.

Note: the bug report says that MacOS is not affected but it should be.  So
apply this fix for all on-Windows systems.

Bug: 2630
Change-Id: I71e1bd2f9a62792db06ce887e2bbe7a96d110e0a
Reviewed-on: https://code.wireshark.org/review/7464
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-02 07:00:47 +00:00
Guy Harris 99ceab898c Don't create a packet dialog if we don't have a packet.
Move the "find the frame" stuff to openPacketDialog(), and don't even
bother creating a new PacketDialog if we don't find the frame.  This
should squelch Coverity CID 1270934, by giving up quickly if fdata is
null.

Change-Id: I4605ba7e271a55724f02cafed4122f9dd9b1b6f7
Reviewed-on: https://code.wireshark.org/review/7467
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-02 04:01:43 +00:00
Gerald Combs 51f45af2b8 Qt: Don't autoscroll if we're not capturing.
Change-Id: I3164d8a12981970f127cd68adb7e52f2a1fe5c39
Reviewed-on: https://code.wireshark.org/review/7457
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-01 21:17:50 +00:00
Martin Kaiser 85c589f9d0 Revert "build the list of .qm files from the list of .ts files"
This seems to break the build on OSX 10.5 (?)

This reverts commit b46bd2c7798d1c9e808625250928b40adf11a8bb.

Change-Id: I720de7182804c5c669934e3514e789f2da066867
Reviewed-on: https://code.wireshark.org/review/7459
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-01 18:40:44 +00:00
Martin Kaiser a3c6003a90 build the list of .qm files from the list of .ts files
Change-Id: If87d6b55cc733ff35a3648860b4559a7082a19b0
Reviewed-on: https://code.wireshark.org/review/7458
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-01 17:46:58 +00:00
Michal Labedzki 2d4817966e Qt: Automatically scroll the packet list.
Add an "Auto Scroll in Live Capture" action to the Go menu. It's in the
View menu in the GTK+ UI but it seems to make more sense as a navigation
item.

Use a timeout interval for automatic scrolling. I haven't run any tests
to see if this makes a difference but it would seem that the less
drawing we do during a high speed capture the better, particularly for
remote displays.

Update the x-stay-last icons.

Note that we might want to make prefs.capture_auto_scroll a "recent"
setting.

Mark auto_scroll_live and packet_list_check_end GTK+ only.

Bug: 10601
Co-authored-by: Gerald Combs <gerald@wireshark.org>
Change-Id: I645d27c0814f0e4a0d5b01ae68be366847e2522d
Reviewed-on: https://code.wireshark.org/review/7292
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-27 20:27:14 +00:00
Gerald Combs 8ae714da5b Remove a dead assignment found by Clang.
The code in question was copied from ui/gtk/capture_file_dlg.c. The dead
assignment there was removed in 68ceffe.

Change-Id: I605f181b623fbd87ab41505d30a79d7a4fe649df
Reviewed-on: https://code.wireshark.org/review/7419
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-26 18:23:34 +00:00
Gerald Combs 3e5c0bffa2 Qt: Fix packet detail and byte view scrolling
Make sure we call scrollToByte ByteViewText::setFieldHighlight.
Explicitly scroll to our selected QTreeWidgetItem in
ByteViewText::mousePressEvent.

Bug: 11013
Change-Id: I0a6381f6760ed48a4f496be8a06b1e56faa5a05b
Reviewed-on: https://code.wireshark.org/review/7416
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-26 17:22:43 +00:00
Alexis La Goutte 50b15cc3c1 Translations : fix trailing whitespace when generate translations file
Change-Id: I4142912c7a139f57f0ac5291bf3ed6762abec35c
Reviewed-on: https://code.wireshark.org/review/7410
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-26 13:04:17 +00:00
Alexis La Goutte d60d473b31 Qt: Update translation
lupdate/lrelease ui/qt/Wireshark.pro

Change-Id: Ic77adf7ff48d528553ac57bdf04d1ff6e036efdd
Reviewed-on: https://code.wireshark.org/review/7312
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-26 13:04:10 +00:00
Gerald Combs c280a40443 Qt: Escape ampersands in checkboxes and radio buttons.
Convert "&" to "&&" in checkbox and radio button preference labels so
that they aren't interpreted as shortucts. Fixes

QKeySequence::mnemonic: "Attempt to dissect LCID 1&2 as srb1&2" contains multiple occurrences of '&'

Change-Id: Iacab6f81db01e6eca2cfdbaeda666f2e9c1016ed
Reviewed-on: https://code.wireshark.org/review/7346
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-24 18:35:16 +00:00
Gerald Combs 30ed6a1d72 Qt: Apply recent settings.
Add PacketList::applyRecentColumnWidths which set the packet list
column widths from our recent settings. Make sure it gets called at
startup and when we change profiles.

Save the packet list header state so that we can restore it when we
reset the model (i.e. freezing and thawing) and load a new capture file.
Save the state when the user resizes a column. As a side effect this
works around a weird bug that adjusts the width of column 1 at an
inopportune time.

Add a profileChanging signal so that we can save the main window geometry
in each profile.

Get rid of MainWindow::configurationProfileChanged. It was unused.

Apply saved pane widths and heights. Note that we might want to add a
separate pair of recent settings for the Qt panes.

Use the last opened directory in the capture file dialog.

Git rid of some unneeded Q_UNUSEDs while we're here.

Bug: 10953
Change-Id: I812aff59818cf0b4d1598b580627d32728d2e9d7
Reviewed-on: https://code.wireshark.org/review/7247
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
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-02-24 09:58:03 +00:00
Gerald Combs 770ac9123b Qt: Fix a crash when changing the layout.
Freeze and thaw the packet list when changing the layout. This has the
side effect of clearing the proto tree and byte view, which avoids
reading a bad tvb pointer. Note that we might want to add a cleanup
callback to free_data_sources.

Save and restore the current row. Add CaptureFile::currentRow. Fix a
couple of comparisons in PacketList.

Change-Id: I26f9b97ae5a7cdb4fb6e5e6e675570884900e995
Reviewed-on: https://code.wireshark.org/review/7337
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-24 00:42:22 +00:00
Peter Wu 966766694c ui/gtk: use GTK+ 2 name for control keys
The GDK_KEY_* names are part of GTK+ 3, GTK+ 2 does not have the _KEY_
infix. See
https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3.6

Fixes regression from "ui/gtk: fix control combos such as ctrl-a,
ctrl-c".

Change-Id: I4d470212d172f978c171e54ff7377ddc211817ac
Reviewed-on: https://code.wireshark.org/review/7325
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2015-02-23 12:32:35 +00:00
Michal Labedzki ffeadb721f Bluetooth/GUI: ATT: Use alphabetical order in makefile
Change-Id: Ia34dd6b783a1c8214956166b07ffb1537f04aa1d
Reviewed-on: https://code.wireshark.org/review/7291
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:29:24 +00:00
Michal Labedzki 9ad00fdcb8 Qt: Fix for QT < 4.8
QApplication::queryKeyboardModifiers() was introduced in 4.8.
Try to be compatibile with my old Qt 4.7.2.

Change-Id: Ie4abdd397cf2f10bb50132b09fed198d30425ee7
Reviewed-on: https://code.wireshark.org/review/7289
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:20:16 +00:00
JC Wren e2bcee6ac4 Make FT_{U}INT64 behave more like FT_{U}INT32, add support for FT_{U}INT{40,48,56}
Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19
Reviewed-on: https://code.wireshark.org/review/5813
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-21 16:57:52 +00:00
Gerald Combs ae9cc88c00 Qt: Fix unsaved changes behavior.
Check the return value of testCaptureFileClose in
MainWindow::openCaptureFile and add testCaptureFileClose to
MainWindow::closeEvent. Some of the file opening and closing behavior
still needs to be cleaned up but this should at least keep the user from
losing unsaved data.

Bug: 10944
Change-Id: I7d7b563a6b72f48b41a5a3aff2837655557869ff
Reviewed-on: https://code.wireshark.org/review/7283
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-21 02:06:54 +00:00
Gerald Combs ead79e6aa1 Clear the filter expression list in prefs.c.
Move filter_expression_nuke from ui/gtk to epan and rename it to
filter_expression_free. Call it in prefs_reset along with the other
preference reset routines.

This keeps the Qt filter toolbar from filling up with duplicate
expressions when the profile changes.

Change-Id: I9fae9a7b48944079ea342a126979d9e79af0d22b
Reviewed-on: https://code.wireshark.org/review/7281
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 23:16:54 +00:00
Gerald Combs 422ad100aa Qt: Apply the main window geometry directly.
As of g2c00d66 we create the main window after we've read the recent
settings. This means that we can get rid of the property animation
workaround in MainWindow::loadWindowGeometry.

Change-Id: I028061c5bdab9261f9394a1840bcdcb752a4f0c8
Reviewed-on: https://code.wireshark.org/review/7278
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 18:34:09 +00:00
Peter Wu 1a10f5f2b4 ui/gtk: fix control combos such as ctrl-a, ctrl-c
Ignore any Ctrl combinations to allow pasting to work. Regression
introduced in "gtk: fix crash on Broadway GDK backend".

Change-Id: I3d53db2d224cb604b52081002ff923c8684a8d0a
Reviewed-on: https://code.wireshark.org/review/7276
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Balint Reczey <balint@balintreczey.hu>
2015-02-20 17:04:41 +00:00
Gerald Combs 95382c3afb Suppress a bunch of cast-qual warnings.
Squelch

    warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]

similar to g630f54f.

Change strtod to g_ascii_strtod to squelch a checkAPIs error.

Change-Id: Ib2d26ef89f08827a5adc07e35eaf876cd7b8d14e
Reviewed-on: https://code.wireshark.org/review/7269
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 04:04:15 +00:00
Guy Harris 9423a13b2d Just have init_progfile_dir() take a void pointer.
dladdr() takes a void * as a code pointer; have init_progfile_dir() do
so, and do the casting in the calls.  We don't care about the signature
of the function whose address we're passing, we just want to pass a
pointer to *something* in the main program.

Change-Id: I9372620a97b0eb53c2bb3c0c41a238b4408f3709
Reviewed-on: https://code.wireshark.org/review/7270
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-20 00:24:08 +00:00
Gerald Combs ec6ec49941 Qt: Fix automatic update status in welcome screen.
Wait until the application has been initialized before checking
prefs.gui_update_enabled.

Change-Id: I6e52ba26064b6c5b882992c30c76b65d4a618848
Reviewed-on: https://code.wireshark.org/review/7268
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20 00:16:39 +00:00
Gerald Combs 999bbc9b70 Qt: Add more version and packaging information to the main window.
Add a "flavor" (for lack of a better word) banner, which can be set at
build time via WIRESHARK_VERSION_FLAVOR / VERSION_FLAVOR. Set it to
"Development Build" by default. This effectively migrates the
"DEVELOPMENT VERSION" logo image text from the GTK+ UI.

Add full release and automatic update information at the bottom.

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

To do:

- Add back support for gui_version_placement.

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

- Add update links as appropriate to the bottom.

- Clean up layout and spacing.

Change-Id: I28af33e6c2beb855f803a2dfedef49f3e8389057
Reviewed-on: https://code.wireshark.org/review/7071
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-19 22:09:34 +00:00
Alexis La Goutte 5c60289753 Qt Wireshark - Once a live capture is stopped the title bar persists in reporting "Capturing from interface name"
With Qt Wireshark the title bar persists in reporting "Capturing from <interface name>" even though capturing has stopped.

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

Issue reported by Jim Young

Bug:10948
Change-Id: Ia6099f63f82b6610ade5c81af0cf257236f076ec
Reviewed-on: https://code.wireshark.org/review/7050
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 15:17:20 +00:00
Vincenzo Reale 6eae09fa8e lupdate for Italian (new strings translated)
Change-Id: I22ecf6950d47b63d5512c029d745b75be932554d
Reviewed-on: https://code.wireshark.org/review/7197
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 06:32:36 +00:00
Gerald Combs fcc05a43a4 Use plain old ASCII for the SimpleDialog delimiter.
Use a UUID for the SimpleDialog primary delimiter instead of trying to
leverage Unicode.

Bug: 10953
Change-Id: Ib518b32ef65b50f311b061ab5a267e7d1aa9f01b
Reviewed-on: https://code.wireshark.org/review/7240
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 20:08:41 +00:00
Dario Lombardo b35688760a Bugfix in ui/qt/CMakeLists.txt (missing file).
Change-Id: I1db046f2e0555c8fc78d71ec6646c18cbb6f31eb
Reviewed-on: https://code.wireshark.org/review/7235
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-18 15:33:53 +00:00
Guy Harris 7263af87c6 Eliminate some DIRTY_ file lists.
We don't want to encourage people to add to those lists, we want to
encourage people to subtract *from* those lists (either by fixing
warnings or, if an infelicitous API, or an infelicitous declaration of
an API on some platforms, or a program generator that doesn't take
sufficient care to avoid warnings - I'm looking at *you*, Flex - makes
it impossible to fix without introducing other problems, using the
DIAG_OFF()/DIAG_ON() macros if possible).  Eliminate the empty lists, to
make it harder to fill them up again.

Change-Id: I298d07952c0cb1842a4ea71ba7e07c68e94a04e9
Reviewed-on: https://code.wireshark.org/review/7229
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-18 08:04:32 +00:00
Gerald Combs b3f3d669e5 Update Qt version checks.
It looks like QPaintDevice::devicePixelRatio() was added in 5.1.

Back out some debugging code.

Change-Id: I40f19c0d7901ce95f587531983e5c6644daf64f4
Reviewed-on: https://code.wireshark.org/review/7226
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 02:14:59 +00:00
Gerald Combs b10bad126a Fix QCustmPlot retina problems.
Make sure our intermediate pixmaps have the same number of pixels as the
screen.

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

Change-Id: I19950181d52f347e3aa7f5abb6e9ad33a4097abf
Reviewed-on: https://code.wireshark.org/review/7224
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 01:19:46 +00:00
Guy Harris 859511db14 Make UAT record update callbacks return a success/failure indication.
Have them return TRUE on success and FALSE on failure.  Check the return
value rather than whether the error string pointer is null or not.

Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c
Reviewed-on: https://code.wireshark.org/review/7222
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-18 00:41:09 +00:00
Martin Kaiser 47f27e3cc6 [Qt] don't clear the display filter when a capture file is closed
Bug: 10951
Change-Id: I958aa9e88c30ac20cd7d7971ee903ac97265c1f4
Reviewed-on: https://code.wireshark.org/review/7098
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-02-17 21:16:44 +00:00
Gerald Combs 2c43b6885e Set a window icon for WiresharkDialog.
Otherwise it ends up with a generic icon.

Change-Id: I47292c966332073d07ef358316cf8b40bcf1329b
Reviewed-on: https://code.wireshark.org/review/7200
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-17 20:30:52 +00:00
Jeff Morriss 1478db03d5 Fix up formatting and indentation a bit.
Change-Id: Ifdc6b8b2525efdc9e0f73519e73afbd4adbf65f4
Reviewed-on: https://code.wireshark.org/review/7191
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-17 03:41:20 +00:00
Michael Mann b2c81bb9e8 Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to worry about the wmem_allocator.

Change-Id: If976fe7b0c3f9cd053225096c2ac05418f061af6
Reviewed-on: https://code.wireshark.org/review/7081
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-16 12:47:02 +00:00
Peter Wu 45674b7a04 Qt: fix "Assigned value is garbage or undefined"
Clang Static Analyzer reported that function link_changed uses a garbage
value for "device.links" which is indeed the case when
global_capture_opts.all_ifaces->len == 0.

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

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

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

Verified with clang 3.5.1.

Change-Id: I03e0f179577a23a3f1efdca768e67922273192f0
Reviewed-on: https://code.wireshark.org/review/7145
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-16 02:32:05 +00:00
Peter Wu 4f3646fe62 Fix handling of invalid UAT items
If the UAT file failed a field check, then the user_data pointer may be
empty. As a result uat_save() triggers an invalid write.

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

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

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

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

Change-Id: Ia35cfe9d2b793c65144ae7e29a1ed706b6668d99
Reviewed-on: https://code.wireshark.org/review/7120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-15 23:52:24 +00:00
Bill Meier bfde04b845 ui/gtk/*.c: Add editor modelines; As needed: Fix indentation
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753
Reviewed-on: https://code.wireshark.org/review/7138
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-15 19:02:30 +00:00
Gerald Combs f80a720a88 WSUG and image updates.
Update the protocol hierarchy, conversation, and endpoint sections of
the User's Guide. When everything is an admonition nothing stands out.
Make a series of "NOTE"s plain old paragraphs. Scale the new
conversation and endpoint images to fit the page width. This looks funny
in my browser but I'm not sure about the best way to fix it.

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

Fixup traffic table column names and window titles.

Change-Id: I674342ed901fc64563b384ee5e1f35413736cb19
Reviewed-on: https://code.wireshark.org/review/7122
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 19:47:03 +00:00
Gerald Combs e11d7ef08f Fix diagnostics macros and squelch a gcc warning.
Both clang and gcc define __GNUC__. Make sure we account for that when
defining diagnostic macros.

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

Get rid of packet_char_enc casts.

Change-Id: Idbcc61bcdb35c1d20f185461c69451dcdf73bae9
Reviewed-on: https://code.wireshark.org/review/7106
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 19:46:42 +00:00
Michael Mann 91b5042ece "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: Ic7dee275ba0a2bd4e19c06702a867417c5624c27
Reviewed-on: https://code.wireshark.org/review/7080
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-14 15:56:21 +00:00
Gerald Combs b5a3b65f7a Qt: Fix side effects of recent WiresharkDialog changes.
Quit the application when the main window closes. This cleans up any
other top-level windows that might be open.

Don't dereference a NULL pointer when opening the sequence dialog from
the VoIP calls dialog.

Change-Id: I9902d40ead1c5f2e541b6d79f3d957228e4e9687
Reviewed-on: https://code.wireshark.org/review/7107
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-14 00:19:58 +00:00
Bill Meier 9c866ff971 Replace tabs by spaces when editor modelines has "expandtab"
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7
Also: tabs-stops should be 8
Reviewed-on: https://code.wireshark.org/review/7100
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 17:34:53 +00:00
Gerald Combs 936f685af5 Qt: Allow shift-double-clicking on a frame link.
You can open a new packet window in the GTK+ UI by holding down the
shift key and double-clicking on a frame link in the protocol tree. Add
this behavior to the Qt UI. Document the different ways of opening a new
packet window and update the image.

Change-Id: I55caf6cc8089a6c305fafd47b4870e7c69dbfb10
Reviewed-on: https://code.wireshark.org/review/7101
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 17:30:26 +00:00
Gerald Combs 8843606666 Qt: Try to make some dialogs behave like windows.
Initialize WiresharkDialog with a NULL parent. This should make its
subclasses behave like independent windows.

Change-Id: If84609eeba53a92780c0873a1243888998d2b26b
Reviewed-on: https://code.wireshark.org/review/7094
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>
2015-02-13 16:07:00 +00:00
Vincenzo Reale 91a6e5eb25 Italian translation update
Change-Id: Ibf66f25a257051ba12c3fb9687ac57377117138f
Reviewed-on: https://code.wireshark.org/review/7036
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-13 10:35:45 +00:00
Gerald Combs f0b4b72158 Qt: Revert g6e88978 for main_status_bar.
It made some slot signatures unusable.

Change-Id: I0f7cdad9e84a5ffb2bdfe4042ac93b3ea19b4893
Reviewed-on: https://code.wireshark.org/review/7095
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 04:22:02 +00:00
Gerald Combs 80342e43e8 Qt: Make WiresharkDialog act like a window.
Set Qt::Window when we initialize QDialog. This should add a minimize
button to most of the dialogs that need one.

Change-Id: I8595dee9c6a28a4e0a8518213176ba10a6d8dcc6
Reviewed-on: https://code.wireshark.org/review/7093
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 03:07:32 +00:00
Gerald Combs a0498f177a Qt: Double clicking a packet opens the packet window.
Connect the packet list's doubleClicked signal to the main window's
openPacketDialog slot.

Change-Id: I5bc20c113fb1f22e2257fc1dbdef76c9920e05d0
Reviewed-on: https://code.wireshark.org/review/7092
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 03:02:47 +00:00
Gerald Combs 6e88978fd9 Qt: More #include → forward declarations.
Change-Id: Ib6de71f801cd3053374b6c867370acd594dcd396
Reviewed-on: https://code.wireshark.org/review/7089
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 02:31:16 +00:00
Gerald Combs a5652c7257 Qt: ElidedLabel doesn't support rich text / HTML.
Change-Id: Ia5ca9784c60325c01ba5e6378997008f8ef1dd6e
Reviewed-on: https://code.wireshark.org/review/7091
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 00:50:20 +00:00
Gerald Combs f1d1354b83 Try to fix compilation on OS X.
Change-Id: I63d1f639bf5fd56aeaea112c797efedca8c0bf6e
Reviewed-on: https://code.wireshark.org/review/7090
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13 00:12:01 +00:00
Gerald Combs 931807ea61 Qt: Add the "new packet" window^Wdialog^Wwindow.
Allow persistence across files. Preserve the use of "window" even
though we're really a dialog.

Update ByteViewTab and ProtoTree to support multiple instances.

Remove the need for a cast in frame_data.

Add more forward declarations.

Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2
Reviewed-on: https://code.wireshark.org/review/7086
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-12 23:32:54 +00:00
Anders Broman 4359cb8478 Revert ""Hide" hashether_t structure."
This reverts commit 297ef07b9b.

Change-Id: Id47f5fd221b631c95ca71e3f9315f5263bab22de
Reviewed-on: https://code.wireshark.org/review/7077
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:30 +00:00
Anders Broman 53228c4bd8 Revert "Make get_manuf_name return a const string."
This reverts commit 797ea88aef.

Change-Id: I9bc2cef0051d88c6374c6f1868b0250cba3edbd4
Reviewed-on: https://code.wireshark.org/review/7076
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:05 +00:00
Michael Mann 797ea88aef Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to work about the wmem_allocator.

Change-Id: I80f465ae0845290255a659ab63310ac3cc35506e
Reviewed-on: https://code.wireshark.org/review/7075
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 07:36:20 +00:00
Michael Mann 297ef07b9b "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: I6d70b9bacbc0fa1898150f59c0c69779a6cd5d51
Reviewed-on: https://code.wireshark.org/review/7074
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 07:31:05 +00:00
Bill Meier 3c9c9bc299 capture_dlg.c: Fix (possibly valid) "Using uninitialized memory" MSVC2013 Code Analysis warning
Change-Id: I849b731420d779b68ab4335eb8d06482ecd649e7
Reviewed-on: https://code.wireshark.org/review/7068
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-11 17:03:53 +00:00
Gerald Combs c34ded4ae2 Qt/C++: Change a bunch of includes to forward declarations.
In theory this this should reduce compilation times. On my particular
system it makes no difference but hopefully it will elsewhere.

Change-Id: I570177d3ca4eec691c82d46b4dbbce74092aac1d
Reviewed-on: https://code.wireshark.org/review/7060
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-10 19:59:43 +00:00
Kevin Grigorenko 3b2954208a Add a "Sum" column to the Service Response Time (SRT) window.
The Service Response Time (SRT) window currently provides the
columns: Index, Procedure, Calls, Min SRT, Max SRT, and Avg SRT.
A Sum column has been found useful in some customer situations
to understand the total time spent doing a set of procedures.
For example, in one case we were trying to isolate whether most
time was being spent on a client thread or in the act of making
outbound calls. We knew the start and end time of the client call,
so with the "Sum" of time spent in that period, we could isolate
a particular set of procedures driving the slow down.

Additional changes made in this patch:
* Add " (s)" to Min, Max, Avg, and Sum columns to make it clear
  that times are in seconds.
* Refactor out width and height constants used in calls to
  gtk_window_set_default_size in most of the SRT users into
  #define SRT_PREFERRED_WIDTH and SRT_PREFERRED_HEIGHT. Also
  increase the common width of 550 to 650 to account for the
  additional column.

Change-Id: I20f152eecbcd0bbf69f71c6c6b9f9463e8867e23
Reviewed-on: https://code.wireshark.org/review/7047
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-10 06:18:41 +00:00
Guy Harris 895b0130de Use G_GINT64_MODIFIER when formatting g{u}int64 values.
Remove extra trailing blank from output while we're at it.

Change-Id: Ie415afa76a3eaba630ee3d59b177b44de75413a4
Reviewed-on: https://code.wireshark.org/review/7046
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-09 19:32:54 +00:00
Bill Meier e88a11f5c9 (Trivial) Fix printf-related 'Mismatch on sign' warnings
Found by MSVC2013 Code Analysis

Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79
Reviewed-on: https://code.wireshark.org/review/7045
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-09 18:57:14 +00:00
Peter Wu 702618fa61 Fix use-after free in RTP player
Clicking "Decode" in the RTP player triggered an ASAN
heap-use-after-free in update_progress_bar(). Explicitly set
progress_bar to NULL to prevent this.

Change-Id: Ice3105a11642a1cc5a54b8fbdf7dbf0ed430d965
Ping-Bug: 10714
Reviewed-on: https://code.wireshark.org/review/6999
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-09 05:26:29 +00:00
Alexis La Goutte 58f8076fad Menubar (GTK): fix warning: no previous prototype for ‘set_menus_capture_start_sensitivity’ [-Wmissing-prototypes]
Change-Id: I11c805b285d277ecb963622385154c310f6d1c67
Reviewed-on: https://code.wireshark.org/review/7032
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-08 22:34:03 +00:00
Alexis La Goutte 0310132a82 Multicast Stream: Move mcast_stream.[ch] to ui
Preparation to add Multicast Stream Dialog on Qt (Add extern C...)

Change-Id: Ic8bc39a18dba607d6da116df799de7847ce8e4c8
Reviewed-on: https://code.wireshark.org/review/6984
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>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-08 22:22:33 +00:00
Guy Harris 3066d6b29f Don't call the Bluetooth code's UUID type "uuid_t".
uuid_t is a data type provided by a number of environments, thanks to
the Open Software Fuundation; calling the Bluetooth code's data type,
which includes an actual OSF-style UUID as a member, "uuid_t" can lead
to confusion and *does* lead to compile errors on platforms where, for
better or worse, system headers such as <unistd.h> define uuid_t (and
are included by, for example, Qt headers).

Just rename it "bluetooth_uuid_t".

Change-Id: Ic742723913ba4105cd3269dd24fc821147285176
Reviewed-on: https://code.wireshark.org/review/7017
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-07 22:52:06 +00:00
Gerald Combs 22b461943e Add the profile name to the Coloring Rules window title.
Matches GTK+ behavior.

Change-Id: I3dedb1532b5e14cc18a3ff34fd5be89438912834
Reviewed-on: https://code.wireshark.org/review/7012
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-07 20:58:47 +00:00
Gerald Combs 6dd1296b76 WSUG: Update the Packet Colorization section.
Change-Id: I0f880293bd185e202d230f0db1a6bc4cbe6cfbfb
Reviewed-on: https://code.wireshark.org/review/7011
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-07 19:23:11 +00:00
Michal Labedzki fb00452b30 Bluetooth/GUI: ATT: Add Server Attribute Table
It is a GUI+QT feature that introduce Bluetooth menu and
"ATT Server Attributes" that present all handle+UUID pairs
as table. User may copy cell value, row, selected rows or whole
table within header. On activate user will go to packet that
introduce UUID for specified handle.

Change-Id: If17e53aff5feb89ededc740a595ba5882b90be5e
Reviewed-on: https://code.wireshark.org/review/6911
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-07 16:35:39 +00:00
Peter Wu 2c65b33b21 Fix RTP crash on RTP analysis attempt
The tap listener was handling rtpstream_tapinfo_t* types while other
users was expecting a GList* instead. Fix this and avoid future
confusion by replacing void* pointers.

Ping-Bug: 10714
Change-Id: I66f62eaaed4a529714264bbf4e7ad1e72b46ce5a
Reviewed-on: https://code.wireshark.org/review/6997
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-07 02:16:06 +00:00
Gerald Combs 6f22eb6f7f Qt: Fix coloring rules reordering.
Change-Id: I8bf36fffb3e3fc19c10c5f07db951cc5a4253556
Reviewed-on: https://code.wireshark.org/review/6998
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-07 00:44:08 +00:00
Gerald Combs c8cad99515 Qt: Add the Coloring Rules dialog.
Merge in the old ColorDialog which was a placeholder for
color_filter_add_cb.

Change-Id: I48d188509f480b8514122b4011ac9d8790fcca10
Reviewed-on: https://code.wireshark.org/review/6996
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-07 00:30:30 +00:00
Gerald Combs b3f3dd8d82 Qt: Fix preference change behavior.
Main window:

Keep track of our current layout and only change it if the preferences
change. This keeps the panes from resizing.

Re-select the current packet if the layout changes so that the proto
tree and byte view aren't left in an invalid state. This fixes a crash
similar to bug 10896.

Search frame:

Get rid of an invalid error message. Update coding style.

I don't think any of these fix bug 10921 since Xiaochuan seems to get a
crash immediately upon opening the dialog.

Change-Id: I0e880a50d3c9ac1c6ae6a01034b05fd2249444f4
Reviewed-on: https://code.wireshark.org/review/6989
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-06 23:23:02 +00:00
Alexis La Goutte 8b095bc25e Multicast Stream (GTK): fix crash when try to select a stream
Change-Id: Iaaa9445ae99b37cfb1865251d50f38375f3eb272
Reviewed-on: https://code.wireshark.org/review/6985
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-06 16:19:40 +00:00
Gerald Combs a748e83143 Qt: Add "Copy As..." to the Protocol Hierarchy stats.
This implementation is slightly different compared to other dialogs
since we have nested items.

Tweak the bar highlight color look better on Windows while we're here.

Change-Id: If0607c4624f304042fe3d6c8a941756b342e703d
Reviewed-on: https://code.wireshark.org/review/6953
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-04 18:26:01 +00:00
Alexis La Goutte 0f353c9cc4 HTTP2: Add tap for HTTP2 dissector
Change-Id: Ib13d9391b64dad19321a4399c95b95d7fb791284
Reviewed-on: https://code.wireshark.org/review/6421
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>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-04 07:09:49 +00:00
Michael Mann 90a76e0d51 Convert val_to_str -> val_to_str_wmem.
This is mostly for GUI usage, but a few dissectors needed some "non-packet scope" conversions.

val_to_str officially now uses wmem_packet_scope()

Change-Id: Ic9413eeb3406d7a7683222b86709f3675d628d81
Reviewed-on: https://code.wireshark.org/review/6933
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-04 06:58:49 +00:00
Gerald Combs 89e6f4c468 Qt: Add the Protocol Hierarchy statistics dialog.
Change-Id: I6872e323daca4798c638d764873f54c4c0dc0006
Reviewed-on: https://code.wireshark.org/review/6934
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-04 02:06:01 +00:00
Guy Harris 0e74e8b0cc Decorate declarations with G_GNUC_PRINTF() as appropriate.
Decorate val_to_qstring() and val_ext_to_qstring() similarly to
val_to_str_wmem(); this squelches some compiler warnings.

Change-Id: I86e102e7c0a1a135be9492b7d605001c5d922031
Reviewed-on: https://code.wireshark.org/review/6940
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-04 00:25:56 +00:00
Dario Lombardo 9b22a2f895 Updates in it translation.
This fixes also the "duplicate messages" error.

Change-Id: Iec93d82d4776c4f9805c5bfa2b2453c22b0e24e8
Reviewed-on: https://code.wireshark.org/review/6929
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-03 23:22:44 +00:00
Michael Mann b635997624 Convert val_to_str_ext -> val_to_str_ext_wmem for calls that don't have valid packet scope (GUI).
val_to_str_ext now officially uses wmem_packet_scope().

Removed const from val_to_str[_ext]_wmem return value since it's not really constant.

Created utility functions in qt_ui_utils.h to help with the new memory management for its GUI.

Change-Id: Idf2ce4a4ce78d628b2269ad23a3a48fbfc9c077c
Reviewed-on: https://code.wireshark.org/review/6926
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-03 13:03:32 +00:00
Gerald Combs 00f7bc4b3d Qt: Fix IO Graph capture file closing.
Make sure our IOGraphs remove their respective tap listeners before the
capture file closes, otherwise the graph data ends up getting cleared
via reset_tap_listeners.

Bug: 10871
Change-Id: I0ef2af2dc84be1921a930df8bb68f63626aa874a
Reviewed-on: https://code.wireshark.org/review/6925
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-03 01:20:36 +00:00
Alexis La Goutte 003e3373f5 Fix some indent typo (after g2bf7878e)
Change-Id: I44769f127f32ffd8a97b1579f371501f4aa9832a
Reviewed-on: https://code.wireshark.org/review/6913
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-02 12:37:06 +00:00
Guy Harris 3947091a50 Fix a typo.
Change-Id: I2724340e41572fdaa56ebf75478297090563c522
Reviewed-on: https://code.wireshark.org/review/6895
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-01 21:03:13 +00:00
Guy Harris cca2cde68e No main window *to* update in the early argument list parsing.
We haven't yet popped the main window up, so, when we call
capture_interface_list(), we shouldn't pass a pointer to the "update the
main window" routine.

Change-Id: Id3e02199479e66bb9e9aff99b435bd03af45a1af
Reviewed-on: https://code.wireshark.org/review/6868
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31 04:03:58 +00:00
Gerald Combs e76e14074e Qt: Fix library path reset.
g9a3676a reset the Qt library path *after* wsApp was instantiated, which
is too late. Do so before QCoreApplication has a chance to do anything
we might regret.

Change-Id: Ibbdb69d1b7c0ea4bf1042e98a5bb5deba13e954e
Reviewed-on: https://code.wireshark.org/review/6864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-30 23:37:18 +00:00
Gerald Combs 9a3676accb Qt: Clear our library path at startup on Windows.
I recently rebuilt my Windows development VM and discovered that I could
no longer run Wireshark executables from wireshark.org. Trying to do so
failed with the following error:

----
This application failed to start because it could not find or load the
Qt platform plugin "windows".

Available platform plugins are: minimal, offscreen, windows, windows.

Reinstalling the application may fix this problem.
----

As it turns out there are two issues. According to
http://doc.qt.io/qt-5/windows-deployment.html The search path
for Qt plugins is hard-coded into the QtCore library. Dependency
Walker confirmed this, showing that Qt5Core.dll tried to load
C:\Qt\5.3\msvc2013_64_opengl\plugins\platforms\qwindows.dll instead of
C:\Program Files\Wireshark\platforms\qwindows.dll.

The second issue is that the Qt online installer only uses the major
and minor version, e.g. C:\Qt\5.3. This means that you can end up with
Qt 5.3.0, .1, .2, or .3 depending on *when* you run the installer.

The Windows builders have 5.3.1 installed while my development VM
has 5.3.2. Apparently qwindows.dll is not compatible between these two
versions, hence the startup error. (...so what happens if you can create
a malicious qwindows.dll which *is* compatible on someone's machine?)

This change removes any entries from QCoreApplication::libraryPaths that
don't match our executable path. This shouldn't be an issue in our case
because both the NMake+QMake and CMake environments run windeployqt to
copy in any required DLLs.

If it *is* an issue or if clearing the library path list causes other
problems I can reinstall Qt on the Windows builders into a unique and
obvious path, e.g. C:\Qt-check-your-path-before-you-wreck-your-path\5.3

Change-Id: I1918bc4e520aba32cfcf9f4ccd37bf9255058cbe
Reviewed-on: https://code.wireshark.org/review/6863
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-30 21:11:04 +00:00
Gerald Combs 2bf7878e8a Qt: Add the RTP Streams dialog.
Add keyboard shortcuts. Note that not all of the buttons made it from
GTK+.  Add a "Go to setup frame" option.

Move rtp_streams.c from ui/gtk to ui.

Add a help URL for RTP analysis (which needs to be split into streams +
analysis).

Fix RTP stream packet marking.

Change-Id: Ifb8192ff701a933422509233d76461a46e459f4f
Reviewed-on: https://code.wireshark.org/review/6852
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-30 06:48:32 +00:00
Gerald Combs 67b069e544 Qt: Add address conversion convenience routines
Add address_to_qstring and address_to_display_qstring, which wrap
address_to_string and address_to_display respectively and return
QStrings. Convert most of the instances in ui/qt to the new routines.

Fix a some memory leaks in the process.

Change-Id: Icda80bbfe0b2df723d54c8da84355255f819af89
Reviewed-on: https://code.wireshark.org/review/6848
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-29 22:51:43 +00:00
Alexis La Goutte 83678a05ea Proto dialog (GTK) : fix indent (use 2 spaces) and add modelines
Change-Id: I36945843b8d544188a3ffe89f397e669f3944593
Reviewed-on: https://code.wireshark.org/review/6831
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-28 12:46:31 +00:00
Gerald Combs 3aab6fc90e Qt: Update packet list freeze/thaw behavior.
Move the clear() calls in gee320ef a bit earlier in the code to
PacketList::freeze. No model means no packets.

Bug: 10896
Change-Id: Ie440e3da4c5fb601048f4e94c8712ecf2d864d4f
Reviewed-on: https://code.wireshark.org/review/6823
Reviewed-by: Sean Stalley <seanstalley@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-27 21:26:14 +00:00
Dario Lombardo 9bbc337306 Added HPFEEDS stats_tree.
Change-Id: I256fd5395b062fa954ebd60598721323ea1d7ff1
Bug: 10875
Reviewed-on: https://code.wireshark.org/review/6713
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: 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-01-27 13:19:20 +00:00
Alexis La Goutte 32cbf791e6 Qt: Add checkable for Find Packet icon
Change-Id: Idd3c0b1893a9e0f8bc329e9157baaccd10de7378
Reviewed-on: https://code.wireshark.org/review/6814
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 12:47:35 +00:00
Alexis La Goutte b5a3907a71 Packet List (Qt): fix extra ‘;’ [-Wpedantic]
Change-Id: I3ac80a13da91452de4c857abfd6f2661b00e2f5d
Reviewed-on: https://code.wireshark.org/review/6815
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-01-27 12:47:05 +00:00
Alexis La Goutte 77227d40bf GTK: Fix multispace on main title bar
Change-Id: I275a586c16621fdfabede23f6a1d03c8d8556b3f
Reviewed-on: https://code.wireshark.org/review/6813
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 12:45:27 +00:00
Alexis La Goutte ec7ff4e25d GTK: fix no previous prototype for ... [-Wmissing-prototypes]
Add by commit g43f09e67b (Remove unneeded includes from ui folder)

Change-Id: I66eb113430bde97e18bb3d2b00f6bac46a01797e
Reviewed-on: https://code.wireshark.org/review/6809
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 12:37:10 +00:00
Alexis La Goutte a9aba9408b GTK: fix no previous prototype for ... [-Wmissing-prototypes]
Add by commit g43f09e67b (Remove unneeded includes from ui folder)

Change-Id: I7c9d9e2bbd76d062f96422c74ee8eb8c6ecd328b
Reviewed-on: https://code.wireshark.org/review/6808
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 12:35:39 +00:00
Evan Huus ee320ef1bf qt: clear tree and bytes when no packet selected
Otherwise trying to interact with them will cause all sorts of funny crashes.

There's probably a better way to trigger these (having the widgets register for
a signal, and sending that signal, or something something something) but this
works and I don't feel like reading 20 pages of Qt documentation right this
instant.

Change-Id: Ic52806ae5ba8d7776f835695590559b8c705d083
Ping-Bug: 10896
Reviewed-on: https://code.wireshark.org/review/6803
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-27 03:38:13 +00:00
Gerald Combs 21dfda65d7 Qt: Remove windowIcon property from our .ui files.
Setting the windowIcon property in foo.ui means we end up with a
setWindowIcon call in ui_foo.h. Along with setting the window title
bar icon, it also sets the taskbar icon on Windows. A 16x16 PNG gives
us a jaggy taskbar icon. (Windows ICO format is supported via a plugin
which might not be available everywhere, otherwise we could try using
a .ico resource.)

Move the setWindowIcon call from ge990d1b to the top of the MainWindow
constructor and enable it everywhere.

Change-Id: I4e9765200bb3676c4faa8e0ab1505ce02fb64870
Reviewed-on: https://code.wireshark.org/review/6762
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-23 19:15:29 +00:00
Gerald Combs e990d1b2e8 Try to fix the jaggy taskbar icon.
Possibly related to https://bugreports.qt.io/browse/QTBUG-19441.

Change-Id: Idf7ff8a247f459ce465907760ca0ebeaff2cffa8
Reviewed-on: https://code.wireshark.org/review/6746
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-23 12:14:58 +00:00
AndersBroman ae92cd48a9 [Qt] Run windeployqt for Qt versions greater than 5.2
Change-Id: I3c7e7ed35ffead280c1ac394a4ef8172a89fe3a6
Reviewed-on: https://code.wireshark.org/review/6622
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-18 22:49:59 +00:00
Guy Harris 050bc7d100 Update some comments to reflect reality.
Get rid of references to ep_ and se_ allocation in code that now uses
wmem allocation instead.

Fix API documentation of conversation_table.h routines to reflect that
as well - some APIs changed to pass wmem scopes.

Also, zbee_sec_key_hash() now takes the output buffer as an argument and
just returns it, and nobody actually uses the return value, so change it
to return void.

Change-Id: Ife1ec675a9322fd0f0be306a9d639ec17aad1c7a
Reviewed-on: https://code.wireshark.org/review/6636
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 21:02:40 +00:00
Guy Harris e601e01ffd Remove some apparently-unnecessary includes of emem.h.
Also update a comment to no longer speak of ep_ allocation, and add an
include of <glib.h> to ui/profile.c, which was formerly relying on the
include of emem.h to drag it in.

Change-Id: I08926699ee96cf66672836b6ee3bbb405b507ce8
Reviewed-on: https://code.wireshark.org/review/6633
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 19:47:20 +00:00
Guy Harris c7500dd46a Fix another dfilter_compile() call.
Change-Id: I8b035a09b1bc1981a78a80e0a2547dce65a2ac9c
Reviewed-on: https://code.wireshark.org/review/6609
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 10:44:27 +00:00
Guy Harris cfcbb28671 Clean up ftype-conversion and dfilter error message string handling.
Have dfilter_compile() take an additional gchar ** argument, pointing to
a gchar * item that, on error, gets set to point to a g_malloc()ed error
string.  That removes one bit of global state from the display filter
parser, and doesn't impose a fixed limit on the error message strings.

Have fvalue_from_string() and fvalue_from_unparsed() take a gchar **
argument, pointer to a gchar * item, rather than an error-reporting
function, and set the gchar * item to point to a g_malloc()ed error
string on an error.

Allow either gchar ** argument to be null; if the argument is null, no
error message is allocated or provided.

Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c
Reviewed-on: https://code.wireshark.org/review/6608
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 10:22:59 +00:00
Michael Mann a1f2342e13 Miscellaneous ep_strdup_printf replacement.
Change-Id: I973c672e9d573ad67e9b9fd82a5610aaf8a74efa
Reviewed-on: https://code.wireshark.org/review/6605
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-01-18 04:15:18 +00:00
Michael Mann 403be722ce Remove emem from GeoIP
Change-Id: Ifa96dc38a277b86c28f762489251dcc595afae67
Reviewed-on: https://code.wireshark.org/review/6603
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-18 04:14:03 +00:00
Michael Mann 77dac91eb0 A few more emem replacements with wmem.
Change-Id: Icfb319fba937642db637a7f26b5e7627461df3b0
Reviewed-on: https://code.wireshark.org/review/6590
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-17 21:05:58 +00:00
Michael Mann 5c5b3f7d26 Convert proto_construct_match_selected_string to use wmem.
Change-Id: I7a40c0996517aa71b4ddb764ce3a6e92a55260ad
Reviewed-on: https://code.wireshark.org/review/6589
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-17 21:04:22 +00:00