forked from osmocom/wireshark
Start deprecating the capture info API.
The GTK+ UI has a capture info dialog which shows a summary of captured protocols, including IPX (!), NetBIOS (!!) and VINES (!!OMG!!). It's been disabled by default since 2006 (g59aa9e40). Remove the preference in the Qt UI capture pane. It's still available via the advanced prefs. Add comments in various parts of the code noting that the capture_info routines and structs are GTK+ only. Also note that if we *do* want to add a Qt capture info dialog we'll probably want to modernize the information we show. Change-Id: I3c63f6f01b60f0767fb33602a7f0c3b537dbde51 Reviewed-on: https://code.wireshark.org/review/10991 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
f06bbe37c1
commit
76dd8a27b7
|
@ -23,10 +23,16 @@
|
|||
|
||||
/** @file
|
||||
*
|
||||
* capture info functions
|
||||
* Capture info functions.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* GTK+ only.
|
||||
* If we add this to the Qt UI we should modernize the statistics we show.
|
||||
* At the very least we should remove or hide IPX and VINES.
|
||||
*/
|
||||
|
||||
#ifndef __CAPTURE_INFO_H__
|
||||
#define __CAPTURE_INFO_H__
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ typedef struct capture_options_tag {
|
|||
|
||||
/* GUI related */
|
||||
gboolean real_time_mode; /**< Update list of packets in real time */
|
||||
gboolean show_info; /**< show the info dialog */
|
||||
gboolean show_info; /**< show the info dialog. GTK+ only. */
|
||||
gboolean quit_after_cap; /**< Makes a "capture only mode". Implies -k */
|
||||
gboolean restart; /**< restart after closing is done */
|
||||
gchar *orig_save_file; /**< the original capture file name (saved for a restart) */
|
||||
|
|
|
@ -56,6 +56,11 @@ struct epan_range;
|
|||
((guint)(offset) + (guint)(len) > (guint)(offset) && \
|
||||
(guint)(offset) + (guint)(len) <= (guint)(captured_len))
|
||||
|
||||
/*
|
||||
* GTK+ only.
|
||||
* If we add this to the Qt UI we should modernize the statistics we show.
|
||||
* At the very least we should remove or hide IPX and VINES.
|
||||
*/
|
||||
typedef struct _packet_counts {
|
||||
gint sctp;
|
||||
gint tcp;
|
||||
|
|
|
@ -2280,6 +2280,7 @@ prefs_register_modules(void)
|
|||
"Save window maximized state at exit?",
|
||||
&prefs.gui_geometry_save_maximized);
|
||||
|
||||
/* GTK+ only */
|
||||
prefs_register_bool_preference(gui_module, "macosx_style",
|
||||
"Use OS X style",
|
||||
"Use OS X style (OS X with native GTK only)?",
|
||||
|
@ -2474,6 +2475,7 @@ prefs_register_modules(void)
|
|||
prefs_register_bool_preference(capture_module, "auto_scroll", "Scroll packet list during capture",
|
||||
"Scroll packet list during capture?", &prefs.capture_auto_scroll);
|
||||
|
||||
/* GTK+ only */
|
||||
prefs_register_bool_preference(capture_module, "show_info", "Show capture info dialog while capturing",
|
||||
"Show capture info dialog while capturing?", &prefs.capture_show_info);
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ prefs_to_capture_opts(void)
|
|||
/* the same applies to other preferences settings as well. */
|
||||
global_capture_opts.default_options.promisc_mode = prefs.capture_prom_mode;
|
||||
global_capture_opts.use_pcapng = prefs.capture_pcap_ng;
|
||||
global_capture_opts.show_info = prefs.capture_show_info;
|
||||
global_capture_opts.show_info = prefs.capture_show_info; /* GTK+ only */
|
||||
global_capture_opts.real_time_mode = prefs.capture_real_time;
|
||||
auto_scroll_live = prefs.capture_auto_scroll;
|
||||
#endif /* HAVE_LIBPCAP */
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#include "capture_info_dialog.h"
|
||||
#include "capture_info.h"
|
||||
|
||||
// This is effectively GTK+ only.
|
||||
// If we implement this here we should modernize the staticstis we show.
|
||||
|
||||
/* create the capture info dialog */
|
||||
/* will keep pointers to the fields in the counts parameter */
|
||||
void capture_info_ui_create(
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "ui/capture_ui_utils.h"
|
||||
#include "ui/ui_util.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <epan/prefs-int.h>
|
||||
|
||||
CapturePreferencesFrame::CapturePreferencesFrame(QWidget *parent) :
|
||||
|
@ -50,7 +49,6 @@ CapturePreferencesFrame::CapturePreferencesFrame(QWidget *parent) :
|
|||
pref_pcap_ng_ = prefFromPrefPtr(&prefs.capture_pcap_ng);
|
||||
pref_real_time_ = prefFromPrefPtr(&prefs.capture_real_time);
|
||||
pref_auto_scroll_ = prefFromPrefPtr(&prefs.capture_auto_scroll);
|
||||
pref_show_info_ = prefFromPrefPtr(&prefs.capture_show_info);
|
||||
|
||||
// Setting the left margin via a style sheet clobbers its
|
||||
// appearance.
|
||||
|
@ -108,7 +106,6 @@ void CapturePreferencesFrame::updateWidgets()
|
|||
ui->capturePcapNgCheckBox->setChecked(pref_pcap_ng_->stashed_val.boolval);
|
||||
ui->captureRealTimeCheckBox->setChecked(pref_real_time_->stashed_val.boolval);
|
||||
ui->captureAutoScrollCheckBox->setChecked(pref_auto_scroll_->stashed_val.boolval);
|
||||
ui->captureShowInfoCheckBox->setChecked(pref_show_info_->stashed_val.boolval);
|
||||
#endif // HAVE_LIBPCAP
|
||||
}
|
||||
|
||||
|
@ -138,11 +135,6 @@ void CapturePreferencesFrame::on_captureAutoScrollCheckBox_toggled(bool checked)
|
|||
pref_auto_scroll_->stashed_val.boolval = checked;
|
||||
}
|
||||
|
||||
void CapturePreferencesFrame::on_captureShowInfoCheckBox_toggled(bool checked)
|
||||
{
|
||||
pref_show_info_->stashed_val.boolval = checked;
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines
|
||||
*
|
||||
|
|
|
@ -47,7 +47,6 @@ private slots:
|
|||
void on_capturePcapNgCheckBox_toggled(bool checked);
|
||||
void on_captureRealTimeCheckBox_toggled(bool checked);
|
||||
void on_captureAutoScrollCheckBox_toggled(bool checked);
|
||||
void on_captureShowInfoCheckBox_toggled(bool checked);
|
||||
|
||||
private:
|
||||
Ui::CapturePreferencesFrame *ui;
|
||||
|
@ -57,7 +56,6 @@ private:
|
|||
pref_t *pref_pcap_ng_;
|
||||
pref_t *pref_real_time_;
|
||||
pref_t *pref_auto_scroll_;
|
||||
pref_t *pref_show_info_;
|
||||
|
||||
void updateWidgets();
|
||||
};
|
||||
|
|
|
@ -97,16 +97,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="captureShowInfoCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Show the capture summary dialog while capturing.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show the capture summary dialog while capturing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -122,5 +112,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in New Issue