From e4ba0fc275b1fb47e22d8970b4e453169c171b1e Mon Sep 17 00:00:00 2001 From: mdodd Date: Sun, 18 Mar 2001 05:41:07 +0000 Subject: - Define payload length constants for 4Mbps and 16Mbps. - Use explicit sizes for header structure fields. - Use __attribute__ ((__packed__)) for header structures. - Define struct iso88025_rif; for future use. - Prototype upcoming iso88025_ifdetach() - Get rid of __P() constructs in prototypes. --- sys/net/iso88025.h | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'sys/net/iso88025.h') diff --git a/sys/net/iso88025.h b/sys/net/iso88025.h index b77327b..e30193e 100644 --- a/sys/net/iso88025.h +++ b/sys/net/iso88025.h @@ -75,7 +75,9 @@ * Minimum and maximum packet payload lengths. */ #define ISO88025_MIN_LEN 0 -#define ISO88025_MAX_LEN 17960 +#define ISO88025_MAX_LEN_4 4464 +#define ISO88025_MAX_LEN_16 17960 +#define ISO88025_MAX_LEN ISO88025_MAX_LEN_16 /* * A macro to validate a length with @@ -87,13 +89,18 @@ * ISO 802.5 physical header */ struct iso88025_header { - u_char ac; /* access control field */ - u_char fc; /* frame control field */ - u_char iso88025_dhost[ISO88025_ADDR_LEN]; /* destination address */ - u_char iso88025_shost[ISO88025_ADDR_LEN]; /* source address */ - u_short rcf; /* route control field */ - u_short rd[RIF_MAX_RD]; /* routing designators */ -}; + u_int8_t ac; /* access control field */ + u_int8_t fc; /* frame control field */ + u_int8_t iso88025_dhost[ISO88025_ADDR_LEN]; /* destination address */ + u_int8_t iso88025_shost[ISO88025_ADDR_LEN]; /* source address */ + u_int16_t rcf; /* route control field */ + u_int16_t rd[RIF_MAX_RD]; /* routing designators */ +} __attribute__ ((__packed__)); + +struct iso88025_rif { + u_int16_t rcf; /* route control field */ + u_int16_t rd[RIF_MAX_RD]; /* routing designators */ +} __attribute__ ((__packed__)); struct iso88025_sockaddr_data { u_char ether_dhost[ISO88025_ADDR_LEN]; @@ -114,9 +121,12 @@ struct iso88025_addr { #define ISO88025_DEFAULT_MTU 1500 #define senderr(e) { error = (e); goto bad;} -void iso88025_ifattach __P((struct ifnet *)); -int iso88025_ioctl __P((struct ifnet *, int , caddr_t )); -int iso88025_output __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); -void iso88025_input __P((struct ifnet *, struct iso88025_header *, struct mbuf *)); +void iso88025_ifattach (struct ifnet *); +void iso88025_ifdetach (struct ifnet *, int); +int iso88025_ioctl (struct ifnet *, int , caddr_t ); +int iso88025_output (struct ifnet *, struct mbuf *, struct sockaddr *, + struct rtentry *); +void iso88025_input (struct ifnet *, struct iso88025_header *, + struct mbuf *); #endif -- cgit v1.1