110 info_data_t *captureInfoData() {
return &info_data_; }
113 QMenu *createPopupMenu()
override;
115 CaptureFile *captureFile() {
return &capture_file_; }
117 void setFunnelMenus(
void);
118 void removeAdditionalToolbar(QString toolbarName);
120 void addInterfaceToolbar(
const iface_toolbar *toolbar_entry);
121 void removeInterfaceToolbar(
const char *menu_title);
123 QString getMwFileName();
124 void setMwFileName(QString fileName);
127 bool eventFilter(QObject *obj, QEvent *event)
override;
128 bool event(QEvent *event)
override;
129 void keyPressEvent(QKeyEvent *event)
override;
130 void closeEvent(QCloseEvent *event)
override;
131 void dragEnterEvent(QDragEnterEvent *event)
override;
132 void dropEvent(QDropEvent *event)
override;
133 void changeEvent(QEvent* event)
override;
139 MatchSelectedReplace,
147 enum FileCloseContext {
156 Ui::WiresharkMainWindow *main_ui_;
158#if defined(HAVE_LIBNL) && defined(HAVE_NL80211)
161 QWidget *previous_focus_;
163 QActionGroup *show_hide_actions_;
164 QActionGroup *time_display_actions_;
165 QActionGroup *time_precision_actions_;
167 QList<QPair<QAction *, bool> > freeze_actions_;
168 QPointer<QWidget> freeze_focus_;
169 QMap<QAction *, ts_type> td_actions;
170 QMap<QAction *, ts_precision> tp_actions;
177 bool capture_stopping_;
178 bool capture_filter_valid_;
181 CaptureOptionsDialog *capture_options_dialog_;
185#ifdef HAVE_SOFTWARE_UPDATE
186 QAction *update_action_;
189 QPoint dragStartPosition;
191 QPointer<TLSKeylogDialog> tlskeylog_dialog_;
196 void mergeCaptureFile();
197 void importCaptureFile();
198 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
199 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
200 void exportSelectedPackets();
201 void exportDissections(export_type_e export_type);
204 void fileAddExtension(QString &file_name,
int file_type, ws_compression_type compression_type);
206 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
207 void captureStop(
bool discard =
false);
209 void initMainToolbarIcons();
210 void initShowHideMainWidgets();
211 void initTimeDisplayFormatMenu();
212 void initTimePrecisionFormatMenu();
213 void initFreezeActions();
215 void setMenusForCaptureFile(
bool force_disable =
false)
override;
216 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
217 void setMenusForCaptureStopping();
218 void setForCapturedPackets(
bool have_captured_packets);
219 void setMenusForFileSet(
bool enable_list_files);
220 void updateStyleSheet();
222 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
224 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
225 QMenu* findOrAddMenu(QMenu *parent_menu,
const QStringList& menu_parts);
226 QMenu* findOrAddMenubar(
const QString menu_text);
228 void captureFileReadStarted(
const QString &action);
230 void addMenusandSubmenus(QAction *action, QMenu *cur_menu);
231 void removeMenusandSubmenus(QAction *action, QMenu *cur_menu);
232 void addMenuActions(QList<QAction *> &actions,
int menu_group);
233 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
234 void goToConversationFrame(
bool go_next,
bool start_current =
true);
235 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
239 void closePacketDialogs();
242 void fieldFilterChanged(
const QByteArray field_filter);
248 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
270 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
271 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
272 void filterPackets(QString new_filter = QString(),
bool force =
false)
override;
273 void layoutToolbars();
274 void updatePreferenceActions();
275 void updateRecentActions();
277 void setTitlebarForCaptureFile();
279 void showCaptureOptionsDialog();
289 void captureFileOpened();
290 void captureFileReadFinished();
291 void captureFileClosing();
292 void captureFileClosed();
294 void launchRLCGraph(
bool channelKnown, uint8_t RAT, uint16_t ueid, uint8_t rlcMode,
295 uint16_t channelType, uint16_t channelId, uint8_t direction);
297 void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
298 void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
299 void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
300 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
301 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
302 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
303 void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
304 void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
310 void initViewColorizeMenu();
311 void initConversationMenus();
312 static bool addExportObjectsMenuItem(
const void *key,
void *value,
void *userdata);
313 void initExportObjectsMenus();
314 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
315 void initFollowStreamMenus();
323 void startCapture(QStringList);
325 void pushLiveCaptureInProgress();
326 void popLiveCaptureInProgress();
328 void aggregationViewChanged(
bool enable)
const;
330 void loadWindowGeometry();
331 void saveWindowGeometry();
332 void mainStackChanged(
int);
333 void updateRecentCaptures();
334 void addPacketComment();
335 void editPacketComment();
336 void deletePacketComment();
337 void deleteCommentsFromPackets();
338 QString commentToMenuText(QString text,
int max_len = 40);
339 void setEditCommentsMenu();
340 void setMenusForSelectedPacket();
342 void interfaceSelectionChanged();
343 void captureFilterSyntaxChanged(
bool valid);
344 void redissectPackets();
345 void checkDisplayFilter();
346 void fieldsChanged();
347 void reloadLuaPlugins();
348 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
349 void showColumnEditor(
int column);
350 void showPreferenceEditor();
351 void addStatsPluginsToMenu();
352 void addDynamicMenus();
353 void reloadDynamicMenus();
354 void addPluginIFStructures();
355 QMenu * searchSubMenu(QString objectName);
356 void activatePluginIFToolbar(
bool);
358 void startInterfaceCapture(
bool valid,
const QString capture_filter);
360 void applyGlobalCommandLineOptions();
361 void setFeaturesEnabled(
bool enabled =
true);
363 void on_actionNewDisplayFilterExpression_triggered();
364 void onFilterSelected(QString,
bool);
365 void onFilterPreferences();
366 void onFilterEdit(
int uatIndex);
369 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
376 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
383 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
384 void openTapParameterDialog();
386#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
387 void softwareUpdateRequested();
393 void connectFileMenuActions();
394 void exportPacketBytes();
396 void stripPacketHeaders();
397 void exportTLSSessionKeys();
400 void connectEditMenuActions();
401 void copySelectedItems(WiresharkMainWindow::CopySelected selection_type);
403 void editTimeShift();
404 void editConfigurationProfiles();
405 void editTimeShiftFinished(
int);
407 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
408 void deleteAllPacketComments();
409 void deleteAllPacketCommentsFinished(
int result);
410 void injectSecrets(
const char* proto_name,
const char* wiki_link);
411 void discardAllSecrets();
412 void discardAllSecretsFinished(
int result);
413 void showPreferencesDialog(QString module_name)
override;
415 void connectViewMenuActions();
416 void showHideMainWidgets(QAction *action);
417 void setTimestampFormat(QAction *action);
418 void setTimestampPrecision(QAction *action);
419 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
420 void editResolvedName();
421 void setNameResolution();
423 void showColoringRulesDialog();
424 void colorizeConversation(
bool create_rule =
false);
425 void colorizeActionTriggered();
426 void openPacketDialog(
bool from_reference =
false);
427 void reloadCaptureFileAsFormatOrCapture();
428 void reloadCaptureFile();
430 void connectGoMenuActions();
432 void setPreviousFocus();
433 void resetPreviousFocus();
435 void connectCaptureMenuActions();
436 void startCaptureTriggered();
438 void connectAnalyzeMenuActions();
440 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
441 void applyFieldAsColumn();
443 void filterMenuAboutToShow();
445 void applyConversationFilter();
446 void applyExportObject();
448 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
449 void openFollowStreamDialog(
int proto_id);
450 void openIOGraph(
bool filtered, QVector<uint> conv_ids, QVector<QVariant> conv_agg);
452 void statCommandExpertInfo(
const char *,
void *);
454 void connectHelpMenuActions();
456#ifdef HAVE_SOFTWARE_UPDATE
457 void checkForUpdates();
460 void goToCancelClicked();
461 void goToGoClicked();
462 void goToLineEditReturnPressed();
464 void connectStatisticsMenuActions();
466 void showResolvedAddressesDialog();
467 void showConversationsDialog();
468 void showEndpointsDialog();
470 void openTcpStreamDialog(
int graph_type);
471 void openSCTPAllAssocsDialog();
472 void on_actionSCTPShowAllAssociations_triggered();
473 void on_actionSCTPAnalyseThisAssociation_triggered();
474 void on_actionSCTPFilterThisAssociation_triggered();
475 void statCommandMulticastStatistics(
const char *arg,
void *);
477 void statCommandWlanStatistics(
const char *arg,
void *);
479 void openStatisticsTreeDialog(
const char *abbr);
480 void statCommandIOGraph(
const char *,
void *);
481 void showIOGraphDialog(io_graph_item_unit_t value_units, QString)
override;
483 void showPlotDialog(
const QString& y_field = QString(),
bool filtered =
false)
override;
485 void connectTelephonyMenuActions();
490 void statCommandLteMacStatistics(
const char *arg,
void *);
491 void statCommandLteRlcStatistics(
const char *arg,
void *);
492 void openRtpStreamAnalysisDialog();
493 void openRtpPlayerDialog();
495 void connectWirelessMenuActions();
497 void connectToolsMenuActions();
499 void externalMenuItemTriggered();
501 void on_actionContextWikiProtocolPage_triggered();
502 void on_actionContextFilterFieldReference_triggered();
504 void extcap_options_finished(
int result);
505 void showExtcapOptionsDialog(QString & device_name,
bool startCaptureOnClose);
507 QString findRtpStreams(QVector<rtpstream_id_t *> *stream_ids,
bool reverse);
509 void openTLSKeylogDialog();