[NUT-devel] reserved bytes

Ivo ivop at euronet.nl
Tue Nov 28 01:03:25 CET 2006


Hi,

I stumbled upon the following:

packet_footer
    reserved_bytes
    checksum                            u(32)
    [Note: in index packet, reserved_bytes comes before index_ptr]

Wouldn't it be cleaner and easier to understand to just move reserved_bytes 
to the end of each header? Like:

packet_header
	....
some_header (!=index)
	....
	reserved_bytes
packet_footer
	checksum			u(32)


and

packet_header
	....
index	
	....
	reserved_bytes
	index_ptr			f(64)
packet_footer
	checksum			u(32)


This removes the need for the [Note:...]-exception for index packets and 
should result in the same bitstream as before.

--Ivo



More information about the NUT-devel mailing list