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 : use RPCAP password authentication\n"); +#endif /*fprintf(output, "\n");*/ fprintf(output, "Input file:\n"); fprintf(output, " -r 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 diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 6c90932a91..9563b22598 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -1184,7 +1184,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 : use RPCAP password authentication\n"); +#endif /*fprintf(output, "\n");*/ fprintf(output, "Input file:\n"); fprintf(output, " -r set the filename to read from (no pipes or stdin!)\n"); @@ -2217,14 +2220,18 @@ main(int argc, char *argv[]) #else /* HAVE_LIBPCAP */ #define OPTSTRING_B "" #endif /* HAVE_LIBPCAP */ - +#ifdef HAVE_PCAP_REMOTE +#define OPTSTRING_A "A:" +#else +#define OPTSTRING_A "" +#endif #ifdef HAVE_PCAP_CREATE #define OPTSTRING_I "I" #else #define OPTSTRING_I "" #endif -#define OPTSTRING "a:b:" OPTSTRING_B "c:C:d:Df:g:Hhi:" OPTSTRING_I "jJ:kK:lLm:nN:o:P:pr:R:Ss:t:u:vw:X:y:z:" +#define OPTSTRING "a:" OPTSTRING_A "b:" OPTSTRING_B "c:C:d:Df:g:Hhi:" OPTSTRING_I "jJ:kK:lLm:nN:o:P:pr:R:Ss:t:u:vw:X:y:z:" static const char optstring[] = OPTSTRING; @@ -2604,6 +2611,9 @@ main(int argc, char *argv[]) case 'i': /* Use interface x */ #ifdef HAVE_PCAP_CREATE case 'I': /* Capture in monitor mode, if available */ +#endif +#ifdef HAVE_PCAP_REMOTE + case 'A': /* Authentication */ #endif case 's': /* Set the snapshot (capture) length */ case 'S': /* "Sync" mode: used for following file ala tail -f */