summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
authorIrene RĂ¼ngeler <I.Ruengeler@fh-muenster.de>2012-08-08 14:30:55 +0000
committerIrene RĂ¼ngeler <I.Ruengeler@fh-muenster.de>2012-08-08 14:30:55 +0000
commit3a3b4a1fdc22685cae11fe4bcb02ac2aafa82c08 (patch)
treee16b39b68c0d637778978ebbf1682a8ab36ecefd /tshark.c
parentae5a2f3b6df1c3c02450350e1e1c98488d6d3813 (diff)
downloadwireshark-3a3b4a1fdc22685cae11fe4bcb02ac2aafa82c08.tar.gz
Add -A as command line option to wireshark and tshark.
svn path=/trunk/; revision=44339
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/tshark.c b/tshark.c
index 10d55a5143..c7bf0095c9 100644
--- a/tshark.c
+++ b/tshark.c
@@ -270,7 +270,10 @@ print_usage(gboolean print_ver)
fprintf(output, " filesize:NUM - switch to next file after NUM KB\n");
fprintf(output, " files:NUM - ringbuffer: replace after NUM files\n");
#endif /* HAVE_LIBPCAP */
-
+#ifdef HAVE_PCAP_REMOTE
+ fprintf(output, "RPCAP options:\n");
+ fprintf(output, " -A <user>:<password> use RPCAP password authentication\n");
+#endif
/*fprintf(output, "\n");*/
fprintf(output, "Input file:\n");
fprintf(output, " -r <infile> set the filename to read from (no pipes or stdin!)\n");
@@ -840,6 +843,11 @@ main(int argc, char *argv[])
int optind_initial;
gchar *output_only = NULL;
+#ifdef HAVE_PCAP_REMOTE
+#define OPTSTRING_A "A:"
+#else
+#define OPTSTRING_A ""
+#endif
#ifdef HAVE_LIBPCAP
#if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
#define OPTSTRING_B "B:"
@@ -856,7 +864,7 @@ main(int argc, char *argv[])
#define OPTSTRING_I ""
#endif
-#define OPTSTRING "2a:A:b:" OPTSTRING_B "c:C:d:De:E:f:F:G:hH:i:" OPTSTRING_I "K:lLnN:o:O:pPqr:R:s:S:t:T:u:vVw:W:xX:y:z:"
+#define OPTSTRING "2a:" OPTSTRING_A "b:" OPTSTRING_B "c:C:d:De:E:f:F:G:hH:i:" OPTSTRING_I "K:lLnN:o:O:pPqr:R:s:S:t:T:u:vVw:W:xX:y:z:"
static const char optstring[] = OPTSTRING;
@@ -1094,6 +1102,9 @@ main(int argc, char *argv[])
case 'f': /* capture filter */
case 'i': /* Use interface x */
case 'p': /* Don't capture in promiscuous mode */
+#ifdef HAVE_PCAP_REMOTE
+ case 'A': /* Authentication */
+#endif
#ifdef HAVE_PCAP_CREATE
case 'I': /* Capture in monitor mode, if available */
#endif