diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-06-28 12:54:58 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-06-28 12:54:58 +0000 |
commit | 4b7d057bea2b5be36228b873bf858f8974e0de68 (patch) | |
tree | 0463298f60a2018e240aec4c8494d2f7ae37c08e /sys/netatalk/ddp.h | |
parent | 6aa9e3572e7fac82c3e1ab99331115d32b970a53 (diff) | |
download | FreeBSD-src-4b7d057bea2b5be36228b873bf858f8974e0de68.zip FreeBSD-src-4b7d057bea2b5be36228b873bf858f8974e0de68.tar.gz |
Mark wire data structures in netatalk as __packed so that they are
properly (un)padded on the arm platform. With this change, FreeBSD/arm
boxes are able to route AppleTalk properly.
Submitted/tested by: Nathan Whitehorn <nathanw at uchicago dot edu>
Tested on: arm, i386, amd64
Approved by: re (kensmith)
Diffstat (limited to 'sys/netatalk/ddp.h')
-rw-r--r-- | sys/netatalk/ddp.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/netatalk/ddp.h b/sys/netatalk/ddp.h index 55b55c8..1867ae4 100644 --- a/sys/netatalk/ddp.h +++ b/sys/netatalk/ddp.h @@ -64,7 +64,7 @@ struct elaphdr { u_char el_dnode; u_char el_snode; u_char el_type; -}; +} __packed; #define SZ_ELAPHDR 3 @@ -90,7 +90,7 @@ struct ddpehdr { unsigned dub_hops:4; unsigned dub_pad:2; #endif - } du_bits; + } __packed du_bits; unsigned du_bytes; } deh_u; u_short deh_dnet; @@ -99,7 +99,7 @@ struct ddpehdr { u_char deh_snode; u_char deh_dport; u_char deh_sport; -}; +} __packed; #define deh_pad deh_u.du_bits.dub_pad #define deh_hops deh_u.du_bits.dub_hops #define deh_len deh_u.du_bits.dub_len @@ -123,10 +123,11 @@ struct ddpshdr { unsigned dub_len:10; unsigned dub_pad:6; #endif - } du_bits; + } __packed du_bits; unsigned du_bytes; } dsh_u; -}; +} __packed; + #define dsh_pad dsh_u.du_bits.dub_pad #define dsh_len dsh_u.du_bits.dub_len #define dsh_dport dsh_u.du_bits.dub_dport |