On 10/10/2012, at 3:01, Bob Tanner <basic at us.netrek.org> wrote:
>>    uint8_t    flags;
> 
> Won't "unsigned flags" be "uint16_t flags" ?

Oops, actually I suspect it is uint32_t since I think unsigned == unsigned int.

A quick test confirms this..

[Ur 10:48] ~ >cat >test.c <<EOF
#include <stdio.h>
#include <stdlib.h>

int
main(int argc, char **argv) {
        printf("sizeof(unsigned) = %ld\n", sizeof(unsigned));
        printf("sizeof(int) = %ld\n", sizeof(int));
        printf("sizeof(char) = %ld\n", sizeof(char));
        printf("sizeof(unsigned short) = %ld\n", sizeof(unsigned short));
        printf("sizeof(long) = %ld\n", sizeof(long));

        exit(0);
}
EOF
[Ur 10:48] ~ >gcc test.c -o test
[Ur 10:48] ~ >./test
sizeof(unsigned) = 4
sizeof(int) = 4
sizeof(char) = 1
sizeof(unsigned short) = 2
sizeof(long) = 8

>>    uint16_t   whydead;
>>    uint8_t    whodead;
> 
> "unsigned short whodead" be "uint16_t whodead"?

Yes.

With those corrections the size is 32 bytes when checked using Clang on OSX 10.8, and GCC on FreeBSD 4.x and 8.x. Although on 4.x I had to use sys/types.h for XintYY_t as it doesn't have stdint.h.

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C