Add the `packed' attribute to structures which describe wire protocol

data formats.

Obtained from:	NetBSD (rev 1.6)
MFC after:	1 month
This commit is contained in:
Joerg Wunsch 2001-12-30 16:52:40 +00:00
parent 4e481b6c28
commit 61e3f21a46
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88704

View File

@ -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