Add a command option for dumpcap.

Change-Id: Ic9a4b35f5a6245e0100f93c890622674e44413c6
Reviewed-on: https://code.wireshark.org/review/1564
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
AndersBroman 2014-05-08 21:25:13 +02:00 committed by Anders Broman
parent d0cf9412bd
commit 379c9f25df
1 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,7 @@ VALID=0
PCAP=""
TOOL="memcheck"
while getopts ":2b:C:lmnpP:rtTYwcevW" OPTCHAR ; do
while getopts ":2b:C:lmnpP:rtTYwcevWd" OPTCHAR ; do
case $OPTCHAR in
2) COMMAND_ARGS="-2 $COMMAND_ARGS" ;;
b) BIN_DIR=$OPTARG ;;
@ -49,7 +49,7 @@ while getopts ":2b:C:lmnpP:rtTYwcevW" OPTCHAR ; do
r) REACHABLE="--show-reachable=yes" ;;
t) TRACK_ORIGINS="--track-origins=yes" ;;
T) COMMAND_ARGS="-Vx $COMMAND_ARGS" ;; # "build the Tree"
Y) COMMAND_ARGS="-Yframe $COMMAND_ARGS" ;; # Run with a read filter (but no tree)
Y) COMMAND_ARGS="-Y frame $COMMAND_ARGS" ;; # Run with a read filter (but no tree)
w) COMMAND=wireshark
COMMAND_ARGS="-nr" ;;
c) COMMAND=capinfos
@ -62,6 +62,9 @@ while getopts ":2b:C:lmnpP:rtTYwcevW" OPTCHAR ; do
W) COMMAND=wireshark
COMMAND_ARGS=""
VALID=1 ;;
d) COMMAND=dumpcap
COMMAND_ARGS="-i eth1 -a duration:10"
VALID=1 ;;
*) printf "Unknown option -$OPTARG!\n"
exit ;;
esac