aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/dumpcap.pod3
-rw-r--r--doc/tshark.pod3
-rw-r--r--ui/qt/capture_interfaces_dialog.cpp22
-rw-r--r--ui/qt/capture_interfaces_dialog.ui90
4 files changed, 101 insertions, 17 deletions
diff --git a/doc/dumpcap.pod b/doc/dumpcap.pod
index e25bda829b..5cb459a823 100644
--- a/doc/dumpcap.pod
+++ b/doc/dumpcap.pod
@@ -122,7 +122,8 @@ B<filesize>:I<value> switch to the next file after it reaches a size of
I<value> kB. Note that the filesize is limited to a maximum value of 2 GiB.
B<interval>:I<value> switch to the next file when the time is an exact
-multiple of I<value> seconds
+multiple of I<value> seconds. For example, use 3600 to switch to a new file
+every hour on the hour.
B<packets>:I<value> switch to the next file after it contains I<value>
packets.
diff --git a/doc/tshark.pod b/doc/tshark.pod
index 6f746927ff..de0226c630 100644
--- a/doc/tshark.pod
+++ b/doc/tshark.pod
@@ -269,7 +269,8 @@ B<filesize>:I<value> switch to the next file after it reaches a size of
I<value> kB. Note that the filesize is limited to a maximum value of 2 GiB.
B<interval>:I<value> switch to the next file when the time is an exact
-multiple of I<value> seconds
+multiple of I<value> seconds. For example, use 3600 to switch to a new file
+every hour on the hour.
B<packets>:I<value> switch to the next file after it contains I<value>
packets.
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp
index f3bdcbab72..cb837d4af2 100644
--- a/ui/qt/capture_interfaces_dialog.cpp
+++ b/ui/qt/capture_interfaces_dialog.cpp
@@ -554,7 +554,6 @@ void CaptureInterfacesDialog::updateInterfaces()
ui->PktSpinBox->setValue(global_capture_opts.file_packets);
}
ui->MBCheckBox->setChecked(global_capture_opts.has_autostop_filesize);
- ui->SecsCheckBox->setChecked(global_capture_opts.has_file_interval);
if (global_capture_opts.has_autostop_filesize) {
int value = global_capture_opts.autostop_filesize;
if (value > 1000000) {
@@ -586,8 +585,10 @@ void CaptureInterfacesDialog::updateInterfaces()
}
}
}
- if (global_capture_opts.has_file_interval) {
- int value = global_capture_opts.file_interval;
+
+ ui->SecsCheckBox->setChecked(global_capture_opts.has_file_duration);
+ if (global_capture_opts.has_file_duration) {
+ int value = global_capture_opts.file_duration;
if (value > 3600 && value % 3600 == 0) {
ui->SecsSpinBox->setValue(value / 3600);
ui->SecsComboBox->setCurrentIndex(2);
@@ -600,6 +601,21 @@ void CaptureInterfacesDialog::updateInterfaces()
}
}
+ ui->IntervalSecsCheckBox->setChecked(global_capture_opts.has_file_interval);
+ if (global_capture_opts.has_file_interval) {
+ int value = global_capture_opts.file_interval;
+ if (value > 3600 && value % 3600 == 0) {
+ ui->IntervalSecsSpinBox->setValue(value / 3600);
+ ui->IntervalSecsComboBox->setCurrentIndex(2);
+ } else if (value > 60 && value % 60 == 0) {
+ ui->IntervalSecsSpinBox->setValue(value / 60);
+ ui->IntervalSecsComboBox->setCurrentIndex(1);
+ } else {
+ ui->IntervalSecsSpinBox->setValue(value);
+ ui->IntervalSecsComboBox->setCurrentIndex(0);
+ }
+ }
+
if (global_capture_opts.has_ring_num_files) {
ui->RbSpinBox->setValue(global_capture_opts.ring_num_files);
ui->RbCheckBox->setCheckState(Qt::Checked);
diff --git a/ui/qt/capture_interfaces_dialog.ui b/ui/qt/capture_interfaces_dialog.ui
index eb0b915f5a..3755c6f3b7 100644
--- a/ui/qt/capture_interfaces_dialog.ui
+++ b/ui/qt/capture_interfaces_dialog.ui
@@ -250,10 +250,10 @@
<item>
<widget class="QGroupBox" name="gbNewFileAuto">
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Instead of using a single capture file, multiple files will be created.&lt;/p&gt;&lt;p&gt;The generated file names will contain an incrementing number and the start time of the capture.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Instead of using a single capture file, multiple files will be created.&lt;/p&gt;&lt;p&gt;The generated file names will contain an incrementing number and the start time of the capture.&lt;/p&gt;&lt;p&gt;NOTE: If enabled, at least one of the new-file criteria MUST be selected.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="title">
- <string>Create a new file automatically after…</string>
+ <string>Create a new file automatically…</string>
</property>
<property name="flat">
<bool>true</bool>
@@ -278,7 +278,10 @@
<item row="1" column="0">
<widget class="QCheckBox" name="PktCheckBox">
<property name="text">
- <string/>
+ <string>after</string>
+ </property>
+ <property name="toolTip">
+ <string>Switch to the next file after the specified number of packets have been captured.</string>
</property>
</widget>
</item>
@@ -308,14 +311,17 @@
<item row="2" column="0">
<widget class="QCheckBox" name="MBCheckBox">
<property name="text">
- <string/>
+ <string>after</string>
+ </property>
+ <property name="toolTip">
+ <string>Switch to the next file after the file size exceeds the specified file size.</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="MBSpinBox">
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If the selected file size is exceeded, capturing switches to the next file.&lt;/p&gt;&lt;p&gt;PLEASE NOTE: One option MUST be selected.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>Switch to the next file after the file size exceeds the specified file size.</string>
</property>
<property name="wrapping">
<bool>true</bool>
@@ -337,8 +343,7 @@
<item row="2" column="2">
<widget class="QComboBox" name="MBComboBox">
<property name="toolTip">
- <string>If the selected file size is exceeded, capturing switches to the next file.
-PLEASE NOTE: One option MUST be selected.</string>
+ <string>Switch to the next file after the file size exceeds the specified file size.</string>
</property>
<item>
<property name="text">
@@ -360,15 +365,17 @@ PLEASE NOTE: One option MUST be selected.</string>
<item row="3" column="0">
<widget class="QCheckBox" name="SecsCheckBox">
<property name="text">
- <string/>
+ <string>after</string>
+ </property>
+ <property name="toolTip">
+ <string>Switch to the next file when the time capturing to the current file exceeds the specified time.</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="SecsSpinBox">
<property name="toolTip">
- <string>If the selected file size is exceeded, capturing switches to the next file.
-PLEASE NOTE: One option MUST be selected.</string>
+ <string>Switch to the next file when the time capturing to the current file exceeds the specified time.</string>
</property>
<property name="wrapping">
<bool>true</bool>
@@ -390,8 +397,7 @@ PLEASE NOTE: One option MUST be selected.</string>
<item row="3" column="2">
<widget class="QComboBox" name="SecsComboBox">
<property name="toolTip">
- <string>If the selected file size is exceeded, capturing switches to the next file.
-PLEASE NOTE: One option MUST be selected.</string>
+ <string>Switch to the next file when the time capturing to the current file exceeds the specified time.</string>
</property>
<item>
<property name="text">
@@ -410,6 +416,66 @@ PLEASE NOTE: One option MUST be selected.</string>
</item>
</widget>
</item>
+ <item row="4" column="0">
+ <widget class="QCheckBox" name="IntervalSecsCheckBox">
+ <property name="text">
+ <string>when time is a multiple of</string>
+ </property>
+ <property name="toolTip">
+ <string>Switch to the next file when the (wall clock) time is an even multiple of the specified interval.
+For example, use 1 hour to have a new file created every hour on the hour.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QSpinBox" name="IntervalSecsSpinBox">
+ <property name="toolTip">
+ <string>Switch to the next file when the (wall clock) time is an even multiple of the specified interval.
+For example, use 1 hour to have a new file created every hour on the hour.</string>
+ </property>
+ <property name="wrapping">
+ <bool>true</bool>
+ </property>
+ <property name="buttonSymbols">
+ <enum>QAbstractSpinBox::PlusMinus</enum>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>1000000</number>
+ </property>
+ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QComboBox" name="IntervalSecsComboBox">
+ <property name="toolTip">
+ <string>Switch to the next file when the (wall clock) time is an even multiple of the specified interval.
+For example, use 1 hour to have a new file created every hour on the hour.</string>
+ </property>
+ <item>
+ <property name="text">
+ <string>seconds</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>minutes</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>hours</string>
+ </property>
+ </item>
+ <property name="currentIndex">
+ <number>2</number>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>