[NUT-devel] Incomplete description of checksum algorithm

Oded Shimon ods15 at ods15.dyndns.org
Fri Feb 17 12:56:03 CET 2006


On Thu, Feb 16, 2006 at 04:31:59PM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Wed, Feb 15, 2006 at 10:43:25PM -0500, Rich Felker wrote:
> > On Thu, Feb 16, 2006 at 01:10:41AM +0100, Michael Niedermayer wrote:
> > > btw, why doesnt the syncpoint have a packet header / forward ptr !?
> > 
> > Because the damn thing is already way too big! :(
> 
> that makes it non-extendible which breaks one of nuts goals

IMO no.. frame headers can have arbitrary extendiblity, and syncpoints are 
unique - their checksum doesn't come at the end of the syncpoint, but at 
the following frame header...

As for forward ptr in checksum, it slightly annoys my coding because i do:

header -> temp buffer
forward_ptr - length of header+4 -> file
temp buffer -> file
checksum of temp buffer -> file

So I'd have to somehow push the forward ptr to the begginning of the temp 
buffer or some other solution. It doesn't matter badly though, I'm not 
really against it.

But syncpoints don't need forward ptr though because they are special, they 
carry themselves AND the following frame header... So you'd have to do some 
weird thing where the forward ptr only points to the end of the syncpoint, 
and then there's the frame header, and THEN there is the checksum. it's 
ugly IMO...

- ods15




More information about the NUT-devel mailing list