On Sunday 2010-02-28 17:28, Pablo Neira Ayuso wrote: >>>> + >>>> +struct ulogd_unixsock_option_t { >>>> + uint16_t option_id; >>>> + uint16_t option_length; >>>> + char option_value[0]; >>>> +} __attribute__((packed)); >>>> + >>>> +#define ALIGN_SIZE 8 >>> Minor question: why align this to 64 bits? >> >> I originally used an alignment to 32 bits, but Jan noticed it would >> break if using options/values on 64 bits (and a test confirmed that). I >> took 64 bits as the biggest allowed value for integers. > >I would need to look into this in more detail, not sure where the >problem is. The problem is that *(uint64_t *)x as used in unixsock.c would otherwise cause an unaligned access. Copying from an odd address is thus more costly. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html