Subject: (IPng 6580) Basic API; "struct in6_addr" section needs to mention alignment issues

From: Mukesh Kacker <[email-masked]>
Date: Mon, 5 Oct 1998 17:22:46 -0700 (PDT)

Jim,
   Some comments on the Basic API. (They are not in the 
newly changed parts but I hope that is OK.)

In Section 3.2, the "struct in6_addr" implementation illustrated is
one with no alignment fields

   struct in6_addr {
       uint8_t  s6_addr[16];      /* IPv6 address */
   }

We should add some text to hint how a real implementation may be different.

In Section 2. (Design Considerations) has a bullet item that states
that addresses should be aligned. In Section 3.3 "sockaddr_in6" also
there is reference to 64-bit alignment boundary desirability for
"struct in6_addr" for performance but the implementation shown is a
"conceptual one" which does not force alignment. I think a strong hint
is needed in section 3.2 also where the real IPv6 address data
structure gets defined. The current definition shown if implemented
literally does not do alignment ! 

I would suggest adding the following words at the end of Section 3.2

"
    The structure in6_addr above is usually implemented with an embedded
    union with extra fields that force the desired alignment level in
    manner similar to BSD implementations of "struct in_addr". Those
    additional implementation details are omitted here for simplicity.
"

-Mukesh Kacker
 Internet Engineering
 Sun Microsystems Inc
 [email-masked]

--------------------------------------------------------------------
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-masked]
--------------------------------------------------------------------

---

From: [email-masked]
Date: Tue, 06 Oct 1998 00:18:46 -0400

A conceptual model should be good enough but I will add the hint.

/jim