Commit Graph

3829 Commits

Author SHA1 Message Date
Gerald Combs 49151eb28c [Automatic update for 2015-10-04]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ieb909c2aea62525b763cab6765704093c7fea706
Reviewed-on: https://code.wireshark.org/review/10782
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-04 15:11:34 +00:00
Gerald Combs 8d3b97cc90 Use QVector::size instead of ::length.
Qt < 5.2 doesn't have ::length.

Change-Id: Ie6a06034c5e2ea8ddc1f9e1131a682ff9442fb75
Reviewed-on: https://code.wireshark.org/review/10754
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 21:19:34 +00:00
Gerald Combs 4d10e817b5 Distcheck fixes.
Add more speex files to the distribution.

Comment out a for-now-unused variable.

Change-Id: Iea3a0fad81e2cb599209e1c30ecbdbdb153d1328
Reviewed-on: https://code.wireshark.org/review/10749
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 19:38:39 +00:00
Guy Harris c11fea54a5 Get rid of unused variable.
Change-Id: Ife7f0c972ed67ef4f89c71faf6bc9cdccf007284
Reviewed-on: https://code.wireshark.org/review/10747
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-02 19:24:27 +00:00
Gerald Combs 3687d39304 Qt: Initial RTP playback.
Note the "initial". This is woefully incomplete.  See the "to do" lists
below and in the code.

This differs a bit from the GTK+ version in that you specify one or more
streams to be decoded.

Instead of showing waveforms in individual widgets, add them all to a
single QCustomPlot. This conserves screen real estate and lets us more
easily take advantage of the QCP API. It also looks better IMHO.

Change a bunch of checks for QtMultimediaWidgets to QtMultimedia. We
probably won't use the widgets until we make 5.0 our minimum Qt
version and plain old QtMultimedia lets us support Qt 4 more easily
(in theory at least).

Add resampling code from libspeex. I initially used this to resample
each packet to match the preferred rate of our output device, but this
resulted in poorer audio quality than expected. Leave it in and use to
create visual samples for QCP and to match rates any time the rate
changes. The latter is currently untested.

Add some debugging macros.

Note that both the RTP player and RTP analysis dialogs decode audio data
using different code.

Note that voip_calls_packet and voip_calls_init_tap appear to be dead
code.

To do:

- Add silence frames where needed.
- Implement the jitter buffer.
- Implement the playback timing controls.
- Tapping / scanning streams might be too slow.

Change-Id: I20dd3b66d3df53c9b1f3501262dc01458849f6b4
Bug: 9007
Reviewed-on: https://code.wireshark.org/review/10458
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 18:26:05 +00:00
Gerald Combs b02b037b1c Try to fix the NMake + QMake build.
Add supported_protocols_dialog.cpp to Wireshark.pro.

Change-Id: I7ff95960ca2ddccaa3f8d997173142cc77950efa
Reviewed-on: https://code.wireshark.org/review/10736
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 00:37:08 +00:00
Gerald Combs 77a9181882 Add the supported protocols internals dialog.
Includes a bonus search field.

Change-Id: I0b101b725d531a59c8a2fdbfbf4690b507135546
Reviewed-on: https://code.wireshark.org/review/10731
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-10-01 21:11:47 +00:00
Peter Wu b02a0ee48a Fix crashes related to RTP Streams analysis
The data that describes RTP streams become invalid when packets are
re-dissected. This results in a crash in GTK when the "RTP Analyse"
option is used and and a crash in Qt when the display filter is changed
while the RTP Streams dialog is open.

Fix this by adding a tap_reset callback (modelled after mcaststream) to
the RTP tap listener that allows the GTK+ and Qt dialogs to clear the
displayed list of RTP streams.

Bug: 10016
Change-Id: I7478678db63d7ac8110c44c163844e9f66fad9e9
Reviewed-on: https://code.wireshark.org/review/10728
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: Michael Mann <mmann78@netscape.net>
2015-10-01 20:46:50 +00:00
Peter Wu ba5df1eea6 Revert "gtk: Fix crash on Analyze RTP stream"
Qt is affected by a similar issue, a different approach is needed.

This reverts commit 01bd832b9d.

Change-Id: Ic03807e8d00a3114bac1507762df05870b0346d9
Reviewed-on: https://code.wireshark.org/review/10727
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-01 20:43:29 +00:00
Gerald Combs a013823934 Add the conversation hash tables internals dialog.
The GTK+ version dumps "new" and "old" hash values. It looks like
neither are valid since the code in conversation.c and
conversation_hashtables_dlg.c have diverged.

For now just dump the addresses and ports for each hash table in the Qt
UI.

Change-Id: I832522dff06da769bd4ad3ead3d541206f283a90
Reviewed-on: https://code.wireshark.org/review/10713
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-10-01 17:25:28 +00:00
Michael Tüxen c53d2f0d0e Revert "SCTP: Add I_DATA support"
This reverts commit 4e9361dc88.

Change-Id: Ia7aee9ffbe5bc5d3ae88e957c234cbee7b65f457
Reviewed-on: https://code.wireshark.org/review/10723
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2015-10-01 14:22:12 +00:00
Michael Tüxen d9233585be Revert "Fix typos."
This reverts commit e47ea6d749.

Change-Id: Ia5b7f5cdb1f17705010ac60bd2105156014f6d00
Reviewed-on: https://code.wireshark.org/review/10721
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2015-10-01 14:16:12 +00:00
Michael Tüxen e47ea6d749 Fix typos.
Change-Id: I3c03cbb064d1d7ffd579982b2e670b84b1768db2
Reviewed-on: https://code.wireshark.org/review/10717
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2015-10-01 12:24:07 +00:00
ruengeler 4e9361dc88 SCTP: Add I_DATA support
Change-Id: Ib8566b7d94fdafdb9735b356d129f378c94af3cf
Reviewed-on: https://code.wireshark.org/review/10716
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-01 11:47:04 +00:00
Martin Mathieson e3ace4f27d Use a 'recent' setting to persist the checkbox controlling the source of PDUs to use in LTE RLC statistics
Change-Id: I20234c3a3bf7761f70b0db5a6acbbf54ffbfcef5
Reviewed-on: https://code.wireshark.org/review/10699
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-30 12:55:51 +00:00
Peter Wu 1d0532fee5 qt: warn when jumping to an invalid packet number
I was confused when double-clicking a packet number did not work. It
turns out that the display filter was hiding the destination.

Check the packet number for sanity, just like GTK+ does.

Change-Id: If50b2a3091a468f880b42fd2385f1b74c30d2f2b
Reviewed-on: https://code.wireshark.org/review/10700
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-09-30 12:40:06 +00:00
Peter Wu 01bd832b9d gtk: Fix crash on Analyze RTP stream
When updating the RTP streams list, the data associated with the current
selection becomes invalid when the old list is cleared.
gtk_list_store_clear somehow triggers the selection callback which
attempts to access the invalid memory.

Avoid this by disabling selectability while clearing the list.

Bug: 10016
Change-Id: Id5126ec5ffa41fa6a65339f4453546223124ed67
Reviewed-on: https://code.wireshark.org/review/10690
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: Peter Wu <peter@lekensteyn.nl>
2015-09-30 12:28:04 +00:00
Michal Labedzki 4ea7a9a1b9 Qt: Add F5 as shortcut to refresh interfaces
I am tired to go menu to refresh interfaces.
Shortcut make our live easier.

Change-Id: Ic2a478d7857b8138897088f0a6610df7988b1be9
Reviewed-on: https://code.wireshark.org/review/10520
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-29 21:15:30 +00:00
Martin Mathieson 8426b4b26b lte_rlc_statistics: fix cosmetic issues with data in columns
Change-Id: I2bec8de3d5fe84f0a2287c750c9c9151906fe71e
Reviewed-on: https://code.wireshark.org/review/10688
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-29 18:25:31 +00:00
Pascal Quantin edcbc2485e Decode as (Qt): fix dereference of null pointer found by Clang analyzer
Also fix usage of 'Decode As' window when no file is opened (broken by gf189cb8)

Change-Id: I06ff83394cf31763cecfbbedd99ce7438488872a
Reviewed-on: https://code.wireshark.org/review/10665
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-29 07:18:58 +00:00
Pascal Quantin 5a39cf8ec9 Qt: fix OVERRUN error reported by Coverity in LTE MAC statistics window (CID 1325078)
Change-Id: I281b344ea76418399e2a8038f1220310f6a50bc2
Reviewed-on: https://code.wireshark.org/review/10679
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-28 20:59:44 +00:00
Martin Mathieson 32849b2877 LTE RLC Statistics Dialog
Change-Id: Id0af0227a398fd06ba37c23097fa6809db432d0f
Reviewed-on: https://code.wireshark.org/review/10669
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-28 16:14:06 +00:00
Pascal Quantin 0b1d7b4d97 Qt: mlt_info parameter is unused
Change-Id: Ie5744d076ae4997bd2252dd66bbc92780ffe73e0
Reviewed-on: https://code.wireshark.org/review/10670
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-28 11:52:04 +00:00
Peter Wu 47eb321c5d ui/gtk: fix weird check for axis orientation
There is only one meaning for the flags parameter, namely axis
orientation (x or y). Replace the bitmap by a bool instead.

Clang 3.7.0 reported this warning:

    ui/gtk/tcp_graph.c:1652:29: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
        g->y_axis->flags    &= ~AXIS_ORIENTATION;
                               ~^~~~~~~~~~~~~~~~
    ui/gtk/tcp_graph.c:140:28: note: expanded from macro 'AXIS_ORIENTATION'
    #define AXIS_ORIENTATION 1 << 0
                               ^
    1 warning generated.

This (~1 << 0) happened to work because nothing is actually shifted.

Change-Id: I406235148b7826649d35647f5d0702cd72a925a5
Reviewed-on: https://code.wireshark.org/review/10658
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: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-27 17:09:19 +00:00
Gerald Combs 6d10efc6dd Qt: Add the Dissector Tables dialog.
Add the "Internals" menu under the View menu instead of at the top level
for now at least. Add the Dissector Tables dialog there.

Change-Id: Ieb23b0015591bac196e4ef94e3443832288333f9
Reviewed-on: https://code.wireshark.org/review/10654
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-27 16:19:05 +00:00
Gerald Combs fd617789d9 [Automatic update for 2015-09-27]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ia290c7a187630547265bfd014c18e2523a36842b
Reviewed-on: https://code.wireshark.org/review/10660
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-27 15:12:40 +00:00
Graham Bloice 4150bae2c3 Fix checkapi warnings
Fix some (mostly spurious) checkapi warnings by renaming the
offending variables.

Change-Id: I7a43ac89f5ed35053a6526fa838fbad67669a49a
Reviewed-on: https://code.wireshark.org/review/10655
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-09-26 16:13:15 +00:00
Stig Bjørlykke 13d28691d6 Qt: Use "" for empty QString const reference.
Change-Id: I686eadc865ae38433c3795450aeca8582a74d2c8
Reviewed-on: https://code.wireshark.org/review/10535
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-26 04:26:39 +00:00
Gerald Combs c068bf5ab7 Qt: Update packet detail selection behavior.
Some menu items always need to be enabled or disabled when we call
setMenusForSelectedTreeRow. Do so.

Add some NULL checks.

Change-Id: I5de3df2ceb1dfe19e1cea548b0299004fbea2ec7
Reviewed-on: https://code.wireshark.org/review/10651
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-09-26 01:31:38 +00:00
Gerald Combs 657b930c2d Help dialog shortcut list updates.
Make it clear that the shortcuts are for the main window. Add and update
a few tooltips.

Change-Id: I9ee082a9ede95f4b727fb652437f9ed16c9ef2bf
Reviewed-on: https://code.wireshark.org/review/10650
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-09-26 00:04:57 +00:00
Juan Matias 40a43bd09b UI QT: fix unused variable 'show_delay_' error
Change-Id: I966d839c755090679bb3fc79d2ba36645e561c19
Reviewed-on: https://code.wireshark.org/review/10633
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-24 22:08:51 +00:00
Gerald Combs 0a0598949a Qt: Show keyboard shortcuts in the about box.
Add a "Keyboard Shortcuts" tab to the about box for lack of a better
place. Show every action in the main window which has an associated
shortcut except for recent items.

We might want to add a command-line option to dump the shortcuts in
addition to or instead of showing them here.

Change-Id: I875043048a44930391fefcbbaf17c5b10a7bb8c6
Reviewed-on: https://code.wireshark.org/review/10634
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-24 15:11:46 +00:00
Gerald Combs 30ff173a87 Qt: Always make the packet list row heights uniform.
In tests here using GTK+ 2.24 and 3.10, GtkTreeView handles multi-line
items by adjusting the height for all rows, but only after the number of
multi-line items exceeds some sort of threshold. For a packet capture
which contains a few DNS packets and a lot of TCP packets, if I change
"Standard query" to "Standard\nquery" in packet-dns.c I get
single-height packet list items. If I change "[TCP segment of a
reassembled PDU]" to "[TCP segment of a\nreassembled PDU]" in
packet-tcp.c (which results in more multi-line column strings) I get
double-height packet list items.

The current Qt code initially sets the uniformRowHeights property then
falls back to variable row heights if we run across a multi-line column
string. This adds a lot of logic which can impact other functionality
(e.g. column widths) and recalculating row heights is painfully slow for
large numbers of packets.

Instead of trying to manage variable row heights, always enable
uniformRowHeights. Track the maximum newline count and trigger a row
height adjustment when it changes. This mimics the GTK+ UI behavior,
although it should be more reliable.

Note that we need to adjust some numbers in RelatedPacketDelegate.

Change-Id: I289e963b6f00338c4374e602fa3fc83d04554519
Ping-Bug: 11515
Ping-Bug: 10924
Reviewed-on: https://code.wireshark.org/review/10628
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-23 20:53:18 +00:00
Gerald Combs 66de69aeae Use the Qt-provided media icons.
Use Qt's standard pixmaps to build our media playback, stop, and pause
icons. Note that we probably don't want to do this for all of the
available standard pixmaps.

Change-Id: I78541a46a65583d7365cd601c578ebe8f197c060
Reviewed-on: https://code.wireshark.org/review/10609
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-09-23 19:48:58 +00:00
Martin Mathieson 29be7bf82f LTE MAC Statistics Dialog
Change-Id: I2463fdc0ac209e92d2f2c1abf9da22866d6e22e8
Reviewed-on: https://code.wireshark.org/review/10578
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-09-23 16:20:50 +00:00
Gerald Combs 9a02bd0c39 Make it possible to disable PercentBarDelegate.
Add a check to PercentBarDelegate to see if the caller set text for this
item or did not set a valid double value. If either case is true, just
draw the item normally and return.

Change-Id: I028ee15d54f06f2cb16c6e5f1ef73c47b2886ccd
Reviewed-on: https://code.wireshark.org/review/10600
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-09-21 18:40:44 +00:00
Gerald Combs 50ff8ae0c7 Qt: Add idle dissection.
Features such as sorting and scroll bar colorization require
fully-dissected packets. We currently do dissection at the wrong time --
*after* the user clicks on a packet list column header or moves the
scrollbar.

Add a timer + slot that dissects packets when the UI is idle so that our
packets are at least partially dissected when we need them.

Change-Id: I024c590af2250d67404a520f118e46ec0c49cd71
Reviewed-on: https://code.wireshark.org/review/10593
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-09-21 15:40:29 +00:00
Gerald Combs 4ec8a06cae [Automatic update for 2015-09-20]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ifcdb1c02406189085bda58bc7db10829e3fae2c0
Reviewed-on: https://code.wireshark.org/review/10580
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-20 15:11:32 +00:00
Gerald Combs 587e93a55e Start moving RTP decoding routines to the ui directory.
Move decode_rtp_packet to ui/rtp_media.[ch].

Change-Id: Ib138781c37ac17b807bf75f9d772351aadf72071
Reviewed-on: https://code.wireshark.org/review/10575
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-09-19 15:02:16 +00:00
Pascal Quantin 1d7bcb28f9 Fix 'Decode As' when used with IPv6-in-IPv6 packets
Add the ability to identify an instance of the dissector table to be modified by 'Decode As' thanks to pinfo->curr_layer_num
For now only IPv6 makes use of it but it could be extended to any other protocol
Also get rid of ipv6.nxt protocol: it is not required for 'Decode As' functionality and was colliding with ipv6.nxt field

Change-Id: I3c7403c77328ad7170e13af028d178f962a2b508
Reviewed-on: https://code.wireshark.org/review/10552
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-19 09:28:18 +00:00
Gerald Combs 608029b331 Fix more signal+slot mismatches.
Change-Id: I347509d3a7765387c48e5aaeaab417617320cf13
Reviewed-on: https://code.wireshark.org/review/10576
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-09-19 08:59:09 +00:00
Gerald Combs 7b7a7f198d Fix a VoipCallsDialog signal+slot mismatch.
Change-Id: I9c16cc138b55572aa19b6e02ca059ebde294bdbd
Reviewed-on: https://code.wireshark.org/review/10574
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-09-19 00:38:21 +00:00
Pascal Quantin d547385701 Qt: set default current protocol in 'Decode As' window to none instead of HTTP
It makes more sense (not trying to decode UDP/TCP ports as HTTP) and is consistent across dissectors tables (while currently we have an empty field for tables other than UDP/TCP)

Change-Id: I794529f0f46b4197437a1d258f808991ae2338ad
Reviewed-on: https://code.wireshark.org/review/10571
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-19 00:21:14 +00:00
Gerald Combs e2487f3f16 Fix WLAN statistics header behavior.
Connect itemSelectionChanged to header label updates instead of
currentItemChanged, which seems to be more reliable.

Change-Id: I29f8f2144ad6584e0612d43ec3aac5b258f08ebd
Reviewed-on: https://code.wireshark.org/review/10570
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-09-18 22:00:05 +00:00
Gerald Combs 093563b667 Sync GTK+ and Qt progress timer logic.
The GTK+ update_progress_dlg() initially forces a UI update. Do so in
the Qt version as well.

Change-Id: I05d9e61a0d0e4e05af448039bbb81785ac00908c
Reviewed-on: https://code.wireshark.org/review/10568
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-09-18 19:51:44 +00:00
Pascal Quantin cdc1b1ef8e Qt: flush visible rows before trying to select one
Otherwise you end up with a 'End of capture exceeded' popup when calling rescan_packets() with only a few packets in the capture

Change-Id: Idb387ce95f1d22b934e735c350ea0c117763d89a
Reviewed-on: https://code.wireshark.org/review/10567
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-18 17:46:16 +00:00
Alexis La Goutte 0deb7f880e main_toolbar (GTK): Fix no previous prototype for ‘plugin_if_maintoolbar_goto_frame’ [-Wmissing-prototypes]
Change-Id: Ibb58694e730389b1e8ef3790595ed16d8699d37c
Reviewed-on: https://code.wireshark.org/review/10563
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-09-18 10:46:09 +00:00
Jeff Morriss 7e17b58d46 When we're updating the progress bar, ask that it be updated (redrawn) too.
At least on Linux/X11 with Qt5 this appears to be necessary so the progress
bar updates more than once every 2 seconds or so (when loading a large file).

Change-Id: I7eea9c0d97d24bc14ad75f082a3531dcf1a3b6ae
Reviewed-on: https://code.wireshark.org/review/10559
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-18 02:37:10 +00:00
Gerald Combs 72f3b9f74c Fix some signal → slot mismatches.
Update some signal definitions to match gb4e972b.

Bug: 11524
Change-Id: I0d98a4e83c791221962943c3dec8f0d4296d3027
Reviewed-on: https://code.wireshark.org/review/10557
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-09-17 23:36:16 +00:00
Gerald Combs 43b77aeebf Qt: Add an event processing timer.
When updating the progress dialog (which happens each time we read a
packet) the GTK+ UI processes application events every 100ms. Do the
same in the Qt UI.

Ping-Bug: 11515
Change-Id: Ic53eade05c0b82bf436c08618f28506c5fcdbc94
Reviewed-on: https://code.wireshark.org/review/10554
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-09-17 20:25:14 +00:00
Gerald Combs ae4d99b670 Packet list speedups.
beginInsertRows + endInsertRows is expensive. Instead of calling them
each time we add a packet to the list, queue up a list of visible packets
and flush it during the next UI update.

Assume that none of our column data has newlines. Enable
uniformRowHeights and only disable it when we need to. Note that this
requires further work.

Ping-Bug: 11515
Ping-Bug: 10924

Change-Id: Ifbdd2964b174247a4745d4889ebda5bf3b886ba4
Reviewed-on: https://code.wireshark.org/review/10553
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-09-17 19:37:48 +00:00
Alexis La Goutte 5f695d217a MTP3 Summary: fix no previous prototype for ‘register_tap_listener_gtk_mtp3_summary’ [-Wmissing-prototypes]
Change-Id: Iee26ba47802f3091f7e7264d2d7ce4b5e22db53c
Reviewed-on: https://code.wireshark.org/review/10536
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-15 12:59:06 +00:00
Michael Mann 51360b5380 Eliminate proto_tree_add_text from odds and ends.
A few calls in the epan directory and comments in the ui directory

Change-Id: Ia8f8830ac6909ab94d3a03283bfd173456bc9718
Reviewed-on: https://code.wireshark.org/review/10492
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-09-15 02:20:13 +00:00
Pascal Quantin e5f0cb927c Qt: align display of packets statistics in status bar with GTK UI
Bug: 11517
Change-Id: Ie47b7eebe58e8a9ac485ddd04fe074c94a0c6741
Reviewed-on: https://code.wireshark.org/review/10531
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: Christopher Maynard <Christopher.Maynard@gtech.com>
2015-09-14 17:48:48 +00:00
Pascal Quantin 908efe0a32 Qt: add displayed packets percentage to status bar
Bug: 11517
Change-Id: Ic8195e4bc3874eb527ce9afa850ab8cba74ddcfe
Reviewed-on: https://code.wireshark.org/review/10512
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-14 08:30:15 +00:00
Pascal Quantin 0a86b65a7c Qt: remove unused variables in IAX2 analysis code
Spotted by Coverity

Change-Id: I4877eb282890415fbd24cbc6e48ababa46109b12
Reviewed-on: https://code.wireshark.org/review/10510
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-09-13 19:26:50 +00:00
Pascal Quantin f2c5dee77c Qt: refresh column content after editing it
Also save the new value in preferences

Change-Id: Ie1a942669ebc2824c999621ecd948425b3b49574
Reviewed-on: https://code.wireshark.org/review/10500
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-09-13 18:54:12 +00:00
Gerald Combs 565a953f24 Don't invalidate the column cache when we filter packets.
Limit PacketListModel::recreateVisibleRows to checking for packets that
passed the display filter. Remove the call to resetColumns, which
invalidates the column string cache.

Call PacketListModel::resetColumns from PacketList::columnsChanged.
Along with invalidating the column string cache, this triggers a widget
update which means we shouldn't need to call recreateVisibleRows or
redrawVisiblePackets. Remove them.

Change-Id: Ic25f139e2c2f8cdebb2a868ccda7eb4127a3013c
Ping-Bug: 11324
Ping-Bug: 11514
Reviewed-on: https://code.wireshark.org/review/10491
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-13 18:52:19 +00:00
Alexis La Goutte fccfbf254e Stock icon (Qt): Missing break in switch (CID 1323928)
Add a "// Fall through" comment to squelch a Coverity warning. Hopefully
the regex described at

http://security.coverity.com/blog/2013/Sep/gimme-a-break.html

is case-insensitive.

Change-Id: I10be63a77ed1e5e0c8000bad0c1b8d08db8b0951
Reviewed-on: https://code.wireshark.org/review/10509
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-13 17:51:59 +00:00
Alexis La Goutte 7f191c721a help_url: fix typo found by Coverity (CID 1323927) and Clang analyzer
Change-Id: I26fda5d118d55f26f449ed858e9e57d477709bcb
Reviewed-on: https://code.wireshark.org/review/10508
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-13 15:52:13 +00:00
Gerald Combs 66e9115161 [Automatic update for 2015-09-13]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I0c7a8d1ad41d5509c35f110aa50b7b86aa5a73c4
Reviewed-on: https://code.wireshark.org/review/10514
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-13 15:15:19 +00:00
Peter Wu 33570f81b5 Fix misaligned read and buffer overrun
Ethernet addresses are only 6 bytes in size, reading it as a 64-bit
integer is invalid. Use unsigned 8-bit integers instead.

Caught by UBSAN and Address Sanitizer. Trigger via the Statistics menu
Resolved Addresses (Qt) or Show address resolution (GTK).

Change-Id: I628ff7cce0ea4f4e378c7968cd79a0ae34cdd20b
Reviewed-on: https://code.wireshark.org/review/10443
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-09-13 02:38:19 +00:00
Gerald Combs b4e972b729 Fix a bunch of leaks found by Valgrind.
Change-Id: I8862ed15d354aee487bacd80ab5fb4918423287e
Reviewed-on: https://code.wireshark.org/review/10487
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-09-11 20:37:09 +00:00
Gerald Combs 2931dc118b Try using GStringChunks in PacketListRecord.
This saves a fair amount of memory in tests here. Loading a large
capture file and sorting on a custom column (tcp.window_size) uses 676
MB before the change and 634 after.

Add notes about possble further improvements:

Roll our own replacement for GStringChunks using wmem_tree.

Have PacketListRecord::columnString return a const char * instead of a
const QByteArray.

Change-Id: Icb36194f5ad290828d7106ccc3bf494d07d76d08
Reviewed-on: https://code.wireshark.org/review/10476
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-11 17:34:53 +00:00
Gerald Combs c088135d5b Make sure we delete our PacketListRecords.
This fixes a serious (and obvious) memory leak in the packet list.

Change-Id: Ie3d21e1a1d09a3481c9649954c25b9ae73b8e32a
Reviewed-on: https://code.wireshark.org/review/10485
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-11 17:00:04 +00:00
Gerald Combs 12176f45d9 Export captured packets correctly.
Make sure we set and unset the "process_filtered" field of our range in
PacketRangeGroupBox. Otherwise we only export displayed packets. Make
sure we set "remove_ignored" as well.

Ignore the cf_cb_file_export_specified_packets_* callbacks in
CaptureFile so that we don't print spurious warnings.

Bug: 11473
Bug: 11428
Change-Id: Ica551addd3af2de79f7cd47a2cc361043d2982e5
Reviewed-on: https://code.wireshark.org/review/10477
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-09-11 15:27:38 +00:00
Gerald Combs b55ae49ba1 Make StockIconToolButton independent.
A recent set of changes replaced the "dfilter_erase_" images with an
"x-filter-clear" stock icon set.

Move StockIconToolButton to its own compilation unit. Use it in
CaptureFilterEdit and ProgressFrame to load the "x-filter-clear" icon.

Bug: 11516
Change-Id: I5d5864d089fb56827d130d493d53e7de6a7c03b5
Reviewed-on: https://code.wireshark.org/review/10475
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-09-11 15:27:21 +00:00
Peter Wu fd342f7f73 qt: Fix crash when stopping an empty live capture
When the capture process has not yet received any packets (not even the
libpcap header), Wireshark-Qt would crash because no valid capture file
was found. Reproducer:

    ssh otherhost sleep 10000 | wireshark -k -i -

GTK displays "Waiting for capture input data" in the status bar until
the capture file format is determined. After this patch, both versions
will just display an "Interrupted system call" message.

Change-Id: I146f00c0f4fcab04cddcd4f29b56e97b807a9c40
Reviewed-on: https://code.wireshark.org/review/10388
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
2015-09-11 13:22:45 +00:00
Dario Lombardo 942eb739f4 lte/ui: fix 'time' var name.
As pointed out by checkAPI.pl.

Change-Id: Ibab9b2720f3ef666b06b2b61ffc54aa23cbb01fc
Reviewed-on: https://code.wireshark.org/review/10469
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-11 06:15:59 +00:00
Jeffrey Smith a2fec21886 Check if -fPIC is needed for Qt5 code to compile
On many systems, Qt5 requires that code compiled against it must compile
with -fPIC.  The preferred place to determine whether this is necessary
is at configure time.  This change adds the auto-tool code to make that
happen and removes the hack put in place as an interim solution.

Bug: 11230
Change-Id: I6e583c67bb67d168a30c0af05a8cd0a070522ba0
Reviewed-on: https://code.wireshark.org/review/10281
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-09-10 13:00:34 +00:00
Gerald Combs cd9f163eb9 Add the IAX2 Analysis dialog.
Copied from the RTP Analysis dialog, just like the GTK+ version.

Change-Id: I111020bc4073a3a3ba583bdace51a91ee5fef300
Reviewed-on: https://code.wireshark.org/review/10447
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-09-09 21:57:08 +00:00
Gerald Combs 2ec5e5484e Add the Telephony→LTE menu.
Add an empty (for now) Telephony→LTE menu ahead of upcoming changes.

Change-Id: Ic6686b653d2fa51f1eb6854ab0952f92d679bccc
Reviewed-on: https://code.wireshark.org/review/10452
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-09-09 20:13:14 +00:00
Ben Fox-Moore b6be1c2197 Fix Flow Graph never using Standard Addresses when requested
Bug: 10966
Change-Id: I5ccc78b8c39f623a4e157572d1caa228c9bb3713
Reviewed-on: https://code.wireshark.org/review/10450
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-09 20:04:31 +00:00
Dario Lombardo ecc62d8706 codecs/gtk: fix int to size_t
Change-Id: I8f467f09375c8227c4b70aef47ff3a590a0c00d7
Reviewed-on: https://code.wireshark.org/review/10413
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-09 17:53:08 +00:00
Roland Knall 61ea02b145 PluginIF: Fix GTK PluginIF interface
- Move the apply-filter code to main_menubar,
   because there already the code of the preference
   pop-ups is handled

 - Fix the apply-filter callback, which was not working
   at all

Change-Id: I25d5a161d8b78695c15b3100653be36786129408
Reviewed-on: https://code.wireshark.org/review/10444
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-09 04:12:11 +00:00
Roland Knall 6f1c9fd432 PluginIF: Parent menu and goto frame
The developer may provide a given menu as parent menu for the
 sub menu. If the menu does not exist, the main menu will be used.

 Has been implemented for Qt as well as GTK.

Change-Id: I3f26684862fd0b08f59eeb4d6f4a24ce7dc3d428
Reviewed-on: https://code.wireshark.org/review/9939
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-09-08 11:03:35 +00:00
Stig Bjørlykke 47f5d41acd Qt: Fixed a resource leak in getFilterFromRowAndColumn
Found by coverity CID 1314608 and Apple Instruments.

Change-Id: I264ce335bd8985946a097bb8f99f7c41c0eb027d
Reviewed-on: https://code.wireshark.org/review/10378
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-08 06:33:55 +00:00
Stig Bjørlykke e438374990 Qt: Fixed a resource leak in updateSelectionStatus
Avoid passing a reference to a allocated QString, which will
never be deleted.

This fixes a 16 Bytes leak each time an element is selected or
deselected in the packet tree.

Change-Id: If0d7482bf505fda8802dd58e8d1841b7da6b6294
Reviewed-on: https://code.wireshark.org/review/10393
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-08 06:32:27 +00:00
Stig Bjørlykke 91d863cc16 Qt: Fix use-after-free pattern
This fixes crashes due to use of deallocated memory in:
- Export Packet Dissections
- Merge Capture Files
- Edit Packet Comment

Change-Id: I3dab8c0735eb5e642d6a4580d20bc3c81cf1345b
Reviewed-on: https://code.wireshark.org/review/10392
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-08 06:30:02 +00:00
Gerald Combs 4496fdeef8 Enable the display filter arrow tooltip.
Add an event handler which ensures that the tooltip displays only when
we're over the arrow subcontrol.

Change-Id: I14d308344d9dd4d4ffbc7b0fe568c95f21f9a641
Reviewed-on: https://code.wireshark.org/review/10417
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-09-07 19:55:17 +00:00
Gerald Combs 912921b10b Add a URL for the tooltip bug.
It should be fixed in Qt 5.5.1.

Change-Id: I32fa11accdd6bea953341dd6b4914686cacda98e
Reviewed-on: https://code.wireshark.org/review/10419
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-07 17:11:31 +00:00
Gerald Combs 393c4bc7f8 Re-enable display filter editor tooltips.
Enforce correct "leave" behavior using a timer.

Change-Id: I59b8fd08c27fd463363bdda090fb9c24f664d9eb
Reviewed-on: https://code.wireshark.org/review/10408
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-09-07 15:28:55 +00:00
Gerald Combs 84a3c85be4 Disable display filter tooltips for now.
Comment out the setToolTip call in DisplayFilterCombo. The function
applies to the entire control, but the text only makes sense for the
drop-down arrow.

Remove the tooltip for the clear button in DisplayFilterEdit. If the
purpose of the "X" symbol isn't obvious then we aren't doing our job
properly.

Comment out the other setToolTip calls in DisplayFilterEdit for now
since they interfere with leaveEvents. Add a note about a possible
workaround.

Change-Id: I055a30b6a5b5e07cebf1fa36e217654d390d34d0
Reviewed-on: https://code.wireshark.org/review/10405
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-06 19:08:01 +00:00
Gerald Combs 628f65a984 Keep focus rects from showing through the welcome screen.
Change-Id: I5785890c70f3a3f6f4ccb0c7b609a19e5d2b88c9
Reviewed-on: https://code.wireshark.org/review/10406
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-06 19:01:57 +00:00
Gerald Combs 4cb37376e7 [Automatic update for 2015-09-06]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: If1cc31f1cd036c536a8a8bb9d9094bdb7c9f6f07
Reviewed-on: https://code.wireshark.org/review/10403
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-06 15:10:57 +00:00
Guy Harris 94f657f447 Another removed display filter-related image.
Change-Id: I3a49a8f1d13b9ba54ca71eea855f36a7c1aaec1c
Reviewed-on: https://code.wireshark.org/review/10397
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-06 03:08:20 +00:00
Gerald Combs 0e9389bb47 Display filter edit updates.
Have the bookmark button operate on saved display filters, similar to
the "Filter:" button in the GTK+ UI. Expose the saved display filter
list via a popup menu.

Update the display filter icons. Make the "Apply" button wider. Remove
the old icon assets.

Add a StockIconToolButton class along with note explaining why it's
necessary.

Rename the "Filter Bookmarks" preference to "Filter Shortcuts".
Suggestion for a better name are welcome.

Change-Id: I0082d3f01b017253fa75e51cbff9beb17c41a209
Reviewed-on: https://code.wireshark.org/review/10390
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-09-06 01:43:21 +00:00
Stig Bjørlykke 4f5937a18b Qt: Fixed a QString memory leak
Change-Id: I93f439b7eb8d915f23ee456205d202d599f8cd99
Reviewed-on: https://code.wireshark.org/review/10394
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-05 18:32:06 +00:00
Pascal Quantin 90062a32b7 Qt: fix applying UINT preferences in base 8 or 16
While we are at it:
- fix a crash when clicking on the cancel button from the preference modification context menu
- redissect the packet list when modifying a preference from the context menu

Bug: 11502
Change-Id: I7269f7093f1f38c46ec7744fd619ab67f31eb4e7
Reviewed-on: https://code.wireshark.org/review/10386
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-09-05 12:55:39 +00:00
Pascal Quantin f189cb8174 Qt: fix Decode As dialog when using octal or hexadecimal types
Change-Id: Ie022573f6a7b11a0f74abfa47b2667f5b2844cc3
Reviewed-on: https://code.wireshark.org/review/10387
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-04 22:12:20 +00:00
Pascal Quantin 9defa0fc18 GTK/Qt: fix crash when closing SIP Flows dialog
Bug: 11500
Change-Id: Ifc3826c9743b0fab338cc85c9210231320feddf2
Reviewed-on: https://code.wireshark.org/review/10384
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-09-04 18:24:27 +00:00
Pascal Quantin f7a370086d Qt: fix crash when selecting Telephony > VoIP Calls or SIP Flows menu entries
Bug: 11499
Change-Id: I8785907013c38c5ac6f9624afdfbf8e02f2bf68d
Reviewed-on: https://code.wireshark.org/review/10383
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-04 18:19:59 +00:00
Stig Bjørlykke 0a68c9d257 Qt: Destruct FunnelStringDialog when done.
To be able to close all open dialogs (emit a close signal) from a C function
this change introduces a FunnelStringDialogHelper class to handle this.

Change-Id: Id50e949e5e2b56401ce9228f8fa9ba17dddbd7fb
Reviewed-on: https://code.wireshark.org/review/10372
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-04 17:33:46 +00:00
Gerald Combs a69a515f28 Add a version check to our splitter styling.
According to https://bugreports.qt.io/browse/QTBUG-43425 the OS X
splitter rendering issue will be fixed in Qt 5.6.

Change-Id: I99e000d96f8f61cd654be3808fd79577bac11d88
Reviewed-on: https://code.wireshark.org/review/10381
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-04 16:30:15 +00:00
Alexis La Goutte ad8f8597ef expert_comp_table (GTK): fix will never be executed [-Wunreachable-code]
use #if 0 /#endif for disable code

Found by Clang 3.7

Change-Id: Ie1b6b0936df0ae422baa9b3bb9692f136eb177b1
Reviewed-on: https://code.wireshark.org/review/10380
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: Anders Broman <a.broman58@gmail.com>
2015-09-04 14:36:49 +00:00
Gerald Combs e4d9ce18d8 Move IAX2 analysis to the ui directory.
Rename ui/gtk/iax2_analysis.h to ui/tap-iax2-analysis.h. Move
iax2_packet_analyse to ui/tap-iax2-analysis.c.

Rename rtp_analysis.h to tap-rtp-analysis.h to match IAX2.

Change-Id: Ice7e9ad0d7bf62d631850089c880ec09a3e101dd
Reviewed-on: https://code.wireshark.org/review/10375
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-03 21:48:48 +00:00
Gerald Combs 759e618747 GTK packet list string chunk fixups.
Call g_string_chunk_clear when we clear the packet list. Allocate 1 MiB
chunks instead of 32 byte chunks. This doesn't do much in practice locally
but appears more correct according to the GStringChunk documentation
and source code.

Change-Id: I143b6e1b48d376ba826cb342ade71085a2d82d96
Reviewed-on: https://code.wireshark.org/review/10344
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-09-03 18:51:50 +00:00
Gerald Combs 0818347d1b Remove the GTK+ IAX2 analysis circuit check.
The IAX2 dissector stopped setting pinfo->circuit_id last October in
g3d359da. Remove the corresponding check from the IAX2 Analysis dialog,
otherwise it won't open.

Change-Id: I538fffb2ec9950c796d01e64db5890f4e9d22b64
Reviewed-on: https://code.wireshark.org/review/10373
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-03 16:57:45 +00:00
Guy Harris 32e785f813 The official #define for 32-bit and 64-bit Windows is _WIN32.
It's _WIN32, with a leading underscore, not WIN32.  See, for example:

    https://sourceforge.net/p/predef/wiki/OperatingSystems/

and

    https://msdn.microsoft.com/en-us/library/b0084kay.aspx

*Some* environments may also define WIN32, but we shouldn't depend on
that.

Replace all-caps "WIN32" referring to Windows in comments and other text
with "Windows" or "Win32".  (The two are pretty much equivalent, these
days; nobody much cares about Win16, not that we ever ran on it, and
64-bit Windows is just a 64-bitified Win32.)

Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70
Reviewed-on: https://code.wireshark.org/review/10367
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-09-02 22:59:10 +00:00
Gerald Combs db2fdfd7ef Fixup the main window tab order.
Make sure the packet list is directly after the display filter edit in
the main window tab order. When we press enter in the display filter
edit, go to the next child in the tab order.

Change-Id: If46e178365dbd59feb5985e9f8fa8b55d004d864
Reviewed-on: https://code.wireshark.org/review/10342
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-01 17:39:04 +00:00
AndersBroman a8682af919 [mtp3_summary_dialog] Unused parameter warning with MSVC
mtp3_summary_dialog.cpp(315) : warning C4100: 'edt'  : unreferenced formal para
mtp3_summary_dialog.cpp(314) : warning C4100: 'pinfo' -

Change-Id: Ia21e15ff6348f34bf8ae240f867f0ab2cade606a
Reviewed-on: https://code.wireshark.org/review/10340
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-01 07:58:08 +00:00
Gerald Combs 54d2ff1c3e Convert the WSP stats to generic stat API.
Add support for multiple tables to SimpleStatisticsDialog.

Change-Id: I843d901db092d2f2856d3d1a16f29f85fb41374b
Reviewed-on: https://code.wireshark.org/review/10339
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-09-01 01:01:32 +00:00
Gerald Combs 377d215e0f Convert the MTP3 stats to new "generic stat API".
Convert both the MTP3 statistics and summary. As with the GSM stats this
is mostly untested.

Change-Id: I7af8d5f21c8161dc95f7f2c710f32364b6f6a431
Reviewed-on: https://code.wireshark.org/review/10338
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-08-31 23:06:09 +00:00
Stig Bjørlykke 4e236e66c9 Qt/Lua: Call atclose when TextWindow closes
The close callback was never called because the destructor was never called.

Change-Id: I9f6204858bc5d5e48d0aedc90b0e242ab70e161c
Reviewed-on: https://code.wireshark.org/review/10321
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-31 18:06:02 +00:00
Gerald Combs 026812c391 Redraw timestamps when time display settings change.
As with g3bec655, we need to call columnsChanged (which invalidates
cached column strings) whenever any settings that generate those strings
change. Do so for the time display preferences in the View menu.

Bug: 11429
Change-Id: I71bf1cc0df2800902ecb7b734b8f12ebd85a4de5
Reviewed-on: https://code.wireshark.org/review/10331
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-08-31 16:44:45 +00:00
Gerald Combs 75b8457483 Add a Telephony→SCTP submenu.
Add the current SCTP actions to the telephony menu to match the GTK+ UI.

Change-Id: Ie7471bcbd1a82fe3f203d60f5ea8a72d923f34b9
Reviewed-on: https://code.wireshark.org/review/10332
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-31 16:36:12 +00:00
Gerald Combs 3bec655b97 Redraw the packet list when name resolution changes.
Call columnsChanged (which invalidates cached column strings) when we
change our name resolution preferences from the View menu.

Remove the last sorted column tracking from gf19a173 while we're here
(it didn't work properly).

Bug: 11468
Change-Id: I7fea58d702b283028235d023f27ab0336d8643a4
Reviewed-on: https://code.wireshark.org/review/10301
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-08-31 15:21:43 +00:00
Gerald Combs 99e16ce820 [Automatic update for 2015-08-30]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I37400bf1fac15fcd5f2946913b96184b1828f091
Reviewed-on: https://code.wireshark.org/review/10317
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-30 15:10:10 +00:00
Jim Young 0badc8c38e Insure Qt Capture preferences dialog displays default capture device (if any)
In CapturePreferencesFrame::updateWidgets() save and restore the default
capture device name because the first call (and only the first call) in
the loop with addItem() triggers on_defaultInterfaceComboBox_editTextChanged()
which unconditionally sets the default name as the first non-hidden device.

Bug: 10965
Change-Id: Ie93f84010a19e8144efa46ce889fb9064979e0e9
Reviewed-on: https://code.wireshark.org/review/9584
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: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-29 14:06:24 +00:00
Gerald Combs e18e400e68 Fix a GHashTable assertion in DecodeAsDialog.
Make sure we don't call g_hash_table_removed from g_hash_table_foreach,
which generates an assertion error.

Bug: 11426
Change-Id: I00283c97b0fc63551b901c0fd526b60c0fb80ace
Reviewed-on: https://code.wireshark.org/review/10296
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-08-29 01:20:22 +00:00
Stig Bjørlykke 15c9923d64 Qt: Fix use-after-free pattern
Change-Id: I7f6d9316234c1ccfec1ec5b5c3675b3237f22eda
Reviewed-on: https://code.wireshark.org/review/10294
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-28 22:57:00 +00:00
Gerald Combs 579365ef7e Disable most of the main window while we're tapping.
Our event loop is nested when we read packets. Disable the main window's
central widget while we're retapping packets in order to minimize the
chance of ending up in an unexpected state while analyzing packets.

Note that we will probably want to disable more of the main window and
do so in other parts of the code.

Change-Id: I68a00fe43d2ac9e7c0749751abd1c10c47155b3b
Reviewed-on: https://code.wireshark.org/review/10293
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-08-28 22:55:34 +00:00
Gerald Combs aa100e0726 Don't show a progress frame if our file was closed.
Change-Id: Ie363f6764f4e8b2b5c476b85f7ddb0233a127f6e
Reviewed-on: https://code.wireshark.org/review/10290
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-08-28 21:16:14 +00:00
Gerald Combs c1c6132c0d Don't dissect twice from TapParameterDialog.
When the user applies a display filter in TapParameterDialog we're about
to start tapping. We need to set the display filter in the main window
but we shouldn't apply it.

Change-Id: I08bed5c7f470f1dbf32817a7d999f09d2c52f168
Reviewed-on: https://code.wireshark.org/review/10287
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-08-28 21:15:54 +00:00
Pascal Quantin c04d54fbd4 Preparation Host Flows: make ICMP(v6) code and type retrieval more robust
Do not retrieve type and code base on the info column content.
Instead store type and code in pinfo structure and retrieve them in sequence analysis tap.

Change-Id: I71cd505d7faf713c2372731495d47b45928a41f8
Reviewed-on: https://code.wireshark.org/review/10280
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Artho <pascalartho@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-28 18:54:34 +00:00
Gerald Combs f19a173a84 Speed up column sorting.
The GTK+ UI sequentially dissects and caches column strings for all rows
before sorting a column. Do the same in the Qt UI, which can improve
performance considerably.

Don't colorize packets when sorting in the Qt UI unless it's necessary.

When sorting in the Qt UI, let the user cancel the initial packet
dissection.  Note that we'll need to replace std::sort in order to
cancel out of sorting.

Use a pre-allocated and pre-compiled GRexex when we prime columns. Note
that we probably shouldn't parse a regular expression there.

Cache the last result of proto_registrar_get_byname.

Note performance hot spots elsewhere in the code.

To do:

GeoIP in packet-ip.c is pretty slow.

Bug: 11467
Change-Id: Ib34038fee08ef0319261faeffc4eca01e52f4bd3
Reviewed-on: https://code.wireshark.org/review/10275
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-08-28 02:54:20 +00:00
Gerald Combs 01fb470acd More retapping fixups.
Disable the main file close and reload actions while we're retapping,
otherwise many of our dialogs will crash.

Disable the TapParameterDialog filter entry while we're retapping. This
keeps us from enabling the "Apply" button when we shouldn't.

Don't prematurely disconnect our signals in WiresharkDialog.

Change-Id: Iaf507eb4503b9c296766f109f2b8c71343263982
Reviewed-on: https://code.wireshark.org/review/10274
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-08-27 21:27:32 +00:00
Stig Bjørlykke 6151946ffe Qt: Fixed some memory leakages
Change-Id: I5bccf706001f9ff41197ed13b1be5a7404ca594f
Reviewed-on: https://code.wireshark.org/review/10251
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-27 09:14:29 +00:00
Stig Bjørlykke efba977235 Qt: Fixed some memory leakages
Change-Id: Ie8c9b7f8c9203acb5aec00d5553b911e0299f53c
Reviewed-on: https://code.wireshark.org/review/10253
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-27 09:14:05 +00:00
Stig Bjørlykke 8384a5bbb7 Qt: Fixed some memory leakages
And changed strdup -> g_strdup

Change-Id: I62de106462259194738d633f16297eb1210f8ccf
Reviewed-on: https://code.wireshark.org/review/10259
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-27 09:13:34 +00:00
Gerald Combs 374439daa1 Don't emit app signals from dialogs.
Emitting PacketDissectionChanged from a dialog on can render the main
window unusable on OS X. A workaround for this was added to the
preferences dialog in g8fc2327. Generalize the workaround and use it
elsewhere.

Fix the "Enabled Protocols" action name while we're here.

Bug: 11361
Bug: 11448
Change-Id: I89e98daaaedc877d3b13b0d33b6f3be033e323d7
Reviewed-on: https://code.wireshark.org/review/10271
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-08-26 22:02:19 +00:00
Stig Bjørlykke 7b35992b7a Reload IO Graph Y fields when reload Lua plugins
Change-Id: Ic3b9096c3c25839dd7d7bfe7af71eeb5b0bd745d
Reviewed-on: https://code.wireshark.org/review/10239
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-26 18:03:39 +00:00
Gerald Combs e1c807c9d1 Add missing callback support.
Change-Id: I90838ccb701c93b11b216d0eb9973cbac8627129
Reviewed-on: https://code.wireshark.org/review/10270
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-08-26 17:22:44 +00:00
Gerald Combs e234ce8804 Rework tapping in Qt dialogs.
Add cf_cb_file_retap_started and cf_cb_file_retap_finished to file.[ch].
Add their associated signals to CaptureFile.

Add registerTapListener and removeTapListeners to WiresharkDialog, which
collect and automatically remove tap listeners. Add beginRetapPackets
and endRetapPackets, which can be used to wrap critical sections so that
we don't delete ourselves while tapping. Don't cancel tapping on close
in WiresharkDialog.

Use beginRetapPackets and endRetapPackets in WiresharkDialog and
FollowStreamDialog. We will likely need to add them elsewhere.

Update comments.

Change-Id: I1788a6ade0817c31aa3419216df96be5e36b2178
Reviewed-on: https://code.wireshark.org/review/10261
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-08-26 15:04:28 +00:00
Gerald Combs f7e9a795a8 Add per-dialog progress frames.
Add ProgressFame::addToButtonBox, which violates the UX guidelines on
every platform we support by inserting a ProgressFrame into a
QDialogButtonBox.

Call addToButtonBox in the constructors of a bunch of dialogs.

Change-Id: I33ac5fd7a976ee6e0527de569a5c4b528980dae1
Reviewed-on: https://code.wireshark.org/review/10242
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-08-26 14:47:07 +00:00
Stig Bjørlykke c18d2f8193 Qt SCTP: Changed prohibited APIs
strcpy -> g_strlcpy
sprintf ->g_snprintf

Also initialize some temp variables.

Change-Id: I4d2fa1b0325c6e59aa13ebeb0d9c25d5ff7c4d9c
Reviewed-on: https://code.wireshark.org/review/10252
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-26 07:01:49 +00:00
Alexis La Goutte cc15b11883 Multicast Stream: Fix Dereference of null pointer found by Clang analyzer
Change-Id: I419f49132f8b0853c17b2fd1b4e9869ef3fafd13
Reviewed-on: https://code.wireshark.org/review/10224
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-25 10:57:03 +00:00
Pascal Quantin e710f248bc win32: update the list of NdisMedium and NdisPhysicalMedium defines used by GTK UI
Use hardcoded values instead of enum values so as to avoid any dependency on newest Microsoft SDK.
Add WinPcap specific NdisMediumXXX values.
Also rename "Medium in use" to "Media in use" to better match the OID query name.

Change-Id: I7ccc2763364b65df77927cbf1c265195fc295642
Reviewed-on: https://code.wireshark.org/review/10225
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Yang Luo <hsluoyz@sohu.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-25 07:25:37 +00:00
Stig Bjørlykke 18747939fd Remove unused signal
Change-Id: Ic2d4057ee95849bc1b026663dae1430432ad9707
Reviewed-on: https://code.wireshark.org/review/10241
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24 21:00:23 +00:00
Stig Bjørlykke 99dab8214a Use signal to close packet dialogs
Change-Id: I312f8de8de933e576b60d2b158e4c4f2d1147ef1
Reviewed-on: https://code.wireshark.org/review/10238
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24 20:21:48 +00:00
Alexis La Goutte 75d9167230 Multicast Statistics (Qt Dialog): Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ie2802293576bf9edb28bccf7d464b5e687185096
Reviewed-on: https://code.wireshark.org/review/10223
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-24 18:05:48 +00:00
Stig Bjørlykke 7176958357 Close packet dialogs when reload Lua plugins.
We could keep the dialogs with the current content if postponing
proto_free_deregistered_fields() until all dialogs are closed.
This would give a feature where the user is able to compare packets
before and after a reload.

Or we could add functions in PacketDialog to reload the packet details
in all open dialogs.  This would give a feature to always have a
updated dialog for all interesting packets.

Change-Id: I805352b65844eafafafc54cd61f08b4605416e64
Reviewed-on: https://code.wireshark.org/review/10201
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24 07:43:22 +00:00
Stig Bjørlykke 25ec198dd4 Disable streamNumberSpinBox while reloading capture
When changing stream in TCPStreamDialog it should not be possible
to change stream again until the capture has reloaded, because
this will give a crash when doing graph_segment_list_free() or
graph_segment_list_get() while already doing this.

Also disable mouseMove event (showing packet details) while reloading,
as this also will give a crash.

We should consider also having a reload progress bar in the
TCPStreamDialog to indicate that this is happening when having
large capture files, as the main window may not be visible.

Change-Id: I622f9e0de8205bc1fd18101dc03100079d7a2d06
Reviewed-on: https://code.wireshark.org/review/10159
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24 07:43:04 +00:00
Stig Bjørlykke c6aeaadcce Disable apply button while adding the filter
Pressing multiple apply while reloading the capture file will
give a crash.

Change-Id: I3587b9ab6b6b7f1437f3a7becb8c35277bb5c62c
Reviewed-on: https://code.wireshark.org/review/10161
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24 06:54:33 +00:00
Gerald Combs 89ff46e630 [Automatic update for 2015-08-23]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I3726aa80e1e4d23301500fca326ae2b952bf38f6
Reviewed-on: https://code.wireshark.org/review/10208
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-23 15:06:52 +00:00
João Valverde 15ed3351bf [CLI, GTK] comparestat: Fix typos, output format, argument parsing
Optional filter argument wasn't correctly parsed.

Change-Id: Ic0418fa866e1a00880b4e41bb28267a155a71aa5
Reviewed-on: https://code.wireshark.org/review/10088
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-08-22 14:46:14 +00:00
João Valverde 9c331f73b5 [GTK] Fix crash in comparestat.c
Selecting a row in the statistics table causes a Glib assertion failure.

GLib:ERROR:ghash.c:373:g_hash_table_lookup_node: assertion failed: (hash_table->ref_count > 0)

When the comparestat_draw() function is called, the cs->ip_id_set hash table
is created and then immediately destroyed, but the hash table lookup
to cs->ip_id_set in new_tree_view_selection_changed() can happen anytime
the user clicks on a table row.

Bug: 11098
Change-Id: I6c7a39c947ca11327c3fc3ab0d4caa735798d142
Reviewed-on: https://code.wireshark.org/review/10096
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-08-22 14:34:31 +00:00
Stig Bjørlykke b0a8fa59f8 Initialize extcap for pipes
Change-Id: Ia731f281ee9af171c759d7f6f7c614c350cbb4e7
Reviewed-on: https://code.wireshark.org/review/10178
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: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-22 11:55:21 +00:00
Gerald Combs ee80be6dac Add the display filter macros dialog.
Add some missing functionality to UatDialog.

Remove what appears to be unused dfilter macro code.

Change-Id: I8a8d6358523f24d5ddfe953d7741fe9af25d98eb
Reviewed-on: https://code.wireshark.org/review/10187
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-08-22 01:51:04 +00:00
Gerald Combs 74177d90d3 Statistics dialog fixups.
Fix the "retap on show" behavior in TapParameterDialog. It was filling
in the tree when it shouldn't have.

Set the capture stop flag when WiresharkDialog closes.

Change-Id: I5e85f11cab32e8b958deabb58186a855b5fcaa84
Reviewed-on: https://code.wireshark.org/review/10186
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-08-22 01:29:06 +00:00
Gerald Combs a66a95c7ad Add packet comments to the properties dialog.
This pulls in missing functionality from the comment summary dialog.

Change-Id: Ib417896a6e8f2b2f903520b26193c249677bbb83
Reviewed-on: https://code.wireshark.org/review/10185
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-08-21 23:12:35 +00:00
Gerald Combs dd2a2d432a Multicast and wireless lan statistics fixups.
Make sure "-z multicast,stat[,filter]" and "-z wlan,stat[,filter]" work.

Add some missing "-z" items to the man page.

Try to fix some MSVC++ warnings.

Change-Id: Ie18e5355d595e351f000f14d82781dcdf33141c3
Reviewed-on: https://code.wireshark.org/review/10184
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-08-21 17:13:11 +00:00
AndersBroman 8d5ac86e94 Try to fix: wlan_statistics_dialog.cpp:466:1: error: unused parameter ‘filter’ [-Werror=unused-parameter]
Change-Id: Ib9b2fe245b126f9413dbdcced94c61eacf4d1c5d
Reviewed-on: https://code.wireshark.org/review/10177
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 08:46:27 +00:00
Pascal Artho a5fe54d180 Preparation Host Flows: Syntax Line Edit (allow longer filter text)
The "Syntax Line Edit" is based on "QLineEdit". By default, the maximum
permitted length of a QLineEdit text is 32767 (16 bits).

As the "Host Flows" extension uses the Wireshark filter syntax to filter
the data, the filter can be become large. To avoid errors, I increased
the maximum permitted length value to the maximum of quint32.

Change-Id: I756efa76e1fc84449caef8fea368e6e38e776235
Reviewed-on: https://code.wireshark.org/review/10099
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-08-21 05:01:44 +00:00
Alexis La Goutte 0310e5a99a gsm map summary (GTK): fix no previous prototype for ‘gsm_map_stat_gtk_sum_cb’ [-Wmissing-prototypes]
Change-Id: Ic97434112bc71202354004626ba51e1a22c39abf
Reviewed-on: https://code.wireshark.org/review/10165
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 04:59:44 +00:00
Hadriel Kaplan fab0e59c70 Fix memory leaks of dumper SHB and IDB infos
Change-Id: I6b81d3e853d503c6a81f9793957b48ab34c6808c
Reviewed-on: https://code.wireshark.org/review/10156
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-21 04:55:20 +00:00
Alexis La Goutte a70f591582 proto_dlg: fix no previous prototype for ‘heur_*_all_cb’ [-Wmissing-prototypes]
Change-Id: I330ec2cee965f8cc3128c4a7bf794e52581ac290
Reviewed-on: https://code.wireshark.org/review/10166
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-08-21 03:21:33 +00:00
Guy Harris 56d131c4d1 There is no wlan_statistics_dialog.ui.
Change-Id: Ibedb3904cbab88ebae3bc9ec1588263af933dfc1
Reviewed-on: https://code.wireshark.org/review/10172
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-21 00:08:56 +00:00
Gerald Combs 2ed3d91b45 Add the WLAN statistics dialog.
Instead of splitting the stats into two lists as with the GTK+ UI, add
everything to an expandable tree. This allows viewing nodes on more than
one network.

Rename the top-level Bluetooth menu item to Wireless and put the WLAN
stats dialog there.

The Qt UI matches SSIDs (WlanNetworkTreeWidgetItem::isMatch) a bit
differently than the GTK+ UI. Try to make the logic as plain as possible
since we'll likely have to update it in the future.

The addition of a custom BSSID address types means that we can't assume
that everything is AT_ETHER. Add routines for checking for broadcast
BSSIDs and comparing only the data portions of addresses.

Move PercentBarDelegate into its own module. Use it in
WlanStatisticsDialog.

Change-Id: Ie4214eb00671a890871380c4a07213ebfb7585c6
Reviewed-on: https://code.wireshark.org/review/10171
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-20 23:12:37 +00:00
Alexis La Goutte 648fe94288 Translations: fix typo
coversation => conversation

Found by s3erios (Ukrainian translator)

Change-Id: Iaecb4e139d049c212956fa8567ee480d2f2aa0d2
Reviewed-on: https://code.wireshark.org/review/10152
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 21:31:33 +00:00
Gerald Combs e67098c5d0 Squelch recent display filter warnings.
Try to keep the main display filter editor from emitting warnings when
we populate the recent item list.

Change-Id: Ib0c150093e03d4d2ca2ac6cd72c0e37d041fe98b
Ping-Bug: 11438
Reviewed-on: https://code.wireshark.org/review/10157
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-20 19:28:23 +00:00
Gerald Combs 36a74cb13a Tap parameter and stats dialog fixups.
If we run into an error when trying to register a tap listener, return
instead of tapping packets. This should fix some (but likely not all)
double frees found by Stig. For now close each statistics dialog if we
find an error. Note that we might want to keep them open instead.

Add checks and cleanups to some of the stats table free routines.

Call fillTree once in TapParameterDialog's constructor instead of each
time it's shown. Make fillTree a slot which lets us use a delay timer so
that the dialog is visible when we retap packets.

Change-Id: Id49f2f2a99bc8e5b1d32990024986b3c8b1abe24
Reviewed-on: https://code.wireshark.org/review/10153
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-20 18:07:02 +00:00
Gerald Combs 37a737f6d1 Make sure we can apply deprecated display filters.
Deprecated filters are still valid. Update display filter checks to make
sure we can apply them.

Bug: 11438
Change-Id: Ib5e009c070b40912434e0ffd771203ed1e1ba093
Reviewed-on: https://code.wireshark.org/review/10154
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-20 17:49:12 +00:00
Stig Bjørlykke bc777f903c Added a missing break
Change-Id: Ia04a112d8df195e271dc11565750a6e28bd7f0c9
Reviewed-on: https://code.wireshark.org/review/10146
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-20 08:29:37 +00:00
Stig Bjørlykke 950f1dde9e IO Graphs: Don't show unchecked graphs in legend
Change-Id: I0a9c4d967ee03a0a8dfc93f87dbe38e4e3a0404c
Reviewed-on: https://code.wireshark.org/review/10128
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-20 08:12:59 +00:00
Stig Bjørlykke 75f4ff727d Make empty filter valid in checkFilter
Change-Id: Ia5293a228a7044a4cd01b3b2f62f1d7a8f7747e2
Reviewed-on: https://code.wireshark.org/review/10145
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-20 08:12:29 +00:00
Stig Bjørlykke 29cd036f9e Clear display filter when filterPackets with empty filter
Change-Id: Ie3f763d53f5c250bbc58e32490eb83bb2e076a62
Reviewed-on: https://code.wireshark.org/review/10144
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-20 08:12:17 +00:00
Pascal Artho 89a8ad6565 Preparation Host Flows: Tap Sequence Analysis
The tap_sequence_analysis was adapted to store the protocol of each
frame. Therefore a new variable was introduced. In case of an ICMP or
ICMPv6 packet, the ICMP message type and code is retrieved. The adapted
ICMP and ICMPv6 dissector stores both values in packet info (see [1]).

In case of ICMP and ICMPv6 packets, the source and destination port is
not set or 0, respectively. Compared to that, the NetFlow service export
protocol [2] codes the ICMP message type and code into the port numbers.
The source port is zero while the destination is defined as: destination
port = ICMP type * 256 + ICMP code. This definition was implemented for
the ICMP and ICMPv6 packets.

References
[1] https://code.wireshark.org/review/10097
[2] http://www.ietf.org/rfc/rfc3954.txt

Change-Id: I07518e360975682a3f45e80cb24f82f58cfb15f0
Reviewed-on: https://code.wireshark.org/review/10098
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: Anders Broman <a.broman58@gmail.com>
2015-08-19 14:30:17 +00:00
Stig Bjørlykke fa40025a7e Recompile dfilter for all tap listeners when fields changed
When fields have changed the compiled display filter may be invalid
or need a recompile to be valid.

Filters which are not valid after a recompile is set to a filter
matching no packets (frame.number == 0) to indicate that this does
no longer match anything.  We should probably have a better filter
matching no packet for this purpose.

Change-Id: Id27efa9f46e77e20df50d7366f26d5cada186f93
Reviewed-on: https://code.wireshark.org/review/10123
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-19 08:55:19 +00:00
Gerald Combs 0e8cc9ab0a UDP multicast stream dialog.
Add the UDP multicast stream dialog. Abuse TapParameterDialog a bit more
so that we can edit parameters.

Remove some unused struct members and an unused function.

Change-Id: I962c70344e792f0959527e4bcba8a20bd7e8acf9
Reviewed-on: https://code.wireshark.org/review/10084
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-18 20:17:20 +00:00
Gerald Combs 9a3d4e6eef Move an include guard.
Move an include guard to match our conventions (and make it easier
to spot).

Change-Id: I4bad61a0194219f69217713d051e0ff53ff5a76a
Reviewed-on: https://code.wireshark.org/review/10110
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 20:09:42 +00:00
Alexis La Goutte 2eaaffec33 simple_statistics_dialog(.h): fix parameter 'st_table' not found in the function declaration [-Wdocumentation]
Change-Id: I69814a05fa6ad65315e36fa75ae60634e934be5c
Reviewed-on: https://code.wireshark.org/review/10117
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 20:04:21 +00:00
Stig Bjørlykke 857b1447f8 Qt: Syntax check display filter when fields changed
Change-Id: I7179d7918e7958373806fb9627a36554ab4b9ddc
Reviewed-on: https://code.wireshark.org/review/10115
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-18 19:18:20 +00:00
Stig Bjørlykke 97f3c1b88e Qt: Reload widgets using prefs when reloading Lua plugins
Widgets using prefs must be closed because the prefs may have
been free'd when reloading Lua plugins.

Change-Id: I4b79b7aff18d7923c77a9eb05acadc29b156edbf
Reviewed-on: https://code.wireshark.org/review/10108
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-18 17:20:40 +00:00
Hadriel Kaplan 8fcdcb9c95 Improve file merging for mergecap and wireshark
Refactor the file merging code by removing the duplicate logic from mergecap.c
and file.c's cf_merge_files(), into a new merge_files() function in merge.c.
Also the following user-visible changes:

 * Removed the '-T' encap type option from mergecap, as it's illogical for
   mergecap and would complicate common merge code.

 * Input files with IDBs of different name, speed, tsprecision, etc., will produce
   an output PCAPNG file with separate IDBs, even if their encap types are the same.

 * Added a '-I' IDB merge mode option for mergecap, to control how IDBs are merged.

 * Changed Wireshark's drag-and-drop merging to use PCAPNG instead of PCAP.

Bug: 8795
Bug: 7381
Change-Id: Icc30d217e093d6f40114422204afd2e332834f71
Reviewed-on: https://code.wireshark.org/review/10058
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 14:52:00 +00:00
Stig Bjørlykke df17ff3cac Qt: Fix use-after-free pattern
QString.toUtf8() returns a QByteArray object and .constData() returns
a pointer inside that object. It is not safe to store this pointer as
it will become invalid after the statement.

Change-Id: I8f54ede75577719008835038934e935cd5feba3f
Reviewed-on: https://code.wireshark.org/review/10067
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 10:52:08 +00:00
Michal Labedzki 318c3a5452 Qt: Add another C++ missing header: <algorithm> for std::sort()
Fix build error:
ui/qt/packet_list_model.cpp:270:5: error: 'sort' is not a member of 'std'
     std::sort(visible_rows_.begin(), visible_rows_.end(), recordLessThan);

Change-Id: I3a577a268f6c12e8fd97b7b6fd2429989c28e2f5
Reviewed-on: https://code.wireshark.org/review/10092
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-18 07:55:35 +00:00
Michal Labedzki 037524490d Qt/Minimap: Fix for Qt < 4.8
I hope it is quite right solution.

Change-Id: Ia9c883a832ddd03985eda37a9b344c4d7c8135e2
Reviewed-on: https://code.wireshark.org/review/10091
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-18 07:55:24 +00:00
Hadriel Kaplan e25562badd Pcapng: clean up Section Header Block handling
Change-Id: I8516d0c561ed0b63e49a3594027c9c15bb789258
Reviewed-on: https://code.wireshark.org/review/9726
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 05:52:45 +00:00
Gerald Combs c57f58549c Fixup tap listener registration.
Make sure we run make-tap-reg.py on files that register tap
listeners.  Make sure Qt-specific registration routines start with
register_tap_listener_qt_.

Change-Id: Idca382180f475db71e4d1965a70ae4cc2fa4f9d5
Reviewed-on: https://code.wireshark.org/review/10074
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-08-17 20:47:58 +00:00
Stig Bjørlykke ec1d25d884 Qt: Avoid double call to toUtf8()
Change-Id: I4d31063b4aa37e4b0a68b5dbc17be22ef2cd151a
Reviewed-on: https://code.wireshark.org/review/10077
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-17 20:03:07 +00:00
Stig Bjørlykke 68c51724fe Qt: Always rebuild columns when fields changed
The columns must be recreated even if no capture file is loaded
because custom columns may have reference to deregistered fields.

Change-Id: I4ed7345b3200e5af211695f1a6511ee229d5f13c
Reviewed-on: https://code.wireshark.org/review/10076
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-17 19:45:44 +00:00
Gerald Combs 0368b827c9 Improve multicast address checking.
Check for IPv4 and IPv6 multicast addresses. We might have captured on
an "any" interface, or on a PPP link, or used some other method that
doesn't result in dl_dst.type == AT_ETHER.

Change-Id: I18b0597fd432e4cec8c388a3c7d2d18ac4da0fad
Reviewed-on: https://code.wireshark.org/review/10009
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-08-17 16:15:47 +00:00
Gerald Combs 8d1a5498fb [Automatic update for 2015-08-16]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Idb8a2cff075a1ffe5e3cd1d6f4d3fb1b6c357cdb
Reviewed-on: https://code.wireshark.org/review/10055
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16 15:10:47 +00:00
Guy Harris 8b4572728d Un-reference actions after adding them to an action group.
When created, they have a reference count of 1; when added to an action
group, the reference count is increased as a pointer is held by the
action group.  Release the reference we got, as we're not holding onto
it.

Also, rename "menu_item" to "menu_action", to indicate that it's an action.

Change-Id: I54543dcc2e6c3b341a9f584fe1b6099a134771b3
Reviewed-on: https://code.wireshark.org/review/10049
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 18:35:16 +00:00
Guy Harris 1b467383de Do the "plugin" menu stuff in one pass.
Also, use g_strconcat() in other places where we prepend / to action
names.

Hopefully, this will make it easier to find common code between all the
N different places where we add menus and menu items.

Change-Id: Iee876866730cada64428df17f1f3c4552cc3ac93
Reviewed-on: https://code.wireshark.org/review/10048
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 18:21:03 +00:00
Guy Harris c222719a3b Fix creation of menu actions in ws_menubar_create_action_group().
Action names are expected to begin with /, so prepend a /.

Fixes the "plugin" menu mechanism (which could be used by built-in code
as well, so it's not really a "plugin" menu mechanism).

Change-Id: Ic45412399078796359649cc876d2c8bfc9a790c6
Reviewed-on: https://code.wireshark.org/review/10046
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 17:50:20 +00:00
Guy Harris 2bc6f01977 *More* issues.
Change-Id: Ib415582f4bf2529c412bed329b3ee7daccde29b0
Reviewed-on: https://code.wireshark.org/review/10042
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 16:48:09 +00:00
Guy Harris 8368f3b7f0 Update the previously-added comment.
At least with kqueues, NOTE_REVOKE is delivered if the file system
containing the vnode in question is unmounted, and that gets mapped to a
change notification by QFileSystemWatcher, so the right thing should
happen.

I'm not sure whether the right thing happens on Windows.

Change-Id: I1e4c0d510f31f68d574c4d4cf20524666382930f
Reviewed-on: https://code.wireshark.org/review/10039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 03:59:58 +00:00
Guy Harris 463caf8c55 Discuss alternatives to polling all the recent files every 2 seconds.
Somebody asked about repeated SMB traffic when running the Qt Wireshark:

https://ask.wireshark.org/questions/45036/permanent-smb2-traffic-with-1997

and that's due to said polling.  On the main desktop platforms (Windows,
OS X, Linux) we can use QFileSystemWatcher plus, on Windows and OS X,
some additional stuff to check for unmounts (and get FreeBSD as a
freebie, as it works the same as OS X), and avoid timeout-based polling.

Change-Id: I3a1d0110fedcdb442ed09c16dab4bf0cb06ca331
Reviewed-on: https://code.wireshark.org/review/10038
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 01:49:49 +00:00
Stig Bjørlykke 12ff69d44e Qt: Fixed funnel text dialog append and prepend
Append to end and prepend to start, not the opposite.

Change-Id: Ic0e2a7f04a0d9ff18a6fd7063d0550ad35eece1a
Reviewed-on: https://code.wireshark.org/review/10027
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14 09:04:14 +00:00
Stig Bjørlykke 842622594a Qt: Avoid redissect twice when changing fields
Changing fields in http, imf or ldap used to trigger redissect twice
because of UAT_AFFECTS_FIELDS and UAT_AFFECTS_DISSECTION.
Also changed from redrawVisiblePackets() to columnsChanged() because
fields in a custom column may have changed.

This also fixes reloading Lua plugins with Lua fields in custom columns.

Change-Id: I805a765690decbe7434dbf1c33ebd1113e23d16d
Reviewed-on: https://code.wireshark.org/review/10025
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14 06:08:40 +00:00
Pascal Quantin 7661bb2540 Qt: fix copy of newer files when building with qmake
Change-Id: I8ea5e2770a0c5be3d981d986fa96fe30445db167
Reviewed-on: https://code.wireshark.org/review/10018
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-13 15:59:39 +00:00
Gerald Combs 61d1ea4172 Initialize another variable.
Change-Id: Ie53a16dc482a9c38538077f6d6a2717cfaddbaa4
Reviewed-on: https://code.wireshark.org/review/10010
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-12 22:20:19 +00:00
Gerald Combs 99e3244324 Initialize a couple of variables.
Change-Id: I10471b770356ad46a10740198156055e1480eeb3
Reviewed-on: https://code.wireshark.org/review/10008
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-12 21:13:24 +00:00
Alexis La Goutte db2692c44c Qt (main_window) fix no previous prototype for '...' [-Wmissing-prototypes]
Change-Id: I43901d37817f9b79d508336253e766d740939e70
Reviewed-on: https://code.wireshark.org/review/10003
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-08-12 21:04:30 +00:00
Gerald Combs 5c80f08648 Add DCE-RPC and ONC-RPC service response time dialogs.
Add RpcServiceResponseTimeDialog, which handles DCE-RPC and ONC-RPC
service response time statistics. Try to make it as lightweight as
possible, since we might want to pull this into the RPC dissectors
similar to the other SRT statistics.

Allow program names on the command line in place of numbers or UUIDs. Make
matches case-insensitive. E.g. the following are equivalent:

    -z rpc,srt,100003,3
    -z rpc,srt,nfs,3
    -z rpc,srt,NFS,3

as are the following:

    -z dcerpc,srt,f5cc5a18-4264-101a-8c59-08002b2f8426,56
    -z dcerpc,srt,nspi,56
    -z dcerpc,srt,NSPI,56

Change-Id: Ie451c64bf6fbc776f27d81e3bc248435c5cbc9e4
Reviewed-on: https://code.wireshark.org/review/9981
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-08-12 20:17:35 +00:00
Gerald Combs 412f5b3716 Expert information dialog performance improvements.
Inserting QTreeWidgetItems individually is slow. This isn't a problem if
you only have a few items but the Expert Information dialog can have
thousands. Add "packet" tree items in groups, which should be much
faster. Note that we still add "group" tree items individually since
that gives us a nice progress indicator.

While we're here, make sure we show the dialog before tapping packets.

Bug: 11439
Change-Id: I8a182f4158d078cae5f42b8d1355414197f423e1
Reviewed-on: https://code.wireshark.org/review/10000
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-08-12 19:27:34 +00:00
Stig Bjørlykke 5a926946f4 Initialize is_reloading_lua at startup
Change-Id: I211e0f4b86cff1c311d4ae67cbb47de14846144f
Reviewed-on: https://code.wireshark.org/review/9997
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12 12:52:16 +00:00
Stig Bjørlykke dc7443fcc9 Added guards for deregistered fields
This is functions used when redissecting after a Lua plugins reload.

Change-Id: Ida14526faec1992006938a6732ee894ac83c2d12
Reviewed-on: https://code.wireshark.org/review/9995
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12 12:09:43 +00:00
Martin Kaiser 14c75250ab [Qt Expert Info dialogue] remove our tap listener when the dialogue is destroyed
if we don't do this, there'll be a dangling tap listener and we'll see a
crash when its reset method is called

this can be triggered by opening another expert info dialogue, this will
invoke cf_retap_packets() and reset_tap_listeners() which in turn calls
the reset method of each registered tap listener

Bug: 11432
Change-Id: I8fc13351666c875e1a3641f31bada8e80d167ab2
Reviewed-on: https://code.wireshark.org/review/9979
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-11 21:27:13 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Gerald Combs a8af51d613 [Automatic update for 2015-08-09]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I14806e32e93b7f189ccc68834afa4645bda3e1aa
Reviewed-on: https://code.wireshark.org/review/9942
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-09 15:10:53 +00:00
Gerald Combs 4bba83bd9c Reset the splash timer after processing events.
Change-Id: Id71a3ac5e8f04df6a19e92021e47ea64728c2595
Reviewed-on: https://code.wireshark.org/review/9936
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-09 00:03:47 +00:00
Gerald Combs 240105eaec Fixup the Qt splash overlay progress calculations.
Fix a couple of issues in the way we calculate the splash overlay
progress.

Avoid unnecessary repaints.

Change-Id: I1f4800b2c2836b67ca9ff3d6d24af150f4379ba9
Reviewed-on: https://code.wireshark.org/review/9916
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-07 20:23:07 +00:00
Stig Bjørlykke c90fcba042 Lua: Count Lua plugins in splash screen
This will avoid slow startup when having many Lua plugins.

Change-Id: I67b5f38108a5c500682bc727734375da5fa762c8
Reviewed-on: https://code.wireshark.org/review/9910
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-07 16:17:41 +00:00
Gerald Combs fd19aafbe6 Add ONC RPC program stats.
Convert ONC RPC program stats to the stat_tap API.

Add a "user_data" member to the stat_tap_table_item_type struct.

Change-Id: I5cbf000a447ff93d30fa7f098124bdcbc34f2935
Reviewed-on: https://code.wireshark.org/review/9904
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-07 08:57:42 +00:00
Gerald Combs ff24ecceb9 Fixup stat_tap table freeing.
As it turns out we *do* need to free table elements. We also need to
free the tables themselves and clear the table array. Do so.

Change-Id: Ic1c81388eac8f47f74caea0169c79685a83aaff9
Reviewed-on: https://code.wireshark.org/review/9901
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 21:22:13 +00:00
Gerald Combs 9fd3bcc25e Add an elide mode preference for the Qt packet list.
Change-Id: I081cc1e9b2a0eea7f0a3ef1157561c50beb4c4db
Reviewed-on: https://code.wireshark.org/review/9902
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-08-06 21:06:34 +00:00
Gerald Combs fda29e1c95 Use int_to_qstring in a few more places.
Change-Id: Id324fe21f436a233088d106553db2ed6f6e410ac
Reviewed-on: https://code.wireshark.org/review/9899
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-08-06 20:13:08 +00:00