- Use CMSG_SPACE() and CMSG_DATA() properly; don't define structures to hold messages, which will not have the correct alignment after the cmsg header.