summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-07-28 20:02:42 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-07-28 20:02:42 +0000
commita3e88823e044692f45ac5d63023e60d2e605452b (patch)
tree94e0ccb787e1b2458c1f734a7f9118b0b9d4e09c
parent6eaf4f9b6667259e662302bc556d1f2bf3346e80 (diff)
Add LLC_SNAPFRAMELEN define. indent.
-rw-r--r--sys/net/if_fddisubr.c4
-rw-r--r--sys/net/if_llc.h61
2 files changed, 33 insertions, 32 deletions
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 164c6976304..4a3f3668307 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fddisubr.c,v 1.18 1999/01/08 00:56:45 deraadt Exp $ */
+/* $OpenBSD: if_fddisubr.c,v 1.19 1999/07/28 20:02:41 fgsch Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */
/*
@@ -474,7 +474,7 @@ fddi_input(ifp, fh, m)
if (l->llc_snap.org_code[0] != 0 || l->llc_snap.org_code[1] != 0|| l->llc_snap.org_code[2] != 0)
goto dropanyway;
etype = ntohs(l->llc_snap.ether_type);
- m_adj(m, 8);
+ m_adj(m, LLC_SNAPFRAMELEN);
switch (etype) {
#ifdef INET
case ETHERTYPE_IP:
diff --git a/sys/net/if_llc.h b/sys/net/if_llc.h
index 3c6b0c12156..a9ba367a983 100644
--- a/sys/net/if_llc.h
+++ b/sys/net/if_llc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_llc.h,v 1.2 1997/02/24 13:34:00 niklas Exp $ */
+/* $OpenBSD: if_llc.h,v 1.3 1999/07/28 20:02:41 fgsch Exp $ */
/* $NetBSD: if_llc.h,v 1.6 1995/03/08 02:56:57 cgd Exp $ */
/*
@@ -83,44 +83,45 @@ struct llc {
} type_raw;
} llc_un;
};
-#define llc_control llc_un.type_u.control
+#define llc_control llc_un.type_u.control
#define llc_control_ext llc_un.type_raw.control_ext
-#define llc_fid llc_un.type_u.format_id
-#define llc_class llc_un.type_u.class
-#define llc_window llc_un.type_u.window_x2
-#define llc_frmrinfo llc_un.type_frmr.frmrinfo
-#define llc_frmr_pdu0 llc_un.type_frmr.frmrinfo.rej_pdu0
-#define llc_frmr_pdu1 llc_un.type_frmr.frmrinfo.rej_pdu1
-#define llc_frmr_control llc_un.type_frmr.frmrinfo.frmr_control
-#define llc_frmr_control_ext llc_un.type_frmr.frmrinfo.frmr_control_ext
-#define llc_frmr_cause llc_un.type_frmr.frmrinfo.frmr_control_ext
+#define llc_fid llc_un.type_u.format_id
+#define llc_class llc_un.type_u.class
+#define llc_window llc_un.type_u.window_x2
+#define llc_frmrinfo llc_un.type_frmr.frmrinfo
+#define llc_frmr_pdu0 llc_un.type_frmr.frmrinfo.rej_pdu0
+#define llc_frmr_pdu1 llc_un.type_frmr.frmrinfo.rej_pdu1
+#define llc_frmr_control llc_un.type_frmr.frmrinfo.frmr_control
+#define llc_frmr_control_ext llc_un.type_frmr.frmrinfo.frmr_control_ext
+#define llc_frmr_cause llc_un.type_frmr.frmrinfo.frmr_control_ext
/*
* Don't use sizeof(struct llc_un) for LLC header sizes
*/
-#define LLC_ISFRAMELEN 4
-#define LLC_UFRAMELEN 3
-#define LLC_FRMRLEN 7
+#define LLC_UFRAMELEN 3
+#define LLC_ISFRAMELEN 4
+#define LLC_FRMRLEN 7
+#define LLC_SNAPFRAMELEN 8
/*
* Unnumbered LLC format commands
*/
-#define LLC_UI 0x3
-#define LLC_UI_P 0x13
-#define LLC_DISC 0x43
+#define LLC_UI 0x3
+#define LLC_UI_P 0x13
+#define LLC_DISC 0x43
#define LLC_DISC_P 0x53
-#define LLC_UA 0x63
-#define LLC_UA_P 0x73
-#define LLC_TEST 0xe3
-#define LLC_TEST_P 0xf3
-#define LLC_FRMR 0x87
+#define LLC_UA 0x63
+#define LLC_UA_P 0x73
+#define LLC_TEST 0xe3
+#define LLC_TEST_P 0xf3
+#define LLC_FRMR 0x87
#define LLC_FRMR_P 0x97
-#define LLC_DM 0x0f
+#define LLC_DM 0x0f
#define LLC_DM_P 0x1f
-#define LLC_XID 0xaf
-#define LLC_XID_P 0xbf
-#define LLC_SABME 0x6f
-#define LLC_SABME_P 0x7f
+#define LLC_XID 0xaf
+#define LLC_XID_P 0xbf
+#define LLC_SABME 0x6f
+#define LLC_SABME_P 0x7f
/*
* Supervisory LLC commands
@@ -137,6 +138,6 @@ struct llc {
/*
* ISO PDTR 10178 contains among others
*/
-#define LLC_X25_LSAP 0x7e
-#define LLC_SNAP_LSAP 0xaa
-#define LLC_ISO_LSAP 0xfe
+#define LLC_X25_LSAP 0x7e
+#define LLC_SNAP_LSAP 0xaa
+#define LLC_ISO_LSAP 0xfe