110 info_data_t *captureInfoData() {
return &info_data_; }
113 virtual QMenu *createPopupMenu();
115 CaptureFile *captureFile() {
return &capture_file_; }
117 void removeAdditionalToolbar(QString toolbarName);
119 void addInterfaceToolbar(
const iface_toolbar *toolbar_entry);
120 void removeInterfaceToolbar(
const char *menu_title);
122 QString getMwFileName();
123 void setMwFileName(QString fileName);
126 virtual bool eventFilter(QObject *obj, QEvent *event);
127 virtual bool event(QEvent *event);
128 virtual void keyPressEvent(QKeyEvent *event);
129 virtual void closeEvent(QCloseEvent *event);
130 virtual void dragEnterEvent(QDragEnterEvent *event);
131 virtual void dropEvent(QDropEvent *event);
132 virtual void changeEvent(QEvent* event);
137 MatchSelectedReplace,
145 enum FileCloseContext {
153 Ui::WiresharkMainWindow *main_ui_;
155#if defined(HAVE_LIBNL) && defined(HAVE_NL80211)
158 QWidget *previous_focus_;
160 QActionGroup *show_hide_actions_;
161 QActionGroup *time_display_actions_;
162 QActionGroup *time_precision_actions_;
164 QList<QPair<QAction *, bool> > freeze_actions_;
165 QPointer<QWidget> freeze_focus_;
166 QMap<QAction *, ts_type> td_actions;
167 QMap<QAction *, ts_precision> tp_actions;
174 bool capture_stopping_;
175 bool capture_filter_valid_;
178 CaptureOptionsDialog *capture_options_dialog_;
186#ifdef HAVE_SOFTWARE_UPDATE
187 QAction *update_action_;
190 QPoint dragStartPosition;
192 QPointer<TLSKeylogDialog> tlskeylog_dialog_;
197 void mergeCaptureFile();
198 void importCaptureFile();
199 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
200 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
201 void exportSelectedPackets();
202 void exportDissections(export_type_e export_type);
205 void fileAddExtension(QString &file_name,
int file_type, wtap_compression_type compression_type);
207 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
208 void captureStop(
bool discard =
false);
210 void initMainToolbarIcons();
211 void initShowHideMainWidgets();
212 void initTimeDisplayFormatMenu();
213 void initTimePrecisionFormatMenu();
214 void initFreezeActions();
216 void setMenusForCaptureFile(
bool force_disable =
false);
217 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
218 void setMenusForCaptureStopping();
219 void setForCapturedPackets(
bool have_captured_packets);
220 void setMenusForFileSet(
bool enable_list_files);
221 void setWindowIcon(
const QIcon &icon);
222 void updateStyleSheet();
224 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
226 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
227 QMenu* findOrAddMenu(QMenu *parent_menu,
const QStringList& menu_parts);
228 QMenu* findOrAddMenubar(
const QString menu_text);
230 void captureFileReadStarted(
const QString &action);
232 void addMenusandSubmenus(QAction *action, QMenu *cur_menu);
233 void removeMenusandSubmenus(QAction *action, QMenu *cur_menu);
234 void addMenuActions(QList<QAction *> &actions,
int menu_group);
235 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
236 void goToConversationFrame(
bool go_next,
bool start_current =
true);
237 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
241 void closePacketDialogs();
244 void fieldFilterChanged(
const QByteArray field_filter);
250 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
272 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
273 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
274 void filterPackets(QString new_filter = QString(),
bool force =
false);
275 void layoutToolbars();
276 void updatePreferenceActions();
277 void updateRecentActions();
279 void setTitlebarForCaptureFile();
281 void showCaptureOptionsDialog();
291 void captureFileOpened();
292 void captureFileReadFinished();
293 void captureFileClosing();
294 void captureFileClosed();
296 void launchRLCGraph(
bool channelKnown, uint8_t RAT, uint16_t ueid, uint8_t rlcMode,
297 uint16_t channelType, uint16_t channelId, uint8_t direction);
299 void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
300 void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
301 void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
302 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
303 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
304 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
305 void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
306 void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
312 void initViewColorizeMenu();
313 void initConversationMenus();
314 static bool addExportObjectsMenuItem(
const void *key,
void *value,
void *userdata);
315 void initExportObjectsMenus();
316 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
317 void initFollowStreamMenus();
325 void startCapture(QStringList);
327 void pushLiveCaptureInProgress();
328 void popLiveCaptureInProgress();
331 void loadWindowGeometry();
332 void saveWindowGeometry();
333 void mainStackChanged(
int);
334 void updateRecentCaptures();
335 void recentActionTriggered();
336 void addPacketComment();
337 void editPacketComment();
338 void deletePacketComment();
339 void deleteCommentsFromPackets();
340 QString commentToMenuText(QString text,
int max_len = 40);
341 void setEditCommentsMenu();
342 void setMenusForSelectedPacket();
344 void interfaceSelectionChanged();
345 void captureFilterSyntaxChanged(
bool valid);
346 void redissectPackets();
347 void checkDisplayFilter();
348 void fieldsChanged();
349 void reloadLuaPlugins();
350 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
351 void showColumnEditor(
int column);
352 void showPreferenceEditor();
353 void addStatsPluginsToMenu();
354 void addDynamicMenus();
355 void reloadDynamicMenus();
356 void addPluginIFStructures();
357 QMenu * searchSubMenu(QString objectName);
358 void activatePluginIFToolbar(
bool);
360 void startInterfaceCapture(
bool valid,
const QString capture_filter);
362 void applyGlobalCommandLineOptions();
363 void setFeaturesEnabled(
bool enabled =
true);
365 void on_actionNewDisplayFilterExpression_triggered();
366 void onFilterSelected(QString,
bool);
367 void onFilterPreferences();
368 void onFilterEdit(
int uatIndex);
371 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
378 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
385 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
386 void openTapParameterDialog();
388#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
389 void softwareUpdateRequested();
395 void connectFileMenuActions();
396 void exportPacketBytes();
398 void stripPacketHeaders();
399 void exportTLSSessionKeys();
402 void connectEditMenuActions();
403 void copySelectedItems(WiresharkMainWindow::CopySelected selection_type);
405 void editTimeShift();
406 void editConfigurationProfiles();
407 void editTimeShiftFinished(
int);
409 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
410 void deleteAllPacketComments();
411 void deleteAllPacketCommentsFinished(
int result);
412 void injectSecrets();
413 void discardAllSecrets();
414 void discardAllSecretsFinished(
int result);
415 void showPreferencesDialog(QString module_name);
417 void connectViewMenuActions();
418 void showHideMainWidgets(QAction *action);
419 void setTimestampFormat(QAction *action);
420 void setTimestampPrecision(QAction *action);
421 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
422 void editResolvedName();
423 void setNameResolution();
425 void showColoringRulesDialog();
426 void colorizeConversation(
bool create_rule =
false);
427 void colorizeActionTriggered();
428 void openPacketDialog(
bool from_reference =
false);
429 void reloadCaptureFileAsFormatOrCapture();
430 void reloadCaptureFile();
432 void connectGoMenuActions();
434 void setPreviousFocus();
435 void resetPreviousFocus();
437 void connectCaptureMenuActions();
438 void startCaptureTriggered();
440 void connectAnalyzeMenuActions();
442 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
443 void applyFieldAsColumn();
445 void filterMenuAboutToShow();
447 void applyConversationFilter();
448 void applyExportObject();
450 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
451 void openFollowStreamDialog(
int proto_id);
452 void openIOGraph(
bool filtered, QVector<uint> conv_ids, QVector<QVariant> conv_agg);
454 void statCommandExpertInfo(
const char *,
void *);
456 void connectHelpMenuActions();
458#ifdef HAVE_SOFTWARE_UPDATE
459 void checkForUpdates();
462 void goToCancelClicked();
463 void goToGoClicked();
464 void goToLineEditReturnPressed();
466 void connectStatisticsMenuActions();
468 void showResolvedAddressesDialog();
469 void showConversationsDialog();
470 void showEndpointsDialog();
472 void openTcpStreamDialog(
int graph_type);
473 void openSCTPAllAssocsDialog();
474 void on_actionSCTPShowAllAssociations_triggered();
475 void on_actionSCTPAnalyseThisAssociation_triggered();
476 void on_actionSCTPFilterThisAssociation_triggered();
477 void statCommandMulticastStatistics(
const char *arg,
void *);
479 void statCommandWlanStatistics(
const char *arg,
void *);
481 void openStatisticsTreeDialog(
const char *abbr);
482 void statCommandIOGraph(
const char *,
void *);
483 void showIOGraphDialog(io_graph_item_unit_t value_units, QString);
485 void showPlotDialog(
const QString& y_field = QString(),
bool filtered =
false);
487 void connectTelephonyMenuActions();
492 void statCommandLteMacStatistics(
const char *arg,
void *);
493 void statCommandLteRlcStatistics(
const char *arg,
void *);
494 void openRtpStreamAnalysisDialog();
495 void openRtpPlayerDialog();
497 void connectWirelessMenuActions();
499 void connectToolsMenuActions();
501 void externalMenuItemTriggered();
503 void on_actionContextWikiProtocolPage_triggered();
504 void on_actionContextFilterFieldReference_triggered();
506 void extcap_options_finished(
int result);
507 void showExtcapOptionsDialog(QString & device_name,
bool startCaptureOnClose);
509 QString findRtpStreams(QVector<rtpstream_id_t *> *stream_ids,
bool reverse);
511 void openTLSKeylogDialog();