(Sorry for the delayed response)

>>>>> On Wed, 11 Sep 2002 15:29:42 -0700, 
>>>>> Michael Hunter <[EMAIL PROTECTED]> said:

> It would be easier to use if a c99 flexible array member was the last
> element:

>        /* Type 0 Routing header */
>        struct ip6_rthdr0 {
>          uint8_t  ip6r0_nxt;       /* next header */
>          uint8_t  ip6r0_len;       /* length in units of 8 octets */
>          uint8_t  ip6r0_type;      /* always zero */
>          uint8_t  ip6r0_segleft;   /* segments left */
>          uint32_t ip6r0_reserved;  /* reserved field */
> #if __STDC_VERSION__ >= 199901L
>       struct in6_addr ip6r0_addr[0]; /* up to 127 addresses */
> #endif
>        };

Sorry, but I don't think we should incorporate this to the
specification.  If an application writer assumes the existence of
ip6r0_addr, the source code will not compile with a compiler that
does not support the flexible array member.  However, I don't want to
see conditional compilation tricks like this:

        struct ip6_rthdr0 *r;
        struct in6_addr *in6;

#if __STDC_VERSION__ >= 199901L
        in6 = &r->ip6r0_addr[0];
#else
        in6 = (struct in6_addr *)(r + 1);
#endif

                                        JINMEI, Tatuya
                                        Communication Platform Lab.
                                        Corporate R&D Center, Toshiba Corp.
                                        [EMAIL PROTECTED]
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to