[parisc-linux] gcc-3.[02] alignment problem
Randolph Chung
tausq@debian.org
Wed Jul 17 05:26:00 GMT 2002
> > why is the offset of tcpdiag_cookie[0] 44 and not 40?
>
> 0 tcpdiag_sport
> 2 tcpdiag_dport
> 4 tcpdiag_src
> 20 tcpdiag_dst
> 36 tcpdiag_if
> 40 tcpdiag_cookie
>
> hmm.. worth checking that dport is at offset 2, not offset 4?
oic, it's embedded inside another structure:
struct tcpdiagmsg
{
__u8 tcpdiag_family;
__u8 tcpdiag_state;
__u8 tcpdiag_timer;
__u8 tcpdiag_retrans;
struct tcpdiag_sockid id;
__u32 tcpdiag_expires;
__u32 tcpdiag_rqueue;
__u32 tcpdiag_wqueue;
__u32 tcpdiag_uid;
__u32 tcpdiag_inode;
};
that's why it's 44...
randolph
More information about the Gcc
mailing list