From 6c2dd1ea330bd29ff87e69725e6e90e1d54eb376 Mon Sep 17 00:00:00 2001
From: James Kilts <jameskilts@gmail.com>
Date: Mon, 18 Jan 2010 19:18:50 +0100
Subject: [PATCH 3/4] Allows specification of capture mode (promiscuous mode) from the command
 line in either master or slave mode.

Signed-off-by: James Kilts <jameskilts@gmail.com>
---
 tools/rtnet.in |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/rtnet.in b/tools/rtnet.in
index fb0ca5b..251fada 100755
--- a/tools/rtnet.in
+++ b/tools/rtnet.in
@@ -15,16 +15,18 @@ debug_func() {
 usage() {
     cat << EOF
 Usage:
-    $0 [-cf <config-file>] [-v] {start|stop}
+    $0 [-cf <config-file>] [-v] [-c] {start|stop}
         Start or stop station according to configuration file
 
-    $0 [-cf <config-file>] [-v] master <slave_ip1> [<slave_ip2> ...]
+    $0 [-cf <config-file>] [-v] [-c] master <slave_ip1> [<slave_ip2> ...]
         Start station as master for given list of slaves
 
     $0 [-cf <config-file>] [-v] capture
         Start only passive realtime capturing
 
     The additional switch -v enables verbose output.
+    The additional switch -c enables capturing mode to allow use of a network
+        analyzer such as Wireshark (if rtnet was built with --enable-rtcap).
 EOF
 }
 
@@ -254,6 +256,11 @@ if [ "$1" = "-v" ]; then
     shift 1
 fi
 
+if [ "$1" = "-c" ]; then
+    RTCAP="yes"
+    shift 1
+fi
+
 NETMASK_OPT=
 if [ ! "$NETMASK" = "" ]; then
     NETMASK_OPT="netmask $NETMASK"
-- 
1.6.5.1.msysgit.1

