| To: | kuznet@xxxxxxxxxxxxx |
|---|---|
| Subject: | Re: socklen_t instead of size_t in struct cmsghdr |
| From: | Jakub Jelinek <jakub@xxxxxxxxxx> |
| Date: | Mon, 2 Oct 2000 22:01:55 +0200 |
| Cc: | jakub@xxxxxxxxxx, davem@xxxxxxxxxx, ak@xxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <200010021932.XAA25328@xxxxxxxxxxxxx>; from kuznet@xxxxxxxxxxxxx on Mon, Oct 02, 2000 at 11:32:42PM +0400 |
| References: | <20001002120349.L9588@xxxxxxxxxxxxxxxxxxxxxx> <200010021932.XAA25328@xxxxxxxxxxxxx> |
| Reply-to: | Jakub Jelinek <jakub@xxxxxxxxxx> |
| Sender: | owner-netdev@xxxxxxxxxxx |
On Mon, Oct 02, 2000 at 11:32:42PM +0400, kuznet@xxxxxxxxxxxxx wrote:
> Hello!
>
> > Would it be possible to change
>
> I apologize, I have just remembered one thing.
>
> __ ALIGNMENT! __
>
> cmsghdr is aligned differently on 64bit and 32bit architectures,
> so that you have to do real convertor for ultra in any case. :-(
Yes, but the different alignment is because of the 64bit type in struct
cmsghdr.
If you have struct { int a; int b; int c; } then it has the same sizeof and
alignment on 32bit and 64bit, and AFAIK all cmsg payloads don't need
32<->64bit translation (at least from DaveM's comments in the cmsg32
translation code, only SCM_RIGHTS and SCM_CREDENTIALS are done specially
there and one of those is array of int, the other is struct with 3 u32),
which means they have the same alignment as well.
Jakub
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: socklen_t instead of size_t in struct cmsghdr, Jakub Jelinek |
|---|---|
| Next by Date: | how many u32 filters?, Rafal Maszkowski |
| Previous by Thread: | Re: socklen_t instead of size_t in struct cmsghdr, kuznet |
| Next by Thread: | Re: socklen_t instead of size_t in struct cmsghdr, kuznet |
| Indexes: | [Date] [Thread] [Top] [All Lists] |