Ethereal-dev: Re: [ethereal-dev] Problems / suggestions

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Sun, 26 Sep 1999 12:48:41 -0700
>   - The -w parameter does not seem to apply if i start a capture session
> from the GUI. Having the capture go to /tmp by default is not preferable
> in my opinion, since it usually resides on a small partition of it's own,
> or the small root partition, or sometimes (on Solaris for example) in the
> swap & virtual memory space. Perhaps add a "capture file" field in the
> Capture Preferences dialog, defaulting to an unused filename in the
> current directory, or the file specified on the command line using -w?
> (I got around this by setting the TMPDIR environment variable, after
> browsing through the source checking how you choose the file name.)

TMPDIR is sort of the UNIX standard way of specifying where to put a
temporary file.

We could also add a Capture Preferences dialog (there isn't a "Capture"
tab in "Edit/Preferences" right now) and put in an item that gets tried
by "create_tempfile()" before we try E_tmpdir, or we could put that in
the "Capture/Start" dialog instead.

Under what OSes does it put the capture in "/tmp" by default? 
"create_tempfile()" tries, in order:

	TMPDIR, if it's set;

	TEMP, on Win32 systems, if it's set (although for
	"create_tempfile()" to work, you need an OS API to create a
	"FILE *" that refers to a file descriptor or file handle, and I
	don't know whether Win32 has that);

	E_tmpdir, which is set from the definition of P_tmpdir in
	<stdio.h>, or set to "/var/tmp" if it's not defined;

	"/tmp".

FreeBSD, at least, defines P_tmpdir to "/var/tmp"; I'll have to check
what Solaris does.

>   - To utilize the -w i tried the new command line capture feature:
> 
> root@funk:/opt/src/net/ethereal-0.7.5#> ./ethereal -w /data/eth/foo -i 
> eth0 -k
> 
>   got me a warning window saying
> 
>   "The file to which the capture would be saved ("/data/eth/foo") could
> not be opened: Bad file descriptor."

I'll look into that, although that raises the question of whether "-w"
should cause *every* capture you take to go to the same file - normally,
each new capture goes to a new file.  A way of specifying the directory
into which to put the temporary file might be better.

>   - I added a display column (preferences/columns), how do i make ethereal
> redraw the display with the new column shown, without restarting ethereal
> (saving the capture to another file and reopening it didn't help)? 

Unfortunately, you can't, right now.

GTK+'s widget for displaying multi-column lists can't have columns added
to it on the fly, and we don't currently destroy that widget and
reconstruct it with the new set of columns if you add, delete, or change
a display column.  (QListView class lets you add columns at the *end*,
but not in the middle, and I see no sign of a "deleteColumn" method, so
it's better than a GTK+ CList, but not by anywhere near as much as we
might like...).