Subject: Re: sizeof() problem in ISO CLNP kernel driver
To: <>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: tech-net
Date: 10/31/1997 14:01:29
[summary for tech-net readers at the end.]
Hello,

> I propose, as a workaround, to use gcc's __attribute__((packed)) in the
> structure declaration. Can you test if it works for that problem, please?

I just remembered a networked m68k machine I could use to check this, and it
does not work with our current compiler.

I'd propose to fix the code; that is: at least use a 
#define CLNP_FIXED_SIZE 9
#define ESIS_FIXED_SIZE 9

in the respective files, and hunt down any use of sizeof(struct *_fixed) and
change it.

However, I don't know if code outside NetBSD (e.g., ISODE) tries to do the
same, which would make that task much more difficult; can you tell me that?

Regards,
	Ignatios Souvatzis

Summary: 

sys/netiso/clnp.h defines struct clnp_fixed. sizeof(struct clnp_fixed) is
assumed by the code to be 9, but is returned as 10 on (at least) m68k.

sys/netiso/esis.h defines struct esis_fixed. sizeof(struct esis_fixed) is
assumed by the code to be 9, but is returned as 10 on (at least) m68k.