All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Grimm <jgrimm2@us.ibm.com>
To: Bruce Allan <bwa@us.ibm.com>
Cc: lksctp-developers@lists.sourceforge.net,
	linux-net@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: [Lksctp-developers] Re: [PATCH] subset of RFC2553
Date: Thu, 20 Feb 2003 15:24:01 -0600	[thread overview]
Message-ID: <3E554771.5020104@us.ibm.com> (raw)
In-Reply-To: 3E554063.3010008@us.ibm.com



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

      reply	other threads:[~2003-02-20 21:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-19  2:32 [PATCH] subset of RFC2553 Bruce Allan
2003-02-19 23:26 ` [Lksctp-developers] " Jon Grimm
2003-02-20  0:21   ` David S. Miller
2003-02-21 17:06     ` Bruce Allan
2003-02-22  7:23       ` David S. Miller
2003-02-22  7:26       ` David S. Miller
2003-02-24 17:54         ` Bruce Allan
2003-03-03  8:44           ` David S. Miller
2003-02-22  9:26       ` Pekka Savola
2003-02-20  0:23   ` [Lksctp-developers] " Jon Grimm
2003-02-20  1:28     ` Jon Grimm
2003-02-20 20:53       ` Bruce Allan
2003-02-20 21:24         ` Jon Grimm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E554771.5020104@us.ibm.com \
    --to=jgrimm2@us.ibm.com \
    --cc=bwa@us.ibm.com \
    --cc=linux-net@vger.kernel.org \
    --cc=lksctp-developers@lists.sourceforge.net \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.