From 5ccc874dbedb74b791274c811d9b518bafc89a52 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Tue, 6 Apr 1999 16:35:47 +0000 Subject: [PATCH] Touch-up fixes to my previous fix of making the packet-capture facility save to a file unknown to the user first. The manpage has now been updated to reflect the ability of the user to use the TMPDIR environment variable to change the location of this capture file. And now the capture file is deleted when ethereal exits, if the user has not saved the trace file. svn path=/trunk/; revision=243 --- doc/ethereal.pod | 4 ++++ ethereal.1 | 46 +++++++++++++++++++++++++++++++--------------- ethereal.c | 5 ++++- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/doc/ethereal.pod b/doc/ethereal.pod index 84bf091203..e783d3a5c9 100644 --- a/doc/ethereal.pod +++ b/doc/ethereal.pod @@ -126,6 +126,10 @@ Sets the packet printing and filter options (see L<"Preferences"> below). =item Tools:Capture Initiates a live packet capture (see L<"Capture Preferences"> below). +A temporary file will be created to hold the capture. The location of the +file can be chosen by setting your TMPDIR environment variable before +starting ethereal. Otherwise, the default TMPDIR location is system-dependent, +but is likely either /var/tmp or /tmp. =item Tools:Follow TCP Stream diff --git a/ethereal.1 b/ethereal.1 index 2212c3565e..7f67e28de4 100644 --- a/ethereal.1 +++ b/ethereal.1 @@ -1,12 +1,13 @@ .rn '' }` -''' $RCSfile: ethereal.1,v $$Revision: 1.5 $$Date: 1998/12/29 04:05:34 $ +''' $RCSfile: ethereal.1,v $$Revision: 1.6 $$Date: 1999/04/06 16:35:46 $ ''' ''' $Log: ethereal.1,v $ -''' Revision 1.5 1998/12/29 04:05:34 gerald -''' * Added Joerg Mayer's Vines patch -''' * Added Joerg to the AUTHORS file -''' * Added Guy's bitfield decode patch -''' * Fixed time output +''' Revision 1.6 1999/04/06 16:35:46 gram +''' Touch-up fixes to my previous fix of making the packet-capture facility save +''' to a file unknown to the user first. The manpage has now been updated to reflect +''' the ability of the user to use the TMPDIR environment variable to change the +''' location of this capture file. And now the capture file is deleted when +''' ethereal exits, if the user has not saved the trace file. ''' ''' .de Sh @@ -99,7 +100,7 @@ .nr % 0 .rr F .\} -.TH ETHEREAL 1 "0.5.0" "18/Nov/98" "The Ethereal Network Analyzer" +.TH ETHEREAL 1 "perl 5.005, patch 02" "6/Apr/99" "User Contributed Perl Documentation" .UC .if n .hy 0 .if n .na @@ -245,7 +246,11 @@ to disk. Sets the initial height of the tree view (top) pane .Ip "-t" 4 Sets the format of the packet timestamp displayed in the packet list -window. +window. The format can be one of \*(L'r\*(R' (relative), \*(L'a\*(R' (absolute), or \*(L'd\*(R' +(delta). The relative time is the time elapsed between the first packet +and the current packet. The absolute time is the actual date and time the +packet was captured. The delta time is the time since the previous packet +was captured. The default is relative. .Ip "-v" 4 Prints the version and exits. .Ip "-w" 4 @@ -264,6 +269,10 @@ Exits the application. Sets the packet printing and filter options (see the section on \fIPreferences\fR below). .Ip "Tools:Capture" 4 Initiates a live packet capture (see the section on \fICapture Preferences\fR below). +A temporary file will be created to hold the capture. The location of the +file can be chosen by setting your \s-1TMPDIR\s0 environment variable before +starting ethereal. Otherwise, the default \s-1TMPDIR\s0 location is system-dependent, +but is likely either /var/tmp or /tmp. .Ip "Tools:Follow \s-1TCP\s0 Stream" 4 If you have a \s-1TCP\s0 packet selected, it will display the contents of the \s-1TCP\s0 data stream in a separate window. @@ -382,15 +391,22 @@ The latest version of \fBethereal\fR can be found at \& -------- ------ \& Gerald Combs .Ve -.Vb 8 +.Vb 15 \& Contributors \& ------------ -\& Gilbert Ramirez Jr. -\& Hannes R. Boehm -\& Mike Hall -\& Bobo Rajec -\& Laurent Deniel -\& Don Lafontaine +\& Gilbert Ramirez +\& Hannes R. Boehm +\& Mike Hall +\& Bobo Rajec +\& Laurent Deniel +\& Don Lafontaine +\& Guy Harris +\& Simon Wilkinson +\& Joerg Mayer +\& Martin Maciaszek +\& Didier Jorand +\& Jun-ichiro itojun Hagino +\& Richard Sharpe .Ve Alain Magloire was kind enough to give his permission to use his version of snprintf.c. diff --git a/ethereal.c b/ethereal.c index a2d592c0ee..a5f699f2dc 100644 --- a/ethereal.c +++ b/ethereal.c @@ -1,6 +1,6 @@ /* ethereal.c * - * $Id: ethereal.c,v 1.29 1999/04/06 16:24:48 gram Exp $ + * $Id: ethereal.c,v 1.30 1999/04/06 16:35:46 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -473,6 +473,9 @@ tree_view_cb(GtkWidget *w) { void file_quit_cmd_cb (GtkWidget *widget, gpointer data) { + if (cf.save_file && !cf.user_saved) { + unlink(cf.save_file); + } gtk_exit(0); }