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
30 export CYGWIN="$CYGWIN error_start=c:\cygwin\bin\dumper.exe -d %1 %2"
36 # Path to the Wireshark binaries, only used for the settings below
39 # Are we allowed to open interfaces or capture on this system?
40 SKIP_CAPTURE=${SKIP_CAPTURE:-1}
42 # Override the last two items if we're running Windows
43 if [ "$WS_SYSTEM" = "Windows" ] ; then
44 WS_BIN_PATH=../wireshark-gtk2
48 # Tweak the following to your liking.
49 WIRESHARK=$WS_BIN_PATH/wireshark
50 TSHARK=$WS_BIN_PATH/tshark
51 CAPINFOS=$WS_BIN_PATH/capinfos
52 DUMPCAP=$WS_BIN_PATH/dumpcap
54 # interface with at least a few packets/sec traffic on it
55 # (e.g. start a web radio to generate some traffic :-)
56 # an interfaces index (1 based) should do well for recent devbuilds
57 if [ "$WS_SYSTEM" = "Windows" -a -z "$TRAFFIC_CAPTURE_IFACE" ] ; then
58 # Try to fetch the first Ethernet interface.
59 TRAFFIC_CAPTURE_IFACE=`$TSHARK -D 2>&1 | \
60 egrep 'Ethernet|Network Connection|VMware' | \
63 TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-1}
65 # time to capture some traffic (in seconds)
66 # (you may increase this if you get errors caused by very low traffic)
67 TRAFFIC_CAPTURE_DURATION=60
69 # the default is to not capture in promiscuous mode
70 # (this makes known trouble with some Windows WLAN adapters)
71 # if you need promiscuous mode, comment this line out
72 TRAFFIC_CAPTURE_PROMISC=-p
74 # only test capturing from a fifo if we're not on Windows
75 # and we have a mkfifo. (Windows cygwin has a mkfifo but
76 # Windows dumpcap & etc use Windows named pipes which
77 # are different than the cygwin named pipes).
79 if [ "$WS_SYSTEM" != "Windows" ] && which mkfifo &>/dev/null ; then
83 # Display our environment
85 ##printf "\n ------- Info =-----------------\n"
86 ##printf "Syms :$WS_SYSTEM: :$TRAFFIC_CAPTURE_IFACE: :$SKIP_CAPTURE: :$TEST_FIFO:\n"
88 ##ls -l $WIRESHARK $TSHARK $DUMPCAP
89 ##ls -l $(which wireshark) $(which tshark) $(which dumpcap)
90 ##printf " ----------------------------------\n\n"