Received: with ECARTIS (v1.0.0; list netdev); Thu, 20 Feb 2003 13:17:43 -0800 (PST) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com [32.97.182.103]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id h1KLHZ3v020461 for ; Thu, 20 Feb 2003 13:17:36 -0800 Received: from northrelay01.pok.ibm.com (northrelay01.pok.ibm.com [9.56.224.149]) by e3.ny.us.ibm.com (8.12.7/8.12.2) with ESMTP id h1KLQ55X017076; Thu, 20 Feb 2003 16:26:05 -0500 Received: from us.ibm.com ([9.53.216.106]) by northrelay01.pok.ibm.com (8.12.3/NCO/VER6.5) with ESMTP id h1KLPs94061438; Thu, 20 Feb 2003 16:25:55 -0500 Message-ID: <3E554771.5020104@us.ibm.com> Date: Thu, 20 Feb 2003 15:24:01 -0600 From: Jon Grimm Organization: IBM User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Allan CC: lksctp-developers@lists.sourceforge.net, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [Lksctp-developers] Re: [PATCH] subset of RFC2553 References: <1045621941.1253.21.camel@w-bwa1.beaverton.ibm.com> <3E54128C.327D7759@us.ibm.com> <3E541FEA.C34BEEB7@us.ibm.com> <3E542F52.50001@us.ibm.com> <3E554063.3010008@us.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 1758 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgrimm2@us.ibm.com Precedence: bulk X-list: netdev Bruce Allan wrote: > > #define _SS_MAXSIZE 128 /* Implementation specific max size */ > struct sockaddr_storage { > sa_family_t ss_family; > char __data[_SS_MAXSIZE - sizeof(sa_family_t)]; > } __attribute __ ((aligned(sizeof(struct sockaddr *)))); > This works for me. I really just needed the struct to come out to 128 bytes. > The use of the 'sizeof(struct sockaddr *)' for specifying the required > alignment is just to illustrate the second criteria for this structure > as documented in the RFC, i.e. "It is aligned at an appropriate boundary > so protocol specific socket address data structure pointers can be cast > to it and access their fields without alignment problems...". > Yes. I agree. > I'll resubmit a patch tomorrow with the above definition if there are no > objections. > OK. I compiled this on 4 and 8 byte alignements. jon