summaryrefslogtreecommitdiffstats
path: root/sys/net/iso88025.h
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2001-03-18 05:41:07 +0000
committermdodd <mdodd@FreeBSD.org>2001-03-18 05:41:07 +0000
commite4ba0fc275b1fb47e22d8970b4e453169c171b1e (patch)
tree6c7744ce82676d1c2ff2f89419d562521b538e6a /sys/net/iso88025.h
parent45b550350441ec190d3ba72f0f2d3156e0f0c190 (diff)
downloadFreeBSD-src-e4ba0fc275b1fb47e22d8970b4e453169c171b1e.zip
FreeBSD-src-e4ba0fc275b1fb47e22d8970b4e453169c171b1e.tar.gz
- 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.
Diffstat (limited to 'sys/net/iso88025.h')
-rw-r--r--sys/net/iso88025.h34
1 files changed, 22 insertions, 12 deletions
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
OpenPOWER on IntegriCloud