Ethereal-dev: Re: [Ethereal-dev] PATCH - Allow editcap to report # of packets in file

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

From: Ian Schorr <ethereal@xxxxxxxxxxxxx>
Date: Tue, 27 Jul 2004 09:41:04 -0400


Guy Harris wrote:

On Tue, Jul 27, 2004 at 01:40:13AM -0400, Ian Schorr wrote:
Allows user to throw a -c command-line option that instructs editcap to return the number of packets in a file to stdout.

The only code path it shares with the rest of editcap is the argument
parsing;
It's only 39 lines, but since editcap is only 468 lines (including comments) it's a significant percentage =)

does it belong in editcap, or does it belong in another
program, say "packet_count"?

I considered that when writing. I suppose it depends on how much we want to avoid having a large number of single-purposed executables versus building tools with feature bloat/conflicting features. In this case I didn't feel the feature deserved spinning off a whole new tool, and that out of the existing tools it made sense to put it in editcap (I've felt that editcap is the tool for massaging frames in a capture, building a packet count made sense to me).

...Or if someone feels strongly otherwise I'll move it into a separate tool.

If I get some time this week I'd also like to re-build a "splitcap" tool, which I believe DOES make sense to build separately.

Ian