114 info_data_t *captureInfoData() {
return &info_data_; }
117 virtual QMenu *createPopupMenu();
119 CaptureFile *captureFile() {
return &capture_file_; }
121 void removeAdditionalToolbar(QString toolbarName);
123 void addInterfaceToolbar(
const iface_toolbar *toolbar_entry);
124 void removeInterfaceToolbar(
const char *menu_title);
126 QString getMwFileName();
127 void setMwFileName(QString fileName);
130 virtual bool eventFilter(QObject *obj, QEvent *event);
131 virtual bool event(QEvent *event);
132 virtual void keyPressEvent(QKeyEvent *event);
133 virtual void closeEvent(QCloseEvent *event);
134 virtual void dragEnterEvent(QDragEnterEvent *event);
135 virtual void dropEvent(QDropEvent *event);
136 virtual void changeEvent(QEvent* event);
141 MatchSelectedReplace,
149 enum FileCloseContext {
157 Ui::WiresharkMainWindow *main_ui_;
160 QMap<QString, QTextCodec *> text_codec_map_;
161#if defined(HAVE_LIBNL) && defined(HAVE_NL80211)
164 QWidget *previous_focus_;
166 QActionGroup *show_hide_actions_;
167 QActionGroup *time_display_actions_;
168 QActionGroup *time_precision_actions_;
170 QList<QPair<QAction *, bool> > freeze_actions_;
171 QPointer<QWidget> freeze_focus_;
172 QMap<QAction *, ts_type> td_actions;
173 QMap<QAction *, ts_precision> tp_actions;
180 bool capture_stopping_;
181 bool capture_filter_valid_;
182 bool use_capturing_title_;
185 CaptureOptionsDialog *capture_options_dialog_;
193#ifdef HAVE_SOFTWARE_UPDATE
194 QAction *update_action_;
197 QPoint dragStartPosition;
199 QPointer<TLSKeylogDialog> tlskeylog_dialog_;
204 void mergeCaptureFile();
205 void importCaptureFile();
206 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
207 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
208 void exportSelectedPackets();
209 void exportDissections(export_type_e export_type);
212 void fileAddExtension(QString &file_name,
int file_type, wtap_compression_type compression_type);
214 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
215 void captureStop(
bool discard =
false);
217 void findTextCodecs();
219 void initMainToolbarIcons();
220 void initShowHideMainWidgets();
221 void initTimeDisplayFormatMenu();
222 void initTimePrecisionFormatMenu();
223 void initFreezeActions();
225 void setTitlebarForCaptureInProgress();
226 void setMenusForCaptureFile(
bool force_disable =
false);
227 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
228 void setMenusForCaptureStopping();
229 void setForCapturedPackets(
bool have_captured_packets);
230 void setMenusForFileSet(
bool enable_list_files);
231 void setWindowIcon(
const QIcon &icon);
232 QString replaceWindowTitleVariables(QString title);
233 void updateStyleSheet();
235 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
237 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
238 QMenu* findOrAddMenu(QMenu *parent_menu,
const QStringList& menu_parts);
240 void captureFileReadStarted(
const QString &action);
242 void addMenuActions(QList<QAction *> &actions,
int menu_group);
243 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
244 void goToConversationFrame(
bool go_next,
bool start_current =
true);
245 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
249 void closePacketDialogs();
252 void fieldFilterChanged(
const QByteArray field_filter);
256 void captureActive(
int);
261 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
275 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
276 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
277 void filterPackets(QString new_filter = QString(),
bool force =
false);
278 void updateForUnsavedChanges();
279 void layoutToolbars();
280 void updatePreferenceActions();
281 void updateRecentActions();
283 void setTitlebarForCaptureFile();
284 void setWSWindowTitle(QString title = QString());
286 void showCaptureOptionsDialog();
296 void captureFileOpened();
297 void captureFileReadFinished();
298 void captureFileClosing();
299 void captureFileClosed();
301 void launchRLCGraph(
bool channelKnown, uint8_t RAT, uint16_t ueid, uint8_t rlcMode,
302 uint16_t channelType, uint16_t channelId, uint8_t direction);
304 void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
305 void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
306 void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
307 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
308 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
309 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
310 void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
311 void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
319 void initViewColorizeMenu();
320 void initConversationMenus();
321 static bool addExportObjectsMenuItem(
const void *key,
void *value,
void *userdata);
322 void initExportObjectsMenus();
323 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
324 void initFollowStreamMenus();
332 void startCapture(QStringList);
334 void pushLiveCaptureInProgress();
335 void popLiveCaptureInProgress();
338 void loadWindowGeometry();
339 void saveWindowGeometry();
340 void mainStackChanged(
int);
341 void updateRecentCaptures();
342 void recentActionTriggered();
343 void addPacketComment();
344 void editPacketComment();
345 void deletePacketComment();
346 void deleteCommentsFromPackets();
347 QString commentToMenuText(QString text,
int max_len = 40);
348 void setEditCommentsMenu();
349 void setMenusForSelectedPacket();
351 void interfaceSelectionChanged();
352 void captureFilterSyntaxChanged(
bool valid);
353 void redissectPackets();
354 void checkDisplayFilter();
355 void fieldsChanged();
356 void reloadLuaPlugins();
357 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
358 void showColumnEditor(
int column);
359 void showPreferenceEditor();
360 void addStatsPluginsToMenu();
361 void addDynamicMenus();
362 void reloadDynamicMenus();
363 void addPluginIFStructures();
364 QMenu * searchSubMenu(QString objectName);
365 void activatePluginIFToolbar(
bool);
366 void updateTitlebar();
368 void startInterfaceCapture(
bool valid,
const QString capture_filter);
370 void applyGlobalCommandLineOptions();
371 void setFeaturesEnabled(
bool enabled =
true);
373 void on_actionNewDisplayFilterExpression_triggered();
374 void onFilterSelected(QString,
bool);
375 void onFilterPreferences();
376 void onFilterEdit(
int uatIndex);
379 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
386 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
393 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
394 void openTapParameterDialog();
396#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
397 void softwareUpdateRequested();
413 void connectFileMenuActions();
414 void exportPacketBytes();
416 void stripPacketHeaders();
417 void exportTLSSessionKeys();
420 void connectEditMenuActions();
421 void copySelectedItems(WiresharkMainWindow::CopySelected selection_type);
423 void editTimeShift();
424 void editConfigurationProfiles();
425 void editTimeShiftFinished(
int);
427 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
428 void deleteAllPacketComments();
429 void deleteAllPacketCommentsFinished(
int result);
430 void injectSecrets();
431 void discardAllSecrets();
432 void discardAllSecretsFinished(
int result);
433 void showPreferencesDialog(QString module_name);
435 void connectViewMenuActions();
436 void showHideMainWidgets(QAction *action);
437 void setTimestampFormat(QAction *action);
438 void setTimestampPrecision(QAction *action);
439 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
440 void editResolvedName();
441 void setNameResolution();
443 void showColoringRulesDialog();
444 void colorizeConversation(
bool create_rule =
false);
445 void colorizeActionTriggered();
446 void openPacketDialog(
bool from_reference =
false);
447 void reloadCaptureFileAsFormatOrCapture();
448 void reloadCaptureFile();
450 void connectGoMenuActions();
452 void setPreviousFocus();
453 void resetPreviousFocus();
455 void connectCaptureMenuActions();
456 void startCaptureTriggered();
458 void connectAnalyzeMenuActions();
460 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
461 void applyFieldAsColumn();
463 void filterMenuAboutToShow();
465 void applyConversationFilter();
466 void applyExportObject();
468 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
469 void openFollowStreamDialog(
int proto_id);
471 void statCommandExpertInfo(
const char *,
void *);
473 void connectHelpMenuActions();
475#ifdef HAVE_SOFTWARE_UPDATE
476 void checkForUpdates();
479 void goToCancelClicked();
480 void goToGoClicked();
481 void goToLineEditReturnPressed();
483 void connectStatisticsMenuActions();
485 void showResolvedAddressesDialog();
486 void showConversationsDialog();
487 void showEndpointsDialog();
489 void openTcpStreamDialog(
int graph_type);
490 void openSCTPAllAssocsDialog();
491 void on_actionSCTPShowAllAssociations_triggered();
492 void on_actionSCTPAnalyseThisAssociation_triggered();
493 void on_actionSCTPFilterThisAssociation_triggered();
494 void statCommandMulticastStatistics(
const char *arg,
void *);
496 void statCommandWlanStatistics(
const char *arg,
void *);
498 void openStatisticsTreeDialog(
const char *abbr);
499 void statCommandIOGraph(
const char *,
void *);
500 void showIOGraphDialog(io_graph_item_unit_t value_units, QString);
502 void connectTelephonyMenuActions();
507 void statCommandLteMacStatistics(
const char *arg,
void *);
508 void statCommandLteRlcStatistics(
const char *arg,
void *);
509 void openRtpStreamAnalysisDialog();
510 void openRtpPlayerDialog();
512 void connectWirelessMenuActions();
514 void connectToolsMenuActions();
516 void externalMenuItemTriggered();
518 void on_actionContextWikiProtocolPage_triggered();
519 void on_actionContextFilterFieldReference_triggered();
521 void extcap_options_finished(
int result);
522 void showExtcapOptionsDialog(QString & device_name,
bool startCaptureOnClose);
524 QString findRtpStreams(QVector<rtpstream_id_t *> *stream_ids,
bool reverse);
526 void openTLSKeylogDialog();