From 025578a1bd54742c3f0f98247f99385bc6a25429 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 1 May 2001 00:41:46 +0000 Subject: [PATCH] "-l" command-line option to turn on automatic scrolling in "Update list of captures in real time" captures, from Christian Lacunza. svn path=/trunk/; revision=3389 --- AUTHORS | 5 +++++ doc/ethereal.pod.template | 8 ++++++++ gtk/main.c | 9 ++++++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 30a8da32cc..915b953151 100644 --- a/AUTHORS +++ b/AUTHORS @@ -594,6 +594,11 @@ Riaan Swart { Modbus/TCP support } +Christian Lacunza { + Command-line option to control automatic scrolling in "Update + list of packets in real time" captures +} + Alain Magloire was kind enough to give his permission to use his version of snprintf.c. diff --git a/doc/ethereal.pod.template b/doc/ethereal.pod.template index ed3956dc70..381bd13028 100644 --- a/doc/ethereal.pod.template +++ b/doc/ethereal.pod.template @@ -12,6 +12,7 @@ S<[ B<-f> capture filter expression ]> S<[ B<-h> ]> S<[ B<-i> interface ]> S<[ B<-k> ]> +S<[ B<-l> ]> S<[ B<-m> font ]> S<[ B<-n> ]> S<[ B<-o> preference setting ] ...> @@ -108,6 +109,12 @@ choosing the first loopback interface if there are no non-loopback interfaces; if there are no interfaces, B reports an error and doesn't start the capture. +=item -l + +Turns on automatic scrolling if the packet display is being updated +automatically as packets arrive during a capture (as specified by the +B<-S> flag). + =item -m Sets the name of the font used by B for most text. @@ -1091,6 +1098,7 @@ B. Patrick Wolfe Martin Held Riaan Swart + Christian Lacunza Alain Magloire was kind enough to give his permission to use his version of snprintf.c. diff --git a/gtk/main.c b/gtk/main.c index df9f2df321..83968e04de 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1,6 +1,6 @@ /* main.c * - * $Id: main.c,v 1.197 2001/05/01 00:18:48 guy Exp $ + * $Id: main.c,v 1.198 2001/05/01 00:41:46 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -730,7 +730,7 @@ print_usage(void) { fprintf(stderr, "This is GNU " PACKAGE " " VERSION ", compiled %s\n", comp_info_str->str); #ifdef HAVE_LIBPCAP - fprintf(stderr, "%s [ -vh ] [ -kpQS ] [ -B ] [ -c count ]\n", + fprintf(stderr, "%s [ -vh ] [ -klpQS ] [ -B ] [ -c count ]\n", PACKAGE); fprintf(stderr, "\t[ -f ] [ -i interface ] [ -m ] \n"); fprintf(stderr, "\t[ -n ] [ -o ] ... [ -P ]\n"); @@ -983,7 +983,7 @@ main(int argc, char *argv[]) #endif /* Now get our args */ - while ((opt = getopt(argc, argv, "B:c:f:hi:km:no:pP:Qr:R:Ss:t:T:w:W:vZ:")) != EOF) { + while ((opt = getopt(argc, argv, "B:c:f:hi:klm:no:pP:Qr:R:Ss:t:T:w:W:vZ:")) != EOF) { switch (opt) { case 'B': /* Byte view pane height */ bv_size = get_positive_int(optarg, "byte view pane height"); @@ -1026,6 +1026,9 @@ main(int argc, char *argv[]) arg_error = TRUE; #endif break; + case 'l': /* Automatic scrolling in live capture mode */ + prefs->capture_auto_scroll = TRUE; + break; case 'm': /* Fixed-width font for the display */ if (prefs->gui_font_name != NULL) g_free(prefs->gui_font_name);