aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-14 16:40:23 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-14 16:40:23 +0000
commita2d1e9005dc447486e14903f5d53d5ee8d6d725f (patch)
tree78bc861dc4a2907a73ee807f8893914875221a25 /tshark.c
parente189eb88870cf39f5785918b56d2284e14f36f0c (diff)
downloadwireshark-a2d1e9005dc447486e14903f5d53d5ee8d6d725f.tar.gz
wireshark-a2d1e9005dc447486e14903f5d53d5ee8d6d725f.tar.bz2
wireshark-a2d1e9005dc447486e14903f5d53d5ee8d6d725f.zip
This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files. This can be found in the "Configuration Profiles..." menu item from the Edit menu, or by pressing Shift-Ctrl-A. It's also possible to start wireshark and tshark with a named profile by using the "-C ProfileName" option. A new status pane in the main window will show the current profile. The configuration files currently stored in the Profiles are: - Preferences - Capture Filters - Display Filters - Coloring Rules - Disabled Protocols - User Accessible Tables The recent data are by design not added to the profile. Planned future enhancements: - make a more convenient function to switch between profiles - add a "clone profile" button to copy an existing profile - make the profiles list active and accept return as OK - save users "Decode as" in the profile - make new, clone and deletion of profiles more secure - make some of the recent values available in the profile This patch also fixes: - setting default status pane sizes - a bug setting status pane for packets when not having main lower pane. svn path=/trunk/; revision=24089
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index 1af614457d..1e1e077bca 100644
--- a/tshark.c
+++ b/tshark.c
@@ -259,6 +259,7 @@ print_usage(gboolean print_ver)
/*fprintf(output, "\n");*/
fprintf(output, "Output:\n");
fprintf(output, " -w <outfile|-> set the output filename (or '-' for stdout)\n");
+ fprintf(output, " -C <config profile> start with specified configuration profile\n");
fprintf(output, " -F <output file type> set the output file type, default is libpcap\n");
fprintf(output, " an empty \"-F\" option will list the file types\n");
fprintf(output, " -V add output of packet tree (Packet Details)\n");
@@ -725,7 +726,7 @@ main(int argc, char *argv[])
GLogLevelFlags log_flags;
int optind_initial;
-#define OPTSTRING_INIT "a:b:c:d:De:E:f:F:G:hi:lLnN:o:pqr:R:s:St:T:vVw:xX:y:z:"
+#define OPTSTRING_INIT "a:b:c:C:d:De:E:f:F:G:hi:lLnN:o:pqr:R:s:St:T:vVw:xX:y:z:"
#ifdef HAVE_LIBPCAP
#ifdef _WIN32
#define OPTSTRING_WIN32 "B:"
@@ -761,6 +762,14 @@ main(int argc, char *argv[])
while ((opt = getopt(argc, argv, optstring)) != -1) {
switch (opt) {
+ case 'C': /* Configuration Profile */
+ if (profile_exists (optarg)) {
+ set_profile_name (optarg);
+ } else {
+ cmdarg_err("Configuration Profile \"%s\" does not exist", optarg);
+ exit(1);
+ }
+ break;
case 'X':
ex_opt_add(optarg);
break;
@@ -956,6 +965,9 @@ main(int argc, char *argv[])
arg_error = TRUE;
#endif
break;
+ case 'C':
+ /* Configuration profile settings were already processed just ignore them this time*/
+ break;
case 'd': /* Decode as rule */
if (!add_decode_as(optarg))
exit(1);