1 /* main_window.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef MAINWINDOW_H
11 #define MAINWINDOW_H
12 
13 /** @defgroup main_window_group Main window
14  * The main window has the following submodules:
15    @dot
16   digraph main_dependencies {
17       node [shape=record, fontname=Helvetica, fontsize=10];
18       main [ label="main window" URL="\ref main.h"];
19       menu [ label="menubar" URL="\ref menus.h"];
20       toolbar [ label="toolbar" URL="\ref main_toolbar.h"];
21       packet_list [ label="packet list pane" URL="\ref packet_list.h"];
22       proto_draw [ label="packet details & bytes panes" URL="\ref main_proto_draw.h"];
23       recent [ label="recent user settings" URL="\ref recent.h"];
24       main -> menu [ arrowhead="open", style="solid" ];
25       main -> toolbar [ arrowhead="open", style="solid" ];
26       main -> packet_list [ arrowhead="open", style="solid" ];
27       main -> proto_draw [ arrowhead="open", style="solid" ];
28       main -> recent [ arrowhead="open", style="solid" ];
29   }
30   @enddot
31  */
32 
33 /** @file
34  *  The main window
35  *  @ingroup main_window_group
36  *  @ingroup windows_group
37  */
38 
39 #include <stdio.h>
40 
41 #include <config.h>
42 
43 #include <glib.h>
44 
45 #include "file.h"
46 
47 #include "ui/ws_ui_util.h"
48 #include "ui/iface_toolbar.h"
49 
50 #include <epan/prefs.h>
51 #include <epan/plugin_if.h>
52 #include <epan/timestamp.h>
53 
54 #ifdef HAVE_LIBPCAP
55 #include "capture_opts.h"
56 #endif
57 #include <capture/capture_session.h>
58 
59 #include <QMainWindow>
60 #include <QPointer>
61 #include <QSplitter>
62 
63 #ifdef _WIN32
64 # include <QTimer>
65 #else
66 # include <QSocketNotifier>
67 #endif
68 
69 #include "capture_file.h"
70 #include "capture_file_dialog.h"
71 #include "print_dialog.h"
72 #include "capture_file_properties_dialog.h"
73 #include <ui/qt/utils/field_information.h>
74 #include <ui/qt/widgets/display_filter_combo.h>
75 #include "filter_action.h"
76 #include "follow_stream_dialog.h"
77 #include <ui/qt/models/pref_models.h>
78 #include "rtp_stream_dialog.h"
79 #include "voip_calls_dialog.h"
80 #include "rtp_analysis_dialog.h"
81 
82 class AccordionFrame;
83 class ByteViewTab;
84 class CaptureOptionsDialog;
85 class PrintDialog;
86 class FileSetDialog;
87 class FilterDialog;
88 class FunnelStatistics;
89 class WelcomePage;
90 class PacketCommentDialog;
91 class PacketDiagram;
92 class PacketList;
93 class ProtoTree;
94 #if defined(HAVE_LIBNL) && defined(HAVE_NL80211)
95 class WirelessFrame;
96 #endif
97 class FilterExpressionToolBar;
98 class WiresharkApplication;
99 
100 class QAction;
101 class QActionGroup;
102 
103 namespace Ui {
104     class MainWindow;
105 }
106 
107 Q_DECLARE_METATYPE(ts_type)
Q_DECLARE_METATYPE(ts_precision)108 Q_DECLARE_METATYPE(ts_precision)
109 
110 class MainWindow : public QMainWindow
111 {
112     Q_OBJECT
113 
114 public:
115     explicit MainWindow(QWidget *parent = 0);
116     ~MainWindow();
117     void setPipeInputHandler(gint source, gpointer user_data, ws_process_id *child_process, pipe_input_cb_t input_cb);
118 
119     QString getFilter();
120 #ifdef HAVE_LIBPCAP
121     capture_session *captureSession() { return &cap_session_; }
122     info_data_t *captureInfoData() { return &info_data_; }
123 #endif
124 
125     virtual QMenu *createPopupMenu();
126 
127     void gotoFrame(int packet_num);
128     CaptureFile *captureFile() { return &capture_file_; }
129 
130     void removeAdditionalToolbar(QString toolbarName);
131 
132     void addInterfaceToolbar(const iface_toolbar *toolbar_entry);
133     void removeInterfaceToolbar(const gchar *menu_title);
134 
135     QString getMwFileName();
136     void setMwFileName(QString fileName);
137 
138     void insertColumn(QString name, QString abbrev, gint pos = -1);
139 
140     bool hasSelection();
141     QList<int> selectedRows(bool useFrameNum = false);
142     frame_data * frameDataForRow(int row) const;
143 
144 protected:
145     virtual bool eventFilter(QObject *obj, QEvent *event);
146     virtual bool event(QEvent *event);
147     virtual void keyPressEvent(QKeyEvent *event);
148     virtual void closeEvent(QCloseEvent *event);
149     virtual void dragEnterEvent(QDragEnterEvent *event);
150     virtual void dropEvent(QDropEvent *event);
151     virtual void changeEvent(QEvent* event);
152 
153 private:
154     // XXX Move to FilterUtils
155     enum MatchSelected {
156         MatchSelectedReplace,
157         MatchSelectedAnd,
158         MatchSelectedOr,
159         MatchSelectedNot,
160         MatchSelectedAndNot,
161         MatchSelectedOrNot
162     };
163 
164     enum CopySelected {
165         CopyAllVisibleItems,
166         CopyAllVisibleSelectedTreeItems,
167         CopySelectedDescription,
168         CopySelectedFieldName,
169         CopySelectedValue,
170         CopyListAsText,
171         CopyListAsCSV,
172         CopyListAsYAML
173     };
174 
175     enum FileCloseContext {
176         Default,
177         Quit,
178         Restart,
179         Reload
180     };
181 
182     Ui::MainWindow *main_ui_;
183     QSplitter master_split_;
184     QSplitter extra_split_;
185     QVector<unsigned> cur_layout_;
186     WelcomePage *welcome_page_;
187     DisplayFilterCombo *df_combo_box_;
188     CaptureFile capture_file_;
189     QFont mono_font_;
190     QMap<QString, QTextCodec *> text_codec_map_;
191 #if defined(HAVE_LIBNL) && defined(HAVE_NL80211)
192     WirelessFrame *wireless_frame_;
193 #endif
194     // XXX - packet_list_ and proto_tree_ should
195     // probably be full-on values instead of pointers.
196     PacketList *packet_list_;
197     ProtoTree *proto_tree_;
198     ByteViewTab *byte_view_tab_;
199     PacketDiagram *packet_diagram_;
200     QWidget *previous_focus_;
201     FileSetDialog *file_set_dialog_;
202     QWidget empty_pane_;
203     QActionGroup *show_hide_actions_;
204     QActionGroup *time_display_actions_;
205     QActionGroup *time_precision_actions_;
206     FunnelStatistics *funnel_statistics_;
207     QList<QPair<QAction *, bool> > freeze_actions_;
208     QPointer<QWidget> freeze_focus_;
209     QMap<QAction *, ts_type> td_actions;
210     QMap<QAction *, ts_precision> tp_actions;
211     bool was_maximized_;
212 
213     /* the following values are maintained so that the capture file name and status
214     is available when there is no cf structure available */
215     QString mwFileName_;
216 
217     bool capture_stopping_;
218     bool capture_filter_valid_;
219 #ifdef HAVE_LIBPCAP
220     capture_session cap_session_;
221     CaptureOptionsDialog *capture_options_dialog_;
222     info_data_t info_data_;
223 #endif
224     FilterDialog *display_filter_dlg_;
225     FilterDialog *capture_filter_dlg_;
226 
227     // Pipe input
228     gint                pipe_source_;
229     gpointer            pipe_user_data_;
230     ws_process_id      *pipe_child_process_;
231     pipe_input_cb_t     pipe_input_cb_;
232 #ifdef _WIN32
233     QTimer *pipe_timer_;
234 #else
235     QSocketNotifier *pipe_notifier_;
236 #endif
237 
238 #if defined(Q_OS_MAC)
239     QMenu *dock_menu_;
240 #endif
241 
242 #ifdef HAVE_SOFTWARE_UPDATE
243     QAction *update_action_;
244 #endif
245 
246     QPoint dragStartPosition;
247 
248     QWidget* getLayoutWidget(layout_pane_content_e type);
249 
250     void freeze();
251     void thaw();
252 
253     void mergeCaptureFile();
254     void importCaptureFile();
255     bool saveCaptureFile(capture_file *cf, bool dont_reopen);
256     bool saveAsCaptureFile(capture_file *cf, bool must_support_comments = false, bool dont_reopen = false);
257     void exportSelectedPackets();
258     void exportDissections(export_type_e export_type);
259 
260 #ifdef Q_OS_WIN
261     void fileAddExtension(QString &file_name, int file_type, wtap_compression_type compression_type);
262 #endif // Q_OS_WIN
263     bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
264     void captureStop();
265 
266     void findTextCodecs();
267 
268     void initMainToolbarIcons();
269     void initShowHideMainWidgets();
270     void initTimeDisplayFormatMenu();
271     void initTimePrecisionFormatMenu();
272     void initFreezeActions();
273 
274     void setTitlebarForCaptureInProgress();
275     void setMenusForCaptureFile(bool force_disable = false);
276     void setMenusForCaptureInProgress(bool capture_in_progress = false);
277     void setMenusForCaptureStopping();
278     void setForCapturedPackets(bool have_captured_packets);
279     void setMenusForFileSet(bool enable_list_files);
280     void setWindowIcon(const QIcon &icon);
281     QString replaceWindowTitleVariables(QString title);
282 
283     void externalMenuHelper(ext_menu_t * menu, QMenu  * subMenu, gint depth);
284 
285     void setForCaptureInProgress(bool capture_in_progress = false, bool handle_toolbars = false, GArray *ifaces = NULL);
286     QMenu* findOrAddMenu(QMenu *parent_menu, QString& menu_text);
287 
288     void captureFileReadStarted(const QString &action);
289 
290     void addMenuActions(QList<QAction *> &actions, int menu_group);
291     void removeMenuActions(QList<QAction *> &actions, int menu_group);
292     void goToConversationFrame(bool go_next);
293     void colorizeWithFilter(QByteArray filter, int color_number = -1);
294 
295 signals:
296     void setCaptureFile(capture_file *cf);
297     void setDissectedCaptureFile(capture_file *cf);
298     void displayFilterSuccess(bool success);
299     void closePacketDialogs();
300     void reloadFields();
301     void packetInfoChanged(struct _packet_info *pinfo);
302     void fieldFilterChanged(const QByteArray field_filter);
303     void filterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
304 
305     void fieldSelected(FieldInformation *);
306     void fieldHighlight(FieldInformation *);
307 
308     void framesSelected(QList<int>);
309 
310     void captureActive(int);
311     void selectRtpStream(rtpstream_id_t *id);
312     void deselectRtpStream(rtpstream_id_t *id);
313 
314 public slots:
315     // in main_window_slots.cpp
316     /**
317      * Open a capture file.
318      * @param cf_path Path to the file.
319      * @param display_filter Display filter to apply. May be empty.
320      * @param type File type.
321      * @param is_tempfile TRUE/FALSE.
322      * @return True on success, false on failure.
323      */
324     // XXX We might want to return a cf_read_status_t or a CaptureFile.
325     bool openCaptureFile(QString cf_path, QString display_filter, unsigned int type, gboolean is_tempfile = FALSE);
326     bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) { return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
327     void filterPackets(QString new_filter = QString(), bool force = false);
328     void setDisplayFilter(QString filter, FilterAction::Action action, FilterAction::ActionType filterType);
329     void updateForUnsavedChanges();
330     void layoutPanes();
331     void applyRecentPaneGeometry();
332     void layoutToolbars();
333     void updatePreferenceActions();
334     void updateRecentActions();
335 
336     void showWelcome();
337     void showCapture();
338 
339     void setTitlebarForCaptureFile();
340     void setWSWindowTitle(QString title = QString());
341 
342 #ifdef HAVE_LIBPCAP
343     void captureCapturePrepared(capture_session *);
344     void captureCaptureUpdateStarted(capture_session *);
345     void captureCaptureUpdateFinished(capture_session *);
346     void captureCaptureFixedFinished(capture_session *cap_session);
347     void captureCaptureFailed(capture_session *);
348 #endif
349 
350     void captureFileOpened();
351     void captureFileReadFinished();
352     void captureFileClosing();
353     void captureFileClosed();
354 
355     void launchRLCGraph(bool channelKnown, guint16 ueid, guint8 rlcMode,
356                         guint16 channelType, guint16 channelId, guint8 direction);
357 
358     void on_actionViewFullScreen_triggered(bool checked);
359 
360     void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
361     void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
362     void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
363     void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
364     void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
365     void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
366     void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
367     void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
368 
369 private slots:
370 
371     void captureEventHandler(CaptureEvent ev);
372 
373     // Manually connected slots (no "on_<object>_<signal>").
374 
375     void initViewColorizeMenu();
376     void initConversationMenus();
377     static gboolean addExportObjectsMenuItem(const void *key, void *value, void *userdata);
378     void initExportObjectsMenus();
379 
380     // in main_window_slots.cpp
381     /**
382      * @brief startCapture
383      * Start capturing from the selected interfaces using the capture filter
384      * shown in the main welcome screen.
385      */
386     void startCapture();
387     void pipeTimeout();
388     void pipeActivated(int source);
389     void pipeNotifierDestroyed();
390     void stopCapture();
391 
392     void loadWindowGeometry();
393     void saveWindowGeometry();
394     void mainStackChanged(int);
395     void updateRecentCaptures();
396     void recentActionTriggered();
397     void actionAddPacketComment();
398     void actionEditPacketComment();
399     void actionDeletePacketComment();
400     void actionDeleteCommentsFromPackets();
401     QString commentToMenuText(QString text, int max_len = 40);
402     void setEditCommentsMenu();
403     void setMenusForSelectedPacket();
404     void setMenusForSelectedTreeRow(FieldInformation *fi = NULL);
405     void interfaceSelectionChanged();
406     void captureFilterSyntaxChanged(bool valid);
407     void redissectPackets();
408     void checkDisplayFilter();
409     void fieldsChanged();
410     void reloadLuaPlugins();
411     void showAccordionFrame(AccordionFrame *show_frame, bool toggle = false);
412     void showColumnEditor(int column);
413     void showPreferenceEditor(); // module_t *, pref *
414     void addStatsPluginsToMenu();
415     void addDynamicMenus();
416     void reloadDynamicMenus();
417     void addPluginIFStructures();
418     QMenu * searchSubMenu(QString objectName);
419     void activatePluginIFToolbar(bool);
420 
421     void startInterfaceCapture(bool valid, const QString capture_filter);
422 
423     void applyGlobalCommandLineOptions();
424     void setFeaturesEnabled(bool enabled = true);
425 
426     void on_actionDisplayFilterExpression_triggered();
427     void on_actionNewDisplayFilterExpression_triggered();
428     void onFilterSelected(QString, bool);
429     void onFilterPreferences();
430     void onFilterEdit(int uatIndex);
431 
432     // Handle FilterAction signals
433     void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
434 
435     /** Pass stat cmd arguments to a slot.
436      * @param menu_path slot Partial slot name, e.g. "StatisticsIOGraph".
437      * @param arg "-z" argument, e.g. "io,stat".
438      * @param userdata Optional user data.
439      */
440     void openStatCommandDialog(const QString &menu_path, const char *arg, void *userdata);
441 
442     /** Pass tap parameter arguments to a slot.
443      * @param cfg_str slot Partial slot name, e.g. "StatisticsAFPSrt".
444      * @param arg "-z" argument, e.g. "afp,srt".
445      * @param userdata Optional user data.
446      */
447     void openTapParameterDialog(const QString cfg_str, const QString arg, void *userdata);
448     void openTapParameterDialog();
449 
450 #if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
451     void softwareUpdateRequested();
452 #endif
453 
454     // Automatically connected slots ("on_<object>_<signal>").
455     //
456     // The slots below follow the naming conventaion described in
457     // https://doc.qt.io/archives/qt-4.8/qmetaobject.html#connectSlotsByName
458     // and are automatically connected at initialization time via
459     // main_ui_->setupUi, which in turn calls connectSlotsByName.
460     //
461     // If you're manually connecting a signal to a slot, don't prefix its name
462     // with "on_". Otherwise you'll get runtime warnings.
463 
464     // We might want move these to main_window_actions.cpp similar to
465     // gtk/main_menubar.c
466 
467     void on_actionFileOpen_triggered();
468     void on_actionFileMerge_triggered();
469     void on_actionFileImportFromHexDump_triggered();
470     void on_actionFileClose_triggered();
471     void on_actionFileSave_triggered();
472     void on_actionFileSaveAs_triggered();
473     void on_actionFileSetListFiles_triggered();
474     void on_actionFileSetNextFile_triggered();
475     void on_actionFileSetPreviousFile_triggered();
476     void on_actionFileExportPackets_triggered();
477     void on_actionFileExportAsPlainText_triggered();
478     // We're dropping PostScript exports
479     void on_actionFileExportAsCSV_triggered();
480     void on_actionFileExportAsCArrays_triggered();
481     void on_actionFileExportAsPSML_triggered();
482     void on_actionFileExportAsPDML_triggered();
483     void on_actionFileExportAsJSON_triggered();
484     void on_actionFileExportPacketBytes_triggered();
485     void on_actionFilePrint_triggered();
486 
487     void on_actionFileExportPDU_triggered();
488     void on_actionFileExportTLSSessionKeys_triggered();
489 
490     void actionEditCopyTriggered(MainWindow::CopySelected selection_type);
491     void on_actionCopyAllVisibleItems_triggered();
492     void on_actionCopyAllVisibleSelectedTreeItems_triggered();
493     void on_actionCopyListAsText_triggered();
494     void on_actionCopyListAsCSV_triggered();
495     void on_actionCopyListAsYAML_triggered();
496     void on_actionEditCopyDescription_triggered();
497     void on_actionEditCopyFieldName_triggered();
498     void on_actionEditCopyValue_triggered();
499     void on_actionEditCopyAsFilter_triggered();
500     void on_actionEditFindPacket_triggered();
501     void on_actionEditFindNext_triggered();
502     void on_actionEditFindPrevious_triggered();
503     void on_actionEditMarkPacket_triggered();
504     void on_actionEditMarkAllDisplayed_triggered();
505     void on_actionEditUnmarkAllDisplayed_triggered();
506     void on_actionEditNextMark_triggered();
507     void on_actionEditPreviousMark_triggered();
508     void on_actionEditIgnorePacket_triggered();
509     void on_actionEditIgnoreAllDisplayed_triggered();
510     void on_actionEditUnignoreAllDisplayed_triggered();
511     void on_actionEditSetTimeReference_triggered();
512     void on_actionEditUnsetAllTimeReferences_triggered();
513     void on_actionEditNextTimeReference_triggered();
514     void on_actionEditPreviousTimeReference_triggered();
515     void on_actionEditTimeShift_triggered();
516     void editTimeShiftFinished(int);
517     void addPacketCommentFinished(PacketCommentDialog* pc_dialog, int result);
518     void editPacketCommentFinished(PacketCommentDialog* pc_dialog, int result, guint nComment);
519     void on_actionDeleteAllPacketComments_triggered();
520     void deleteAllPacketCommentsFinished(int result);
521     void on_actionEditConfigurationProfiles_triggered();
522     void showPreferencesDialog(QString module_name);
523     void on_actionEditPreferences_triggered();
524 
525     void showHideMainWidgets(QAction *action);
526     void setTimestampFormat(QAction *action);
527     void setTimestampPrecision(QAction *action);
528     void on_actionViewTimeDisplaySecondsWithHoursAndMinutes_triggered(bool checked);
529     void on_actionViewEditResolvedName_triggered();
530     void setNameResolution();
531     void on_actionViewNameResolutionPhysical_triggered();
532     void on_actionViewNameResolutionNetwork_triggered();
533     void on_actionViewNameResolutionTransport_triggered();
534     // XXX We're not porting the concurrency action from GTK+ on purpose.
535     void zoomText();
536     void on_actionViewZoomIn_triggered();
537     void on_actionViewZoomOut_triggered();
538     void on_actionViewNormalSize_triggered();
539     void on_actionViewColorizePacketList_triggered(bool checked);
540     void on_actionViewColoringRules_triggered();
541     void colorizeConversation(bool create_rule = false);
542     void colorizeActionTriggered();
543     void on_actionViewColorizeResetColorization_triggered();
544     void on_actionViewColorizeNewColoringRule_triggered();
545     void on_actionViewResetLayout_triggered();
546     void on_actionViewResizeColumns_triggered();
547 
548     void on_actionViewInternalsConversationHashTables_triggered();
549     void on_actionViewInternalsDissectorTables_triggered();
550     void on_actionViewInternalsSupportedProtocols_triggered();
551 
552     void openPacketDialog(bool from_reference = false);
553     void on_actionViewShowPacketInNewWindow_triggered();
554     void on_actionContextShowLinkedPacketInNewWindow_triggered();
555     void on_actionViewReload_triggered();
556     void on_actionViewReload_as_File_Format_or_Capture_triggered();
557 
558     void on_actionGoGoToPacket_triggered();
559     void on_actionGoGoToLinkedPacket_triggered();
560     void on_actionGoNextConversationPacket_triggered();
561     void on_actionGoPreviousConversationPacket_triggered();
562     void on_actionGoAutoScroll_toggled(bool checked);
563     void resetPreviousFocus();
564 
565     void on_actionCaptureOptions_triggered();
566 #ifdef HAVE_LIBPCAP
567     void on_actionCaptureRefreshInterfaces_triggered();
568 #endif
569     void on_actionCaptureCaptureFilters_triggered();
570 
571     void on_actionAnalyzeDisplayFilters_triggered();
572     void on_actionAnalyzeDisplayFilterMacros_triggered();
573     void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
574     void on_actionAnalyzeCreateAColumn_triggered();
575 
576     void filterMenuAboutToShow();
577 
578     void applyConversationFilter();
579     void applyExportObject();
580 
581     void on_actionAnalyzeEnabledProtocols_triggered();
582     void on_actionAnalyzeDecodeAs_triggered();
583     void on_actionAnalyzeReloadLuaPlugins_triggered();
584 
585     void openFollowStreamDialog(follow_type_t type, guint stream_num, guint sub_stream_num, bool use_stream_index = true);
586     void openFollowStreamDialogForType(follow_type_t type);
587     void on_actionAnalyzeFollowTCPStream_triggered();
588     void on_actionAnalyzeFollowUDPStream_triggered();
589     void on_actionAnalyzeFollowDCCPStream_triggered();
590     void on_actionAnalyzeFollowTLSStream_triggered();
591     void on_actionAnalyzeFollowHTTPStream_triggered();
592     void on_actionAnalyzeFollowHTTP2Stream_triggered();
593     void on_actionAnalyzeFollowQUICStream_triggered();
594     void on_actionAnalyzeFollowSIPCall_triggered();
595 
596     void statCommandExpertInfo(const char *, void *);
597     void on_actionAnalyzeExpertInfo_triggered();
598 
599     void on_actionHelpContents_triggered();
600     void on_actionHelpMPWireshark_triggered();
601     void on_actionHelpMPWireshark_Filter_triggered();
602     void on_actionHelpMPCapinfos_triggered();
603     void on_actionHelpMPDumpcap_triggered();
604     void on_actionHelpMPEditcap_triggered();
605     void on_actionHelpMPMergecap_triggered();
606     void on_actionHelpMPRawShark_triggered();
607     void on_actionHelpMPReordercap_triggered();
608     void on_actionHelpMPText2cap_triggered();
609     void on_actionHelpMPTShark_triggered();
610     void on_actionHelpWebsite_triggered();
611     void on_actionHelpFAQ_triggered();
612     void on_actionHelpAsk_triggered();
613     void on_actionHelpDownloads_triggered();
614     void on_actionHelpWiki_triggered();
615     void on_actionHelpSampleCaptures_triggered();
616     void on_actionHelpAbout_triggered();
617 
618 #ifdef HAVE_SOFTWARE_UPDATE
619     void checkForUpdates();
620 #endif
621 
622     void on_goToCancel_clicked();
623     void on_goToGo_clicked();
624     void on_goToLineEdit_returnPressed();
625     void on_actionCaptureStart_triggered();
626     void on_actionCaptureStop_triggered();
627     void on_actionCaptureRestart_triggered();
628 
629     void on_actionStatisticsCaptureFileProperties_triggered();
630     void on_actionStatisticsResolvedAddresses_triggered();
631     void on_actionStatisticsProtocolHierarchy_triggered();
632     void on_actionStatisticsFlowGraph_triggered();
633     void openTcpStreamDialog(int graph_type);
634     void on_actionStatisticsTcpStreamStevens_triggered();
635     void on_actionStatisticsTcpStreamTcptrace_triggered();
636     void on_actionStatisticsTcpStreamThroughput_triggered();
637     void on_actionStatisticsTcpStreamRoundTripTime_triggered();
638     void on_actionStatisticsTcpStreamWindowScaling_triggered();
639     void openSCTPAllAssocsDialog();
640     void on_actionSCTPShowAllAssociations_triggered();
641     void on_actionSCTPAnalyseThisAssociation_triggered();
642     void on_actionSCTPFilterThisAssociation_triggered();
643     void statCommandMulticastStatistics(const char *arg, void *);
644     void on_actionStatisticsUdpMulticastStreams_triggered();
645 
646     void statCommandWlanStatistics(const char *arg, void *);
647     void on_actionWirelessWlanStatistics_triggered();
648 
649     void openStatisticsTreeDialog(const gchar *abbr);
650     void on_actionStatistics29WestTopics_Advertisements_by_Topic_triggered();
651     void on_actionStatistics29WestTopics_Advertisements_by_Source_triggered();
652     void on_actionStatistics29WestTopics_Advertisements_by_Transport_triggered();
653     void on_actionStatistics29WestTopics_Queries_by_Topic_triggered();
654     void on_actionStatistics29WestTopics_Queries_by_Receiver_triggered();
655     void on_actionStatistics29WestTopics_Wildcard_Queries_by_Pattern_triggered();
656     void on_actionStatistics29WestTopics_Wildcard_Queries_by_Receiver_triggered();
657     void on_actionStatistics29WestQueues_Advertisements_by_Queue_triggered();
658     void on_actionStatistics29WestQueues_Advertisements_by_Source_triggered();
659     void on_actionStatistics29WestQueues_Queries_by_Queue_triggered();
660     void on_actionStatistics29WestQueues_Queries_by_Receiver_triggered();
661     void on_actionStatistics29WestUIM_Streams_triggered();
662     void on_actionStatistics29WestLBTRM_triggered();
663     void on_actionStatistics29WestLBTRU_triggered();
664     void on_actionStatisticsANCP_triggered();
665     void on_actionStatisticsBACappInstanceId_triggered();
666     void on_actionStatisticsBACappIP_triggered();
667     void on_actionStatisticsBACappObjectId_triggered();
668     void on_actionStatisticsBACappService_triggered();
669     void on_actionStatisticsCollectd_triggered();
670     void statCommandConversations(const char *arg = NULL, void *userdata = NULL);
671     void on_actionStatisticsConversations_triggered();
672     void statCommandEndpoints(const char *arg = NULL, void *userdata = NULL);
673     void on_actionStatisticsEndpoints_triggered();
674     void on_actionStatisticsHART_IP_triggered();
675     void on_actionStatisticsHTTPPacketCounter_triggered();
676     void on_actionStatisticsHTTPRequests_triggered();
677     void on_actionStatisticsHTTPLoadDistribution_triggered();
678     void on_actionStatisticsHTTPRequestSequences_triggered();
679     void on_actionStatisticsPacketLengths_triggered();
680     void statCommandIOGraph(const char *, void *);
681     void on_actionStatisticsIOGraph_triggered();
682     void on_actionStatisticsSametime_triggered();
683     void on_actionStatisticsDNS_triggered();
684     void actionStatisticsPlugin_triggered();
685     void on_actionStatisticsHpfeeds_triggered();
686     void on_actionStatisticsHTTP2_triggered();
687 
688     RtpStreamDialog *openTelephonyRtpStreamsDialog();
689     RtpPlayerDialog *openTelephonyRtpPlayerDialog();
690     VoipCallsDialog *openTelephonyVoipCallsDialogVoip();
691     VoipCallsDialog *openTelephonyVoipCallsDialogSip();
692     RtpAnalysisDialog *openTelephonyRtpAnalysisDialog();
693     void on_actionTelephonyVoipCalls_triggered();
694     void on_actionTelephonyGsmMapSummary_triggered();
695     void statCommandLteMacStatistics(const char *arg, void *);
696     void on_actionTelephonyLteRlcStatistics_triggered();
697     void statCommandLteRlcStatistics(const char *arg, void *);
698     void on_actionTelephonyLteMacStatistics_triggered();
699     void on_actionTelephonyLteRlcGraph_triggered();
700     void on_actionTelephonyIax2StreamAnalysis_triggered();
701     void on_actionTelephonyISUPMessages_triggered();
702     void on_actionTelephonyMtp3Summary_triggered();
703     void on_actionTelephonyOsmuxPacketCounter_triggered();
704     void on_actionTelephonyRtpStreams_triggered();
705     void on_actionTelephonyRtpStreamAnalysis_triggered();
706     void on_actionTelephonyRtpPlayer_triggered();
707     void on_actionTelephonyRTSPPacketCounter_triggered();
708     void on_actionTelephonySMPPOperations_triggered();
709     void on_actionTelephonyUCPMessages_triggered();
710     void on_actionTelephonyF1APMessages_triggered();
711     void on_actionTelephonyNGAPMessages_triggered();
712     void on_actionTelephonySipFlows_triggered();
713 
714     void on_actionBluetoothATT_Server_Attributes_triggered();
715     void on_actionBluetoothDevices_triggered();
716     void on_actionBluetoothHCI_Summary_triggered();
717 
718     void on_actionToolsFirewallAclRules_triggered();
719     void on_actionToolsCredentials_triggered();
720 
721     void externalMenuItem_triggered();
722 
723     void on_actionAnalyzeShowPacketBytes_triggered();
724 
725     void on_actionContextWikiProtocolPage_triggered();
726     void on_actionContextFilterFieldReference_triggered();
727 
728     void extcap_options_finished(int result);
729     void showExtcapOptionsDialog(QString & device_name);
730 
731     QString findRtpStreams(QVector<rtpstream_id_t *> *stream_ids, bool reverse);
732 
733     friend WiresharkApplication;
734 };
735 
736 #endif // MAINWINDOW_H
737