Subject: Explicit packing in
To: NetBSD/Alpha , Tech Net <tech-net@netbsd.org>
From: B. James Phillippe \(nospam address\) <bryan-nospam@darkforest.org>
List: tech-net
Date: 01/21/2002 11:26:44
Hello,

I am curious to know why <netinet/ip.h> explicitly packs "struct ip" in
NetBSD (BTW, I'm on NetBSD-1.5.2/alpha).  None of the other UNIX systems I
have access to* do this, and I would not think it necessary.

If the structure is being used when it is not properly aligned someplace,
then __attribute__((__packed__)) should cause the compiler to generate
fixups, hiding the problem, right?  But would this not also cause the
compiler to possibly generate fixups where they are not needed as well?

* SunOS, Linux and HP-UX.

thanks,
-bp
--
# bryan at darkforest dot org
# Software Architect