WS_SYSTEM=`uname -s`
fi
-# path to the Wireshark binaries, only used for the settings below
+
+# Path to the Wireshark binaries, only used for the settings below
+WS_BIN_PATH=..
+
+# Are we allowed to open interfaces or capture on this system?
+SKIP_CAPTURE=${SKIP_CAPTURE:-1}
+
+# Override the last two items if we're running Windows
if [ "$WS_SYSTEM" = "Windows" ] ; then
WS_BIN_PATH=../wireshark-gtk2
-else
- WS_BIN_PATH=..
+ SKIP_CAPTURE=0
fi
# Tweak the following to your liking.
# if you need promiscuous mode, comment this line out
TRAFFIC_CAPTURE_PROMISC=-p
-# only test capturing from a fifo if we're not on Windows
-# and we have a mkfifo. (Windows cygwin has a mkfifo but
-# Windows dumpcap & etc use Windows named pipes which
-# are different than the cygwin named pipes).
-#
+# only test capturing from a fifo if we're not on Windows
+# and we have a mkfifo. (Windows cygwin has a mkfifo but
+# Windows dumpcap & etc use Windows named pipes which
+# are different than the cygwin named pipes).
+#
if [ "$WS_SYSTEM" != "Windows" ] && which mkfifo &>/dev/null ; then
TEST_FIFO=1
fi
EXIT_COMMAND_LINE=1
EXIT_ERROR=2
-case $WS_SYSTEM in
- Windows|SunOS) SKIP_CAPTURE=0 ;;
- *) SKIP_CAPTURE=1 ;;
-esac
-
capture_test_output_print() {
wait
for f in "$@"; do
# Generate some traffic for quiet networks.
# This will have to be adjusted for non-Windows systems.
{
- date
+ date
for (( x=20; x<=50; x++ )) # in effect: number the packets
do
# How does ping _not_ have a standard set of arguments?
clopts_suite_interface_chars() {
for index in D L
do
- if [ "$WS_SYSTEM" = "Windows" ] ; then
+ if [ "$SKIP_CAPTURE" -eq 0 ] ; then
test_step_add "Valid TShark parameter -$index, exit status must be $EXIT_OK" "test_single_char_options $TSHARK $index $EXIT_OK"
else
test_step_add "Invalid permissions for TShark parameter -$index, exit status must be $EXIT_ERROR" "test_single_char_options $TSHARK $index $EXIT_ERROR"