From 05ee001d7339524483a806c05dae997485e7d86d Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Wed, 12 Dec 2012 02:07:08 +0000 Subject: [PATCH] Document the "-g" option to dumpcap. Add that option to tshark, too, and document it. The option can't be given to Wireshark because the GUI already has a "-g" (goto packet). svn path=/trunk/; revision=46513 --- doc/dumpcap.pod | 7 +++++++ doc/tshark.pod | 7 +++++++ dumpcap.c | 2 +- tshark.c | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/dumpcap.pod b/doc/dumpcap.pod index a99efef4e7..676a3ae066 100644 --- a/doc/dumpcap.pod +++ b/doc/dumpcap.pod @@ -13,6 +13,7 @@ S<[ B<-c> Ecapture packet countE ]> S<[ B<-d> ]> S<[ B<-D> ]> S<[ B<-f> Ecapture filterE ]> +S<[ B<-g> ]> S<[ B<-h> ]> S<[ B<-i> Ecapture interfaceE|rpcap://EhostE/Ecapture interfaceE|TCP@EhostE:EportE|- ]> S<[ B<-I> ]> @@ -173,6 +174,12 @@ the interface specified by the last B<-i> option occurring before this option. If the capture filter expression is not set specifically, the default capture filter expression is used if provided. +=item -g + +This option causes the output file(s) to be created with group-read permission +(meaning that the output file(s) can be read by other members of the calling +user's group). + =item -h Print the version and options and exits. diff --git a/doc/tshark.pod b/doc/tshark.pod index 22ef5d7b6c..b21b8e372b 100644 --- a/doc/tshark.pod +++ b/doc/tshark.pod @@ -18,6 +18,7 @@ S<[ B<-e> EfieldE ]> S<[ B<-E> Efield print optionE ]> S<[ B<-f> Ecapture filterE ]> S<[ B<-F> Efile formatE ]> +S<[ B<-g> ]> S<[ B<-h> ]> S<[ B<-H> Einput hosts fileE ]> S<[ B<-i> Ecapture interfaceE|- ]> @@ -341,6 +342,12 @@ option. The output written with the B<-w> option is raw packet data, not text, so there is no B<-F> option to request text output. The option B<-F> without a value will list the available formats. +=item -g + +This option causes the output file(s) to be created with group-read permission +(meaning that the output file(s) can be read by other members of the calling +user's group). + =item -G [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs] The B<-G> option will cause B to dump one of several types of glossaries diff --git a/dumpcap.c b/dumpcap.c index da4eb5673b..be59fcef7b 100644 --- a/dumpcap.c +++ b/dumpcap.c @@ -4453,13 +4453,13 @@ main(int argc, char *argv[]) case 'b': /* Ringbuffer option */ case 'c': /* Capture x packets */ case 'f': /* capture filter */ + case 'g': /* enable group read accesson file(s) */ case 'i': /* Use interface x */ case 'n': /* Use pcapng format */ case 'p': /* Don't capture in promiscuous mode */ case 'P': /* Use pcap format */ case 's': /* Set the snapshot (capture) length */ case 'w': /* Write to capture file x */ - case 'g': /* enable group read accesson file(s) */ case 'y': /* Set the pcap data link type */ #ifdef HAVE_PCAP_REMOTE case 'u': /* Use UDP for data transfer */ diff --git a/tshark.c b/tshark.c index 84f2f14f1c..bc4f02612b 100644 --- a/tshark.c +++ b/tshark.c @@ -320,6 +320,7 @@ print_usage(gboolean print_ver) fprintf(output, " -u s|hms output format of seconds (def: s: seconds)\n"); fprintf(output, " -l flush standard output after each packet\n"); fprintf(output, " -q be more quiet on stdout (e.g. when using statistics)\n"); + fprintf(output, " -g enable group read access on the output file(s)\n"); fprintf(output, " -W n Save extra information in the file, if supported.\n"); fprintf(output, " n = write network address resolution information\n"); fprintf(output, " -X : eXtension options, see the man page for details\n"); @@ -1185,6 +1186,7 @@ main(int argc, char *argv[]) case 'b': /* Ringbuffer option */ case 'c': /* Capture x packets */ case 'f': /* capture filter */ + case 'g': /* enable group read accesson file(s) */ case 'i': /* Use interface x */ case 'p': /* Don't capture in promiscuous mode */ #ifdef HAVE_PCAP_REMOTE