aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/capture_file.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-01-21Qt: Show merge progress.Gerald Combs1-0/+8
Add "file merge" callback plumbing. Use it to display "Merging files" in the main statusbar. Make sure we have a usable window pointer when we merge files. Change-Id: I236b6edb30685f0b06703ab8304bc88ae592f83c Reviewed-on: https://code.wireshark.org/review/19716 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>
2016-09-02Qt: Conversation time column updates.Gerald Combs1-0/+8
Add a checkbox which lets you toggle between absolute and relative start times. Use the local time for now. Fixes bug 11618. Adjust our time precision based on the capture file's time precision. Fixes bug 12803. Update the User's Guide accordingly. Bug: 11618 Bug: 12803 Change-Id: I0049d6db6e4d0b6967bf35e6d056a61bfb4de10f Reviewed-on: https://code.wireshark.org/review/17448 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-06-27Qt: Clean up capture file callbacks.Gerald Combs1-4/+5
Mark some callbacks GTK+ only as appropriate. Change a debug message to an assert since we handle all callbacks. Change-Id: I4266f0d7134d19a9c0432354ea36de67501275b4 Reviewed-on: https://code.wireshark.org/review/16171 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-28Qt: Make conversation menu items static.Gerald Combs1-0/+10
Add a ConversationAction and ColorizeAction classes which respectively handle conversation filtering and colorization. Move conversation menu initialization to initConversationMenus and call it once at startup. This keeps us from leaking quite a bit of memory each time we select a packet or proto tree item. Bug: 12044 Change-Id: I32e8cedaba08a419d5da6a7a9db31c910909f450 Reviewed-on: https://code.wireshark.org/review/14516 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-12-09Qt: various fixes to VoIP calls / RTP player windowsPascal Quantin1-0/+2
- Flush any remaining tapped packets before emitting captureFileRetapFinished(). This ensures that all packets have been treated before returning from retapPackets(). - Remove VoIP tap listeners when captureFileRetapFinished() is emitted. This avoid summing stats each time the RTP player is opened, leading to wrong information in VoIP calls window - Change voip_calls_tapinfo_t redraw member from a boolean to bitmap so as to identify which tap should call the tapinfo->tap_draw() callback. This allows fixing a race condition where the RTP player can be empty in Qt UI - Reset some more statistics in voip_calls_reset_all_taps() Change-Id: Ie7681702c81d338185c1813f2d340a437edf3a04 Reviewed-on: https://code.wireshark.org/review/12474 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-10-27Qt: Protect against unintentional "no capture file" window statusMichal Labedzki1-2/+1
If capture file was closed and we have some WiresharkDialogs opened, then we still need to know filename of capture file related to specific dialog. Change-Id: I15f0e5176b87713bf747eead64021619d0bdf039 Reviewed-on: https://code.wireshark.org/review/11025 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
2015-09-11Export captured packets correctly.Gerald Combs1-0/+7
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-08-26Rework tapping in Qt dialogs.Gerald Combs1-1/+8
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-07-29Capture file retapping fixups.Gerald Combs1-0/+6
Add CaptureFile::delayedRetapPackets, which starts retapping after the current batch of UI event are processed. Call it in the constructors of various dialogs so that they are shown before tapping starts. This *might* fix a crash found when following large streams from the Conversations dialog. Change-Id: If1b87491621ab7efcc0519f95891d34dcd9d18c1 Reviewed-on: https://code.wireshark.org/review/9818 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-07Qt: Add initial Lua support.Gerald Combs1-0/+7
Add a FunnelStatistics class, which is the main interface between the Qt UI and the Funnel API. Add FunnelTextDialog, which implements the text_window, ProgDlg, menu, and other routines. Add FunnelStringDialog, which implements dlg_new. We currently only support "Tools" menu items (MENU_TOOLS_UNSORTED, aka REGISTER_TOOLS_GROUP_UNSORTED). Add a disabled placeholder to the "Tools" menu in case we don't load any scripts. Use "struct progdlg" instead of needlessly casting to funnel_progress_window_t. To do: - Add support for MENU_STAT_UNSORTED, MENU_STAT_GENERIC, etc. - Make the firewall config generator a Lua script? - Add FunnelGraphDialog? It seems like it would be useful to make QCustomPlot accessible to Lua scripts. Ping-Bug: 9845 Change-Id: Iefff02e9032ed1853666f7902509ed08b431e7a7 Reviewed-on: https://code.wireshark.org/review/9523 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-06-23Morph ProgressBar into CaptureProgressFrame.Gerald Combs1-2/+7
Switch from a plain QProgressBar to a QFrame with a QProgressBar and a stop button. Add a stop_flag boolean to the capture_file struct. To do: - Start adding the progress bar to dialogs. - Don't complain so loudly when the user stops a capture. Change-Id: Iedd1d7d79f2044f1a53e4fb22186d25930a3ef03 Reviewed-on: https://code.wireshark.org/review/9029 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-23Qt: Update the status bar when saving.Gerald Combs1-8/+40
Plumb in more capture file callbacks. Add common functions for setting the status bar file information. Add and update code to match the GTK+ status bar behavior. Make sure we update the capture file length when rescanning. Bug: 10943 Change-Id: Ie84c7a57ee421d57ba3477f8dde3847aaafa1cd1 Reviewed-on: https://code.wireshark.org/review/8594 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-22Qt: Add a "[closed]" hint to the packet dialog.Gerald Combs1-3/+3
Try to make it more obvious that the file has closed. Ping-Bug: 11044 Change-Id: I76ae5724316c6fd9e7efdd817c39ac268b7d4dd0 Reviewed-on: https://code.wireshark.org/review/8593 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15Qt: Stop tapping when the I/O Graph dialog closes.Gerald Combs1-0/+7
Add a setCaptureStopFlag function to ProgressBar. Add a stopTapping function and setCaptureStopFlag signal to CaptureFile. Use the new plubming to stop tapping when the IO Graph dialog closes. Bug: 10116 Change-Id: Ic46814eed18933f511d9d1ff37e2e7918741f353 Reviewed-on: https://code.wireshark.org/review/8480 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-06Show a count in the status bar for all captures.Guy Harris1-0/+1
(I'd have said "for non-update-list-of-packets-in-real-time captures", but that's too long for the holy Git "first line of the commit message is a summary" rule.) For non-update-list-of-packets-in-real-time captures, show a packet count in the status bar. Change-Id: I31670770e3772e9f772f0c9a6438fc6d053560aa Reviewed-on: https://code.wireshark.org/review/7957 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-27Qt: Automatically scroll the packet list.Michal Labedzki1-0/+1
Add an "Auto Scroll in Live Capture" action to the Go menu. It's in the View menu in the GTK+ UI but it seems to make more sense as a navigation item. Use a timeout interval for automatic scrolling. I haven't run any tests to see if this makes a difference but it would seem that the less drawing we do during a high speed capture the better, particularly for remote displays. Update the x-stay-last icons. Note that we might want to make prefs.capture_auto_scroll a "recent" setting. Mark auto_scroll_live and packet_list_check_end GTK+ only. Bug: 10601 Co-authored-by: Gerald Combs <gerald@wireshark.org> Change-Id: I645d27c0814f0e4a0d5b01ae68be366847e2522d Reviewed-on: https://code.wireshark.org/review/7292 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-24Qt: Fix a crash when changing the layout.Gerald Combs1-0/+7
Freeze and thaw the packet list when changing the layout. This has the side effect of clearing the proto tree and byte view, which avoids reading a bad tvb pointer. Note that we might want to add a cleanup callback to free_data_sources. Save and restore the current row. Add CaptureFile::currentRow. Fix a couple of comparisons in PacketList. Change-Id: I26f9b97ae5a7cdb4fb6e5e6e675570884900e995 Reviewed-on: https://code.wireshark.org/review/7337 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-21Qt: Fix unsaved changes behavior.Gerald Combs1-9/+5
Check the return value of testCaptureFileClose in MainWindow::openCaptureFile and add testCaptureFileClose to MainWindow::closeEvent. Some of the file opening and closing behavior still needs to be cleaned up but this should at least keep the user from losing unsaved data. Bug: 10944 Change-Id: I7d7b563a6b72f48b41a5a3aff2837655557869ff Reviewed-on: https://code.wireshark.org/review/7283 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-29Qt: Add a WiresharkDialog convenience class.Gerald Combs1-2/+5
Add WiresharkDialog, a common base class for dialogs centered around capture files. Make it a parent of Capture File Properties, Traffic Table, Conversations, and Endpoints. Rename CaptureFile::read_only_ to file_closed_. Add methods to WiresharkApplication for generating consistent window titles. Change-Id: Idc771556d8192e60f85dddc08fc4757698dee257 Reviewed-on: https://code.wireshark.org/review/6097 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-22Qt: Add methods to CaptureFile and WiresharkApplication.Gerald Combs1-3/+27
Add isValid, fileTitle, and retapPackets methods to CaptureFile. Add application name and title separator convenience methods to WiresharkApplication. Convert traffic tables, conversations, and endpoints to use CaptureFile directly and to let the user know when the capture file is closed. Set the file dialog titles while we're here. Change-Id: I990392786d3833e1e0b3638aa2d34a5ada39fa13 Reviewed-on: https://code.wireshark.org/review/5957 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20Remove debugging code.Gerald Combs1-6/+0
Change-Id: If3a64a6914ae8ce2521c85766df6f733a13ca7e1 Reviewed-on: https://code.wireshark.org/review/5926 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20Qt: Add a CaptureFile class.Gerald Combs1-0/+212
Wrap the capture_file struct in a QObject which translates cf_cb_* and capture_cb_* events into signals. Move the global cfile to capture_file.cpp. Don't use a void pointer for the capture file struct. Change-Id: Ic5d5efb4bb1db64aa0247245890e5669b1da723a Reviewed-on: https://code.wireshark.org/review/5885 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>