On Thu, Aug 04, 2005 at 06:49:46AM -0700, David S. Miller wrote: > From: Harald Welte <[EMAIL PROTECTED]> > Date: Thu, 4 Aug 2005 00:03:53 +0200 > > > However, all nfnetlink-based protocols are supposed to be both endian > > and 32/64 as well as alignment (*) safe. the protocol definitions > > always use u_intXX_t types, all network byte order, and no kernel pointers > > passed to userspace or similar crap ;) > > You cannot use "u64" objects, even though that is supposed to > be a portable type. i386 does not align u64's on an 8-byte > boundary, whereas every sane platform in the world (including > x86_64) does.
Well you can, just you need to make sure they are properly aligned by hand. And a more subtle issue is that structures are padded to a multiple of the largest alignment of any member. So when a structure has an u64 member it must be padded at the end to 8 bytes too. But this is all relatively subtle, so some review and some testing before fixing the interface would be good. -Andi - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html