site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dear all, I habe a problem using ancillary data on 64-bit processes... The macro CMSG_DATA ist defined in /usr/include/sys/socket.h as Therefore programs using ancillary data work, when compiled for 32-bit, but do not work when compiled for 64-bit. I can provide a simple UDP discard server which shows this bug. Is this a known bug? Should it be fixed by changing the CMSG_DATA macros to behave the same on 32-bit and 64-bit processes or should the kernel be changed to adjust the ancillary data? This problem is crucial for our SCTP NKE, which uses ancillary data a lot... Best regards Michael _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... #define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ __DARWIN_ALIGN(sizeof(struct cmsghdr))) __DARWIN_ALIGN behaves different on 32-bit processes and 64-bit processes. Therefore the offset of the CMSG_DATA is 12 bytes on 32-bit processes and 16 byte on 64-bit processes. However, the kernel ignores this difference and puts the CMSG_DATA at a 12 byte offset. This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Tuexen