Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 32594: /trunk/ /trunk/: capinfos.c

From: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Apr 2010 14:56:10 -0600
On Thu, Apr 29, 2010 at 11:17:16AM -0400, Bill Meier wrote:

> At least one capture format ("NA Sniffer (Windows) 2.0" handled in 
> netxray.c) doesn't provide a 'snaplen' in the file header. However the 
> record header has a 'caplen' as well as an 'original length'.
> 
> This may be true for other formats as well.

Thanks, I didn't know that.  My addition to capinfos simply checks to 
see if the snaplen from wth returned from wiretap by 
wtap_snapshot_length() is > 0.

> I would expect that for any particular file there would only be one 
> value for snaplen. If there are multiple snaplens capinfos could just 
> show the range.

The only one I can think of that might have different ones is pcapng, 
which we haven't finished the support for yet anyway.  I'm not positive 
without looking if this is possible even in pcapng though.

> What do you think ?
> 
> If the above seems reasonable I can make the change if you like.

Good idea; go ahead.  Thanks!


-- 
Steve