add parameter dcerpc_info to PIDL_dissect_ipv?address()
[wireshark-wip.git] / test / config.sh
blob8fb5a66e3d35623eedc83c8fe7bc5a5f43323091
1 #!/bin/bash
3 # Configuration of the command line tests
5 # $Id$
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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
29 WS_SYSTEM="Windows"
30 export CYGWIN="$CYGWIN error_start=c:\cygwin\bin\dumper.exe -d %1 %2"
31 else
32 WS_SYSTEM=`uname -s`
37 ENDIANNESS="little"
38 echo -n I | od -to2 | awk '{ lastbit = substr($2,6,1); exit lastbit }'
39 if [ $? -eq 0 ] ; then
40 ENDIANNESS="big"
43 # Absolute path to the source tree
44 SOURCE_DIR="$(cd "$(dirname "$0")" && cd .. && pwd)"
46 # Absolute path to this test directory (for capture and config files)
47 TESTS_DIR="$SOURCE_DIR/test"
49 # Are we allowed to open interfaces or capture on this system?
50 SKIP_CAPTURE=${SKIP_CAPTURE:-1}
52 # Override the last two items if we're running Windows
53 if [ "$WS_SYSTEM" = "Windows" ] ; then
54 WS_BIN_PATH=${WS_BIN_PATH:-$SOURCE_DIR/wireshark-gtk2}
55 SKIP_CAPTURE=0
58 # Path to the Wireshark binaries, default to source dir if unset
59 WS_BIN_PATH=${WS_BIN_PATH:-$SOURCE_DIR}
61 # Tweak the following to your liking.
62 WIRESHARK=$WS_BIN_PATH/wireshark
63 TSHARK=$WS_BIN_PATH/tshark
64 RAWSHARK=$WS_BIN_PATH/rawshark
65 CAPINFOS=$WS_BIN_PATH/capinfos
66 DUMPCAP=$WS_BIN_PATH/dumpcap
68 # interface with at least a few packets/sec traffic on it
69 # (e.g. start a web radio to generate some traffic :-)
70 # an interfaces index (1 based) should do well for recent devbuilds
71 if [ "$WS_SYSTEM" = "Windows" -a -z "$TRAFFIC_CAPTURE_IFACE" ] ; then
72 # Try to fetch the first Ethernet interface.
73 TRAFFIC_CAPTURE_IFACE=`$TSHARK -D 2>&1 | \
74 egrep 'Ethernet|Network Connection|VMware|Intel|Realtek' | \
75 head -1 | cut -c 1`
77 TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-1}
79 # time to capture some traffic (in seconds)
80 # (you may increase this if you get errors caused by very low traffic)
81 TRAFFIC_CAPTURE_DURATION=60
83 # the default is to not capture in promiscuous mode
84 # (this makes known trouble with some Windows WLAN adapters)
85 # if you need promiscuous mode, comment this line out
86 TRAFFIC_CAPTURE_PROMISC=-p
88 # only test capturing from a fifo if we're not on Windows
89 # and we have a mkfifo. (Windows cygwin has a mkfifo but
90 # Windows dumpcap & etc use Windows named pipes which
91 # are different than the cygwin named pipes).
93 if [ "$WS_SYSTEM" != "Windows" ] && which mkfifo &>/dev/null ; then
94 TEST_FIFO=1
97 # Tell Wireshark to quit after capuring packets.
98 export WIRESHARK_QUIT_AFTER_CAPTURE="True"
100 CAPTURE_DIR="$TESTS_DIR/captures/"
102 # Display our environment
104 ##printf "\n ------- Info =-----------------\n"
105 ##printf "Syms :$WS_SYSTEM: :$TRAFFIC_CAPTURE_IFACE: :$SKIP_CAPTURE: :$TEST_FIFO:\n"
107 ##ls -l $WIRESHARK $TSHARK $DUMPCAP
108 ##ls -l $(which wireshark) $(which tshark) $(which dumpcap)
109 ##printf " ----------------------------------\n\n"
111 # Editor modelines
113 # Local Variables:
114 # sh-basic-offset: 8
115 # tab-width: 8
116 # indent-tabs-mode: t
117 # End:
119 # ex: set shiftwidth=8 tabstop=8 noexpandtab:
120 # :indentSize=8:tabSize=8:noTabs=false: