aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/tap_parameter_dialog.h
AgeCommit message (Collapse)AuthorFilesLines
2016-06-23Qt: Use queued signals+slots for filter actionsGerald Combs1-1/+1
Many of our dialogs can send an "apply this display filter" signal to the main window. Applying a display filter in turn creates a nested event loop via cf_read+update_progress_dlg. If the "apply" signal+slot is directly connected (which is the default, and which means we're calling into a function table) we can close the dialog while the signal is firing, which means we return into a deleted object. Make all of the filterAction signals+slots queued instead of direct. Bug: 12523 Change-Id: Ica331054c0aa52a7f33bd8df1fa65ecd09fdc292 Reviewed-on: https://code.wireshark.org/review/16080 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-28Don't dissect twice from TapParameterDialog.Gerald Combs1-1/+1
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-27More retapping fixups.Gerald Combs1-1/+0
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-26Rework tapping in Qt dialogs.Gerald Combs1-0/+1
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-26Add per-dialog progress frames.Gerald Combs1-0/+6
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-22Statistics dialog fixups.Gerald Combs1-3/+3
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-20Tap parameter and stats dialog fixups.Gerald Combs1-3/+3
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-18UDP multicast stream dialog.Gerald Combs1-4/+9
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-18Qt: Fix use-after-free patternStig Bjørlykke1-1/+1
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-12Add DCE-RPC and ONC-RPC service response time dialogs.Gerald Combs1-0/+7
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-07-09Qt: Add dynamic menu support.Gerald Combs1-0/+2
Generalize the dynamic menu code and make it possible to connect multiple types of actions to their corresponding slots. Change-Id: Ib915ad5a666310e2a6e366fada006336820d1653 Reviewed-on: https://code.wireshark.org/review/9568 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-03Add ServiceResponseTimeDialog.Gerald Combs1-1/+29
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog, similar to StatsTreeDialog. Add initial plumbing for statistics menu items and command line invocation. Don't append "..." to menu item names. Don't add menu icons. In each case this avoids repetitive UI clutter. Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c Reviewed-on: https://code.wireshark.org/review/8864 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-08Add TapParameterDialog.Gerald Combs1-0/+85
Split StatsTreeDialog into StatsTreeDialog and TapParameterDialog (its base class). This more closely matches the GTK+ UI and paves the way for more statistics dialogs. Change-Id: I2630385534e829d99724673ade372fcb33200d07 Reviewed-on: https://code.wireshark.org/review/8842 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>