From 1e44bae71d0a89654071cd9855bc7239b83f5989 Mon Sep 17 00:00:00 2001 From: joerg Date: Sun, 30 Dec 2001 16:52:40 +0000 Subject: Add the `packed' attribute to structures which describe wire protocol data formats. Obtained from: NetBSD (rev 1.6) MFC after: 1 month --- sys/net/if_spppsubr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') 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 -- cgit v1.1