summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorchuck <chuck@cvs.openbsd.org>1996-11-09 23:02:33 +0000
committerchuck <chuck@cvs.openbsd.org>1996-11-09 23:02:33 +0000
commit08b80758e6c9cb53180a1e4bc42ac85ab4df4e20 (patch)
tree170aa551b63ebae482e2b3863d5def1154f4833d /sys
parentfb93ff81f8acf7a82626e895aa7861171cafc005 (diff)
fix previous byte-order fix the correct way
(from Zdenek Salvet <salvet@horn.ics.muni.cz>)
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_atm.h5
-rw-r--r--sys/net/if_atmsubr.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/if_atm.h b/sys/net/if_atm.h
index a30fe506749..f94f02da05c 100644
--- a/sys/net/if_atm.h
+++ b/sys/net/if_atm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atm.h,v 1.7 1996/07/03 17:14:30 chuck Exp $ */
+/* $OpenBSD: if_atm.h,v 1.8 1996/11/09 23:02:31 chuck Exp $ */
/*
*
@@ -95,7 +95,8 @@ struct atmllc {
u_int8_t type[2]; /* "ethernet" type */
};
-#define ATM_LLC_TYPE(X) (((X)->type[1] << 8) | ((X)->type[0]))
+/* ATM_LLC macros: note type code in host byte order */
+#define ATM_LLC_TYPE(X) (((X)->type[0] << 8) | ((X)->type[1]))
#define ATM_LLC_SETTYPE(X,V) { \
(X)->type[1] = ((V) >> 8) & 0xff; \
(X)->type[0] = ((V) & 0xff); \
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c
index 02bcdfb6050..9568d591a64 100644
--- a/sys/net/if_atmsubr.c
+++ b/sys/net/if_atmsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atmsubr.c,v 1.7 1996/10/18 19:28:17 chuck Exp $ */
+/* $OpenBSD: if_atmsubr.c,v 1.8 1996/11/09 23:02:32 chuck Exp $ */
/*
*
@@ -258,7 +258,7 @@ atm_input(ifp, ah, m, rxhand)
m_freem(m);
return;
}
- etype = ntohs(ATM_LLC_TYPE(alc));
+ etype = ATM_LLC_TYPE(alc);
m_adj(m, sizeof(*alc));
}