diff options
author | joerg <joerg@FreeBSD.org> | 2001-12-30 16:52:40 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2001-12-30 16:52:40 +0000 |
commit | 1e44bae71d0a89654071cd9855bc7239b83f5989 (patch) | |
tree | cb78db98af320dcc570834e6603a37aeffc36018 /sys/net/if_spppsubr.c | |
parent | 78076f70e284cd5adeba4fd2eee89eb0b128642b (diff) | |
download | FreeBSD-src-1e44bae71d0a89654071cd9855bc7239b83f5989.zip FreeBSD-src-1e44bae71d0a89654071cd9855bc7239b83f5989.tar.gz |
Add the `packed' attribute to structures which describe wire protocol
data formats.
Obtained from: NetBSD (rev 1.6)
MFC after: 1 month
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 5e87eae..024d959 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -210,14 +210,14 @@ struct ppp_header { u_char address; u_char control; u_short protocol; -}; +} __attribute__((__packed__)); #define PPP_HEADER_LEN sizeof (struct ppp_header) struct lcp_header { u_char type; u_char ident; u_short len; -}; +} __attribute__((__packed__)); #define LCP_HEADER_LEN sizeof (struct lcp_header) struct cisco_packet { @@ -227,8 +227,8 @@ struct cisco_packet { u_short rel; u_short time0; u_short time1; -}; -#define CISCO_PACKET_LEN 18 +} __attribute__((__packed__)); +#define CISCO_PACKET_LEN sizeof (struct cisco_packet) /* * We follow the spelling and capitalization of RFC 1661 here, to make |