Subject: __attribute__ ((__packed__)) for struct ifreq
To: None <tech-net@netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: tech-net
Date: 05/13/2000 13:15:31
struct ifreq (used by SIOCGIFCONF, in sys/net/if.h) is used as
packed struct. Do anyone object to put __attribute__ ((__packed__))
to the structure? Since it does not come with the attribute
there has been many SEGV on alignment-picky architecutres.
this is one of the motivation for migrating to getifaddrs(3), however,
SIOCGIFCONF is widely used (and it is VERY hard to use SIOCGIFCONF
100% correctly) so I think putting the attribute is more safe.
itojun