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

Joerg Sonnenberger joerg at britannica.bec.de
Thu May 10 05:45:41 PDT 2007


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





More information about the Submit mailing list