Replace "-Q" with "WIRESHARK_QUIT_AFTER_CAPTURE" as discussed in bug 6256.
svn path=/trunk/; revision=38784
This commit is contained in:
parent
df5fdf9e63
commit
db240c2b5e
|
@ -93,7 +93,7 @@ capture_opts_init(capture_options *capture_opts, void *cf)
|
|||
#endif
|
||||
capture_opts->real_time_mode = TRUE;
|
||||
capture_opts->show_info = TRUE;
|
||||
capture_opts->quit_after_cap = FALSE;
|
||||
capture_opts->quit_after_cap = getenv("WIRESHARK_QUIT_AFTER_CAPTURE") ? TRUE : FALSE;
|
||||
capture_opts->restart = FALSE;
|
||||
|
||||
capture_opts->multi_files_on = FALSE;
|
||||
|
@ -638,10 +638,6 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_
|
|||
case 'P': /* Use pcap format */
|
||||
capture_opts->use_pcapng = FALSE;
|
||||
break;
|
||||
case 'Q': /* Quit after capture (just capture to file) */
|
||||
capture_opts->quit_after_cap = TRUE;
|
||||
*start_capture = TRUE; /*** -Q implies -k !! ***/
|
||||
break;
|
||||
#ifdef HAVE_PCAP_REMOTE
|
||||
case 'r':
|
||||
if (capture_opts->ifaces->len > 0) {
|
||||
|
|
|
@ -50,67 +50,70 @@
|
|||
<example id="ChCustEx1">
|
||||
<title>Help information available from Wireshark</title>
|
||||
<programlisting>
|
||||
Wireshark 1.3.2
|
||||
Wireshark 1.7.0 (SVN Rev 38783 from /trunk)
|
||||
Interactively dump and analyze network traffic.
|
||||
See http://www.wireshark.org for more information.
|
||||
|
||||
Copyright 1998-2009 Gerald Combs <gerald@wireshark.org> and contributors.
|
||||
Copyright 1998-2011 Gerald Combs <gerald@wireshark.org> and contributors.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Usage: wireshark [options] ... [ <infile> ]
|
||||
Usage: wireshark [options] ... [ <infile> ]
|
||||
|
||||
Capture interface:
|
||||
-i <interface> name or idx of interface (def: first non-loopback)
|
||||
-f <capture filter> packet filter in libpcap filter syntax
|
||||
-s <snaplen> packet snapshot length (def: 65535)
|
||||
-i <interface> name or idx of interface (def: first non-loopback)
|
||||
-f <capture filter> packet filter in libpcap filter syntax
|
||||
-s <snaplen> packet snapshot length (def: 65535)
|
||||
-p don't capture in promiscuous mode
|
||||
-k start capturing immediately (def: do nothing)
|
||||
-Q quit Wireshark after capturing
|
||||
-S update packet display when new packets are captured
|
||||
-l turn on automatic scrolling while -S is in use
|
||||
-B <buffer size> size of kernel buffer (def: 1MB)
|
||||
-y <link type> link layer type (def: first appropriate)
|
||||
-I capture in monitor mode, if available
|
||||
-B <buffer size> size of kernel buffer (def: 1MB)
|
||||
-y <link type> link layer type (def: first appropriate)
|
||||
-D print list of interfaces and exit
|
||||
-L print list of link-layer types of iface and exit
|
||||
|
||||
Capture stop conditions:
|
||||
-c <packet count> stop after n packets (def: infinite)
|
||||
-a <autostop cond.> ... duration:NUM - stop after NUM seconds
|
||||
-c <packet count> stop after n packets (def: infinite)
|
||||
-a <autostop cond.> ... duration:NUM - stop after NUM seconds
|
||||
filesize:NUM - stop this file after NUM KB
|
||||
files:NUM - stop after NUM files
|
||||
Capture output:
|
||||
-b <ringbuffer opt.> ... duration:NUM - switch to next file after NUM secs
|
||||
-b <ringbuffer opt.> ... duration:NUM - switch to next file after NUM secs
|
||||
filesize:NUM - switch to next file after NUM KB
|
||||
files:NUM - ringbuffer: replace after NUM files
|
||||
Input file:
|
||||
-r <infile> set the filename to read from (no pipes or stdin!)
|
||||
-r <infile> set the filename to read from (no pipes or stdin!)
|
||||
|
||||
Processing:
|
||||
-R <read filter> packet filter in Wireshark display filter syntax
|
||||
-R <read filter> packet filter in Wireshark display filter syntax
|
||||
-n disable all name resolutions (def: all enabled)
|
||||
-N <name resolve flags> enable specific name resolution(s): "mntC"
|
||||
-N <name resolve flags> enable specific name resolution(s): "mntC"
|
||||
|
||||
User interface:
|
||||
-C <config profile> start with specified configuration profile
|
||||
-g <packet number> go to specified packet number after "-r"
|
||||
-J <jump filter> jump to the first packet matching the (display) filter
|
||||
-C <config profile> start with specified configuration profile
|
||||
-g <packet number> go to specified packet number after "-r"
|
||||
-J <jump filter> jump to the first packet matching the (display)
|
||||
filter
|
||||
-j search backwards for a matching packet after "-J"
|
||||
-m <font> set the font name used for most text
|
||||
-m <font> set the font name used for most text
|
||||
-t ad|a|r|d|dd|e output format of time stamps (def: r: rel. to first)
|
||||
-X <key>:<value> eXtension options, see man page for details
|
||||
-z <statistics> show various statistics, see man page for details
|
||||
-u s|hms output format of seconds (def: s: seconds)
|
||||
-X <key>:<value> eXtension options, see man page for details
|
||||
-z <statistics> show various statistics, see man page for details
|
||||
|
||||
Output:
|
||||
-w <outfile|-> set the output filename (or '-' for stdout)
|
||||
-w <outfile|-> set the output filename (or '-' for stdout)
|
||||
|
||||
Miscellaneous:
|
||||
-h display this help and exit
|
||||
-v display version info and exit
|
||||
-P <key>:<path> persconf:path - personal configuration files
|
||||
-P <key>:<path> persconf:path - personal configuration files
|
||||
persdata:path - personal data files
|
||||
-o <name>:<value> ... override preference or recent setting
|
||||
-K <keytab> keytab file to use for kerberos decryption
|
||||
-o <name>:<value> ... override preference or recent setting
|
||||
-K <keytab> keytab file to use for kerberos decryption
|
||||
--display=DISPLAY X display to use
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -1723,5 +1726,3 @@ standard libpcap format.
|
|||
|
||||
</chapter>
|
||||
<!-- End of WSUG Chapter Customizing -->
|
||||
|
||||
|
||||
|
|
|
@ -1155,7 +1155,6 @@ print_usage(gboolean print_ver) {
|
|||
fprintf(output, " -s <snaplen> packet snapshot length (def: 65535)\n");
|
||||
fprintf(output, " -p don't capture in promiscuous mode\n");
|
||||
fprintf(output, " -k start capturing immediately (def: do nothing)\n");
|
||||
fprintf(output, " -Q quit Wireshark after capturing\n");
|
||||
fprintf(output, " -S update packet display when new packets are captured\n");
|
||||
fprintf(output, " -l turn on automatic scrolling while -S is in use\n");
|
||||
#ifdef HAVE_PCAP_CREATE
|
||||
|
@ -2071,7 +2070,7 @@ main(int argc, char *argv[])
|
|||
#define OPTSTRING_I ""
|
||||
#endif
|
||||
|
||||
#define OPTSTRING "a:b:" OPTSTRING_B "c:C:Df:g:Hhi:" OPTSTRING_I "jJ:kK:lLm:nN:o:P:pQr:R:Ss:t:u:vw:X:y:z:"
|
||||
#define OPTSTRING "a:b:" OPTSTRING_B "c:C:Df:g:Hhi:" OPTSTRING_I "jJ:kK:lLm:nN:o:P:pr:R:Ss:t:u:vw:X:y:z:"
|
||||
|
||||
static const char optstring[] = OPTSTRING;
|
||||
|
||||
|
@ -2452,7 +2451,6 @@ main(int argc, char *argv[])
|
|||
#ifdef HAVE_PCAP_CREATE
|
||||
case 'I': /* Capture in monitor mode, if available */
|
||||
#endif
|
||||
case 'Q': /* Quit after capture (just capture to file) */
|
||||
case 's': /* Set the snapshot (capture) length */
|
||||
case 'S': /* "Sync" mode: used for following file ala tail -f */
|
||||
case 'w': /* Write to capture file xxx */
|
||||
|
|
|
@ -80,6 +80,9 @@ if [ "$WS_SYSTEM" != "Windows" ] && which mkfifo &>/dev/null ; then
|
|||
TEST_FIFO=1
|
||||
fi
|
||||
|
||||
# Tell Wireshark to quit after capuring packets.
|
||||
export WIRESHARK_QUIT_AFTER_CAPTURE="True"
|
||||
|
||||
# Display our environment
|
||||
|
||||
##printf "\n ------- Info =-----------------\n"
|
||||
|
|
|
@ -386,8 +386,9 @@ capture_step_snapshot() {
|
|||
}
|
||||
|
||||
wireshark_capture_suite() {
|
||||
# Q: quit after cap, k: start capture immediately
|
||||
DUT="$WIRESHARK -Q -k"
|
||||
# k: start capture immediately
|
||||
# WIRESHARK_QUIT_AFTER_CAPTURE needs to be set.
|
||||
DUT="$WIRESHARK -k"
|
||||
test_step_add "Capture 10 packets" capture_step_10packets
|
||||
# piping to stdout doesn't work with Wireshark and capturing!
|
||||
#test_step_add "Capture 10 packets using stdout: -w -" capture_step_10packets_stdout
|
||||
|
|
Loading…
Reference in New Issue