DragonFly submit List (threaded) for 2007-05
DragonFly BSD
DragonFly submit List (threaded) for 2007-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [PATCH] ICMP extensions for MPLS support for traceroute(8)


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 10 May 2007 14:44:32 +0200
Mail-followup-to: submit@crater.dragonflybsd.org

On Thu, May 10, 2007 at 02:13:36PM +0300, Hasso Tepper wrote:
> +/*
> + * ICMP extensions, common header
> + */
> +struct icmp_ext_cmn_hdr {
> +#if BYTE_ORDER == BIG_ENDIAN
> +	unsigned char   version:4;
> +	unsigned char   reserved1:4;
> +#else
> +	unsigned char   reserved1:4;
> +	unsigned char   version:4;
> +#endif
> +	unsigned char   reserved2;
> +	unsigned short  checksum;
> +};

Please don't add new code that depends on the order of bitfields.
(Or bitfields in general for wire protocols).

Joerg



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]