From fa920e48ed72ab076c6c6a9b8e8264e1b05c1707 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Tue, 12 May 2009 16:06:14 +0000 Subject: [PATCH] Minor cleanup of "-h" output text. svn path=/trunk/; revision=28334 --- capinfos.c | 18 +++++++++--------- editcap.c | 47 ++++++++++++++++++++++++----------------------- mergecap.c | 24 ++++++++++++------------ rawshark.c | 2 +- text2pcap.c | 50 +++++++++++++++++++++++++++----------------------- 5 files changed, 73 insertions(+), 68 deletions(-) diff --git a/capinfos.c b/capinfos.c index 4f0a56dc09..88d9acb83a 100644 --- a/capinfos.c +++ b/capinfos.c @@ -124,10 +124,10 @@ print_stats(capture_info *cf_info) if (cap_duration) print_value("Capture duration: ", 0, " seconds", cf_info->duration); if (cap_start_time) printf ("Start time: %s", (cf_info->packet_count>0) ? ctime (&start_time_t) : "n/a\n"); if (cap_end_time) printf ("End time: %s", (cf_info->packet_count>0) ? ctime (&stop_time_t) : "n/a\n"); - if (cap_data_rate_byte) print_value("Data byte rate: ", 2, " bytes/s", cf_info->data_rate); - if (cap_data_rate_bit) print_value("Data bit rate: ", 2, " bits/s", cf_info->data_rate*8); - if (cap_packet_size) printf ("Average packet size: %.2f bytes\n", cf_info->packet_size); - if (cap_packet_rate) print_value("Average packet rate: ", 2, " packets/s", cf_info->packet_rate); + if (cap_data_rate_byte) print_value("Data byte rate: ", 2, " bytes/sec", cf_info->data_rate); + if (cap_data_rate_bit) print_value("Data bit rate: ", 2, " bits/sec", cf_info->data_rate*8); + if (cap_packet_size) printf ("Average packet size: %.2f bytes\n", cf_info->packet_size); + if (cap_packet_rate) print_value("Average packet rate: ", 2, " packets/sec", cf_info->packet_rate); } static int @@ -259,20 +259,20 @@ usage(gboolean is_error) fprintf(output, " -d display the total length of all packets (in bytes)\n"); fprintf(output, "\n"); fprintf(output, "Time:\n"); - fprintf(output, " -u display the capture duration (in seconds) \n"); + fprintf(output, " -u display the capture duration (in seconds)\n"); fprintf(output, " -a display the capture start time\n"); fprintf(output, " -e display the capture end time\n"); fprintf(output, "\n"); fprintf(output, "Statistic:\n"); - fprintf(output, " -y display average data rate (in bytes/s)\n"); - fprintf(output, " -i display average data rate (in bits/s)\n"); + fprintf(output, " -y display average data rate (in bytes/sec)\n"); + fprintf(output, " -i display average data rate (in bits/sec)\n"); fprintf(output, " -z display average packet size (in bytes)\n"); - fprintf(output, " -x display average packet rate (in packets/s)\n"); + fprintf(output, " -x display average packet rate (in packets/sec)\n"); fprintf(output, "\n"); fprintf(output, "Miscellaneous:\n"); fprintf(output, " -h display this help and exit\n"); fprintf(output, "\n"); - fprintf(output, "If no options are given, default is to display all infos\n"); + fprintf(output, "If no options are given the default is to display all infos\n"); } #ifdef HAVE_PLUGINS diff --git a/editcap.c b/editcap.c index 0c95a155c3..33e0121fd3 100644 --- a/editcap.c +++ b/editcap.c @@ -487,25 +487,26 @@ usage(void) fprintf(stderr, "\n"); fprintf(stderr, "Usage: editcap [options] ... [ [-] ... ]\n"); fprintf(stderr, "\n"); + fprintf(stderr, " and must both be present.\n"); fprintf(stderr, "A single packet or a range of packets can be selected.\n"); fprintf(stderr, "\n"); fprintf(stderr, "Packet selection:\n"); - fprintf(stderr, " -r keep the selected packets, default is to delete them\n"); + fprintf(stderr, " -r keep the selected packets; default is to delete them.\n"); fprintf(stderr, " -A don't output packets whose timestamp is before the\n"); - fprintf(stderr, " given time (format as YYYY-MM-DD hh:mm:ss)\n"); + fprintf(stderr, " given time (format as YYYY-MM-DD hh:mm:ss).\n"); fprintf(stderr, " -B don't output packets whose timestamp is after the\n"); - fprintf(stderr, " given time (format as YYYY-MM-DD hh:mm:ss)\n"); + fprintf(stderr, " given time (format as YYYY-MM-DD hh:mm:ss).\n"); fprintf(stderr, "\n"); fprintf(stderr, "Duplicate packet removal:\n"); fprintf(stderr, " -d remove packet if duplicate (window == %d).\n", DEFAULT_DUP_DEPTH); - fprintf(stderr, " -D remove packet if duplicate, configurable .\n"); + fprintf(stderr, " -D remove packet if duplicate; configurable \n"); fprintf(stderr, " Valid values are 0 to %d.\n", MAX_DUP_DEPTH); fprintf(stderr, " NOTE: A of 0 with -v (verbose option) is\n"); fprintf(stderr, " useful to print MD5 hashes.\n"); fprintf(stderr, " -w remove packet if duplicate packet is found EQUAL TO OR\n"); fprintf(stderr, " LESS THAN prior to current packet.\n"); fprintf(stderr, " A is specified in relative seconds\n"); - fprintf(stderr, " (e.g. 0.000001)\n"); + fprintf(stderr, " (e.g. 0.000001).\n"); fprintf(stderr, "\n"); fprintf(stderr, " NOTE: The use of the 'Duplicate packet removal' options with\n"); fprintf(stderr, " other editcap options except -v may not always work as expected.\n"); @@ -513,29 +514,29 @@ usage(void) fprintf(stderr, " desired effect if combined with the -d, -D or -w.\n"); fprintf(stderr, "\n"); fprintf(stderr, "Packet manipulation:\n"); - fprintf(stderr, " -s truncate each packet to max. bytes of data\n"); - fprintf(stderr, " -C chop each packet at the end by bytes\n"); - fprintf(stderr, " -t