Ethereal-dev: Re: [Ethereal-dev] patch for packet-smb.c (Locking_AndX)

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 4 Dec 2003 16:35:55 -0800

On Dec 4, 2003, at 8:11 AM, Luis Claudio R. Goncalves wrote:

Hi!

On Wed, Dec 03, 2003 at 12:39:31PM -0800, Guy Harris wrote:
|
| On Dec 3, 2003, at 2:43 AM, Ronnie Sahlberg wrote:
|
| >AFAICS your patch reverses the patch I added to packet-smb.c # 1.366
| >and changes it back into treating this field as a 64 bit integer in
| >LittleEndian format.
|
| The reasons I know of for not just supporting 64-bit integral types in
| Ethereal are

The suport to 64bit integers present in etherel, using 8-byte arrays,
seems to be doing the job nicely.

...except for the fact that there's a dispute over whether the code is correct or not (and given that Ronnie wrote the 64-bit integer support and put in the current code based on captures he's seen, he might be right); I suspect that if we had 64-bit integer support the code would just to

	offset_high = tvb_get_letohl(tvb, offset);
	offset+low = tvb_get_letohl(tvb, offset+4);
	offset = (high << 32) | low;

and nobody'd be disputing whether that was correct or not. (The only way to dispute that offset_high is at a lower offset than offset_low is to assert that the CIFS 1.0 spec is incorrect.) I'd have to look at the 64-bit integer code again to convince myself which approach is right; if we used guint64, it would be obvious.