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);
229 void captureFileReadStarted(
const QString &action);
231 void addMenusandSubmenus(QAction *action, QMenu *cur_menu);
232 void removeMenusandSubmenus(QAction *action, QMenu *cur_menu);
233 void addMenuActions(QList<QAction *> &actions,
int menu_group);
234 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
235 void goToConversationFrame(
bool go_next,
bool start_current =
true);
236 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
240 void closePacketDialogs();
243 void fieldFilterChanged(
const QByteArray field_filter);
249 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
271 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
272 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
273 void filterPackets(QString new_filter = QString(),
bool force =
false);
274 void layoutToolbars();
275 void updatePreferenceActions();
276 void updateRecentActions();
278 void setTitlebarForCaptureFile();
280 void showCaptureOptionsDialog();
290 void captureFileOpened();
291 void captureFileReadFinished();
292 void captureFileClosing();
293 void captureFileClosed();
295 void launchRLCGraph(
bool channelKnown, uint8_t RAT, uint16_t ueid, uint8_t rlcMode,
296 uint16_t channelType, uint16_t channelId, uint8_t direction);
298 void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
299 void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
300 void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
301 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
302 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
303 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
304 void rtpStreamsDialogSelectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
305 void rtpStreamsDialogDeselectRtpStreams(QVector<rtpstream_id_t *> stream_ids);
311 void initViewColorizeMenu();
312 void initConversationMenus();
313 static bool addExportObjectsMenuItem(
const void *key,
void *value,
void *userdata);
314 void initExportObjectsMenus();
315 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
316 void initFollowStreamMenus();
324 void startCapture(QStringList);
326 void pushLiveCaptureInProgress();
327 void popLiveCaptureInProgress();
330 void loadWindowGeometry();
331 void saveWindowGeometry();
332 void mainStackChanged(
int);
333 void updateRecentCaptures();
334 void recentActionTriggered();
335 void addPacketComment();
336 void editPacketComment();
337 void deletePacketComment();
338 void deleteCommentsFromPackets();
339 QString commentToMenuText(QString text,
int max_len = 40);
340 void setEditCommentsMenu();
341 void setMenusForSelectedPacket();
343 void interfaceSelectionChanged();
344 void captureFilterSyntaxChanged(
bool valid);
345 void redissectPackets();
346 void checkDisplayFilter();
347 void fieldsChanged();
348 void reloadLuaPlugins();
349 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
350 void showColumnEditor(
int column);
351 void showPreferenceEditor();
352 void addStatsPluginsToMenu();
353 void addDynamicMenus();
354 void reloadDynamicMenus();
355 void addPluginIFStructures();
356 QMenu * searchSubMenu(QString objectName);
357 void activatePluginIFToolbar(
bool);
359 void startInterfaceCapture(
bool valid,
const QString capture_filter);
361 void applyGlobalCommandLineOptions();
362 void setFeaturesEnabled(
bool enabled =
true);
364 void on_actionNewDisplayFilterExpression_triggered();
365 void onFilterSelected(QString,
bool);
366 void onFilterPreferences();
367 void onFilterEdit(
int uatIndex);
370 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
377 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
384 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
385 void openTapParameterDialog();
387#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
388 void softwareUpdateRequested();
394 void connectFileMenuActions();
395 void exportPacketBytes();
397 void stripPacketHeaders();
398 void exportTLSSessionKeys();
401 void connectEditMenuActions();
402 void copySelectedItems(WiresharkMainWindow::CopySelected selection_type);
404 void editTimeShift();
405 void editConfigurationProfiles();
406 void editTimeShiftFinished(
int);
408 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
409 void deleteAllPacketComments();
410 void deleteAllPacketCommentsFinished(
int result);
411 void injectSecrets();
412 void discardAllSecrets();
413 void discardAllSecretsFinished(
int result);
414 void showPreferencesDialog(QString module_name);
416 void connectViewMenuActions();
417 void showHideMainWidgets(QAction *action);
418 void setTimestampFormat(QAction *action);
419 void setTimestampPrecision(QAction *action);
420 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
421 void editResolvedName();
422 void setNameResolution();
424 void showColoringRulesDialog();
425 void colorizeConversation(
bool create_rule =
false);
426 void colorizeActionTriggered();
427 void openPacketDialog(
bool from_reference =
false);
428 void reloadCaptureFileAsFormatOrCapture();
429 void reloadCaptureFile();
431 void connectGoMenuActions();
433 void setPreviousFocus();
434 void resetPreviousFocus();
436 void connectCaptureMenuActions();
437 void startCaptureTriggered();
439 void connectAnalyzeMenuActions();
441 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
442 void applyFieldAsColumn();
444 void filterMenuAboutToShow();
446 void applyConversationFilter();
447 void applyExportObject();
449 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
450 void openFollowStreamDialog(
int proto_id);
451 void openIOGraph(
bool filtered, QVector<uint> conv_ids, QVector<QVariant> conv_agg);
453 void statCommandExpertInfo(
const char *,
void *);
455 void connectHelpMenuActions();
457#ifdef HAVE_SOFTWARE_UPDATE
458 void checkForUpdates();
461 void goToCancelClicked();
462 void goToGoClicked();
463 void goToLineEditReturnPressed();
465 void connectStatisticsMenuActions();
467 void showResolvedAddressesDialog();
468 void showConversationsDialog();
469 void showEndpointsDialog();
471 void openTcpStreamDialog(
int graph_type);
472 void openSCTPAllAssocsDialog();
473 void on_actionSCTPShowAllAssociations_triggered();
474 void on_actionSCTPAnalyseThisAssociation_triggered();
475 void on_actionSCTPFilterThisAssociation_triggered();
476 void statCommandMulticastStatistics(
const char *arg,
void *);
478 void statCommandWlanStatistics(
const char *arg,
void *);
480 void openStatisticsTreeDialog(
const char *abbr);
481 void statCommandIOGraph(
const char *,
void *);
482 void showIOGraphDialog(io_graph_item_unit_t value_units, QString);
484 void showPlotDialog(
const QString& y_field = QString(),
bool filtered =
false);
486 void connectTelephonyMenuActions();
491 void statCommandLteMacStatistics(
const char *arg,
void *);
492 void statCommandLteRlcStatistics(
const char *arg,
void *);
493 void openRtpStreamAnalysisDialog();
494 void openRtpPlayerDialog();
496 void connectWirelessMenuActions();
498 void connectToolsMenuActions();
500 void externalMenuItemTriggered();
502 void on_actionContextWikiProtocolPage_triggered();
503 void on_actionContextFilterFieldReference_triggered();
505 void extcap_options_finished(
int result);
506 void showExtcapOptionsDialog(QString & device_name,
bool startCaptureOnClose);
508 QString findRtpStreams(QVector<rtpstream_id_t *> *stream_ids,
bool reverse);
510 void openTLSKeylogDialog();