3 # Configuration of the command line tests
7 # Wireshark - Network traffic analyzer
8 # By Gerald Combs <gerald@wireshark.org>
9 # Copyright 2005 Ulf Lamping
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 # Set WS_SYSTEM to our system type, e.g. Windows, Linux, Darwin
27 # http://support.microsoft.com/kb/100843
28 if [ -n "${OS#Windows}" ] ; then
35 # Path to the Wireshark binaries, only used for the settings below
38 # Are we allowed to open interfaces or capture on this system?
39 SKIP_CAPTURE=${SKIP_CAPTURE:-1}
41 # Override the last two items if we're running Windows
42 if [ "$WS_SYSTEM" = "Windows" ] ; then
43 WS_BIN_PATH=../wireshark-gtk2
47 # Tweak the following to your liking.
48 WIRESHARK=$WS_BIN_PATH/wireshark
49 TSHARK=$WS_BIN_PATH/tshark
50 CAPINFOS=$WS_BIN_PATH/capinfos
51 DUMPCAP=$WS_BIN_PATH/dumpcap
53 # interface with at least a few packets/sec traffic on it
54 # (e.g. start a web radio to generate some traffic :-)
55 # an interfaces index (1 based) should do well for recent devbuilds
56 if [ "$WS_SYSTEM" = "Windows" -a -z "$TRAFFIC_CAPTURE_IFACE" ] ; then
57 # Try to fetch the first Ethernet interface.
58 TRAFFIC_CAPTURE_IFACE=`$TSHARK -D | \
59 egrep 'Ethernet|Network Connection|VMware' | \
62 TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-1}
64 # time to capture some traffic (in seconds)
65 # (you may increase this if you get errors caused by very low traffic)
66 TRAFFIC_CAPTURE_DURATION=60
68 # the default is to not capture in promiscuous mode
69 # (this makes known trouble with some Windows WLAN adapters)
70 # if you need promiscuous mode, comment this line out
71 TRAFFIC_CAPTURE_PROMISC=-p
73 # only test capturing from a fifo if we're not on Windows
74 # and we have a mkfifo. (Windows cygwin has a mkfifo but
75 # Windows dumpcap & etc use Windows named pipes which
76 # are different than the cygwin named pipes).
78 if [ "$WS_SYSTEM" != "Windows" ] && which mkfifo &>/dev/null ; then
82 # Display our environment
84 ##printf "\n ------- Info =-----------------\n"
85 ##printf "Syms :$WS_SYSTEM: :$TRAFFIC_CAPTURE_IFACE: :$SKIP_CAPTURE: :$TEST_FIFO:\n"
87 ##ls -l $WIRESHARK $TSHARK $DUMPCAP
88 ##ls -l $(which wireshark) $(which tshark) $(which dumpcap)
89 ##printf " ----------------------------------\n\n"