diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-11-06 20:39:09 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-11-06 20:39:09 +0000 |
commit | 2a088c1d53ee1e1e3012f68aea745324a44e8120 (patch) | |
tree | 720d67bd7491d44e85fe80ba2e10d99d53ec3f49 /rawshark.c | |
parent | 67f69e99e876f9303357b912f877b18f72380dba (diff) | |
download | wireshark-2a088c1d53ee1e1e3012f68aea745324a44e8120.tar.gz wireshark-2a088c1d53ee1e1e3012f68aea745324a44e8120.tar.bz2 wireshark-2a088c1d53ee1e1e3012f68aea745324a44e8120.zip |
Add support for displaying dates as year and day-of-year (1-origin).
In the process, fix various man page descriptions of the -t flag,
and add support for UTC absolute times in the iousers and iostat TShark
taps.
svn path=/trunk/; revision=53114
Diffstat (limited to 'rawshark.c')
-rw-r--r-- | rawshark.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/rawshark.c b/rawshark.c index a2825fdc1e..8e762b625f 100644 --- a/rawshark.c +++ b/rawshark.c @@ -712,7 +712,9 @@ main(int argc, char *argv[]) else if (strcmp(optarg, "a") == 0) timestamp_set_type(TS_ABSOLUTE); else if (strcmp(optarg, "ad") == 0) - timestamp_set_type(TS_ABSOLUTE_WITH_DATE); + timestamp_set_type(TS_ABSOLUTE_WITH_YMD); + else if (strcmp(optarg, "adoy") == 0) + timestamp_set_type(TS_ABSOLUTE_WITH_YDOY); else if (strcmp(optarg, "d") == 0) timestamp_set_type(TS_DELTA); else if (strcmp(optarg, "dd") == 0) @@ -722,12 +724,22 @@ main(int argc, char *argv[]) else if (strcmp(optarg, "u") == 0) timestamp_set_type(TS_UTC); else if (strcmp(optarg, "ud") == 0) - timestamp_set_type(TS_UTC_WITH_DATE); + timestamp_set_type(TS_UTC_WITH_YMD); + else if (strcmp(optarg, "udoy") == 0) + timestamp_set_type(TS_UTC_WITH_YDOY); else { cmdarg_err("Invalid time stamp type \"%s\"", optarg); - cmdarg_err_cont("It must be \"r\" for relative, \"a\" for absolute,"); - cmdarg_err_cont("\"ad\" for absolute with date, or \"d\" for delta."); + cmdarg_err_cont( +"It must be \"a\" for absolute, \"ad\" for absolute with YYYY-MM-DD date,"); + cmdarg_err_cont( +"\"adoy\" for absolute with YYYY/DOY date, \"d\" for delta,"); + cmdarg_err_cont( +"\"dd\" for delta displayed, \"e\" for epoch, \"r\" for relative,"); + cmdarg_err_cont( +"\"u\" for absolute UTC, \"ud\" for absolute UTC with YYYY-MM-DD date,"); + cmdarg_err_cont( +"or \"udoy\" for absolute UTC with YYYY/DOY date."); exit(1); } break; |