Subject: Re: sizeof() problem in ISO CLNP kernel driver
To: None <tech-net@NetBSD.ORG>
From: Christos Zoulas <christos@zoulas.com>
List: tech-net
Date: 10/31/1997 14:47:26
In article <199710311301.OAA23747@cauchy.cs.uni-bonn.de> tech-net@NetBSD.ORG writes:
>
>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.

This is a problem with m68k wanting to round the size of struct's to two
bytes. __attribute__((packed)) will not help... When we last encountered
this on if_llc.h, charles tried to change the compiler so that it would
not round struct sizes to two bytes, but this broke too many things.

christos