Ethereal-dev: Re: [Ethereal-dev] Capture dialog ringbuffer behaviour

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sun, 29 Feb 2004 18:52:21 +0100
Guy Harris wrote:

On Thu, Feb 26, 2004 at 10:40:14AM +0100, Ulf Lamping wrote:
The "Number of files" field should be always active, and the range
should be between 1 and 1024 (currently: 0-1024).
The condition "Number of files > 1" now switches between using a
single file or the ring buffer implementation.

So what selects the "Multiple files" mode, as opposed to the "Single
file" mode or the "Ring buffer" mode?
Just the "Number of files" selected, switches between "Single file" and one of the multiple modes.
As that is what it implies :-)

The Ring buffer switch is only used to switch between Multiple and Ring buffer mode.

In "Multiple files" mode, the only reasonable "Number of files" value
would be "infinity" - any other value would imply that it'd write no
more than that number of files.
That's exactly the intended behaviour. This is the way to get the *first* xy bytes of a long term capture, and just stop after that. Otherwise you would like to use the ring buffer, if you want to have the *last* xy bytes.

The *only* difference between multiple and ring buffer is: when it comes to the end of the last capture file, a ring buffer will continue capturing from the first file, but the multiple will just stop capturing.

That's also the reason, that I wanted to have "Use ring buffer" checked by default, as that's the typical thing to have.

Perhaps, instead:

	if none of the "Next capture file every ..." options are
	checked, Ethereal runs in single file mode;

	if one of the "Next capture file every ..." options is checked,
	then:

		if "Use ring buffer" isn't checked, Ethereal runs in
		"Multiple files" mode, and "Number of files" is grayed
		out;

		if "Use ring buffer" is checked, Ethereal runs in "Ring
		buffer" mode, and "Number of files" is active - and
		should probably have a range between 2 and 1024.



After reading your comments and look at the dialog again, I recognized:
The multiple mode I had in mind is nothing but a "size limited" ring buffer mode, so not really a different mode itself.

The facts as I see them now:
- a ring buffer with only one file doesn't make sense
- a single file will be only one file :-)
- displaying unlimited number of files by a setting "Number of files" == 0 isn't an intuitive thing - the multiple mode I was talking about is only a ring buffer with a limited number of file switches - the "Use ring buffer" setting can always be derived from "Number of files" > 1

So it might be better:
Add a row to the Capture limits: "Stop capture after x file(s)" to limit the number of ring buffer files (what I former called "Multiple mode").
This setting is inactive, if the "Number of file(s)" is 1.

Remove the "Use ring buffer" checkbox completely.

To give some visual feedback to the user, it might be an idea to replace the "Use ring buffer" checkbox by a label stating: "Single file mode" / "Ring buffer mode" or such.

Comments?

Regards, ULFL