aboutsummaryrefslogtreecommitdiffstats
path: root/xdlc.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-08-04 04:37:46 +0000
committerGuy Harris <guy@alum.mit.edu>1999-08-04 04:37:46 +0000
commit47d1269da4591df45f5df31e33b275822734c5eb (patch)
tree36bdc95f2acc35c4802d9b5b3a2fb43235f3118d /xdlc.h
parent94f3a2c640c3ec15a58a50ef67f2cf1578934999 (diff)
Add a "dissect_xdlc_control()" routine, to dissect the control field of
SDLC-derived protocols such as HDLC and derivatives of it such as LAPB, IEEE 802.2 LLC, and so on. Have the LLC and LAPB dissectors use it. Make "dissect_numeric_bitfield()" put the low-order bit of the bitfield in the low-order bit of an integer when printing it, so that the right value is printed. svn path=/trunk/; revision=434
Diffstat (limited to 'xdlc.h')
-rw-r--r--xdlc.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/xdlc.h b/xdlc.h
new file mode 100644
index 0000000000..cbc699a37b
--- /dev/null
+++ b/xdlc.h
@@ -0,0 +1,36 @@
+/* xdlc.h
+ * Define *DLC frame types, and routine to dissect the control field of
+ * a *DLC frame.
+ *
+ * $Id: xdlc.h,v 1.1 1999/08/04 04:37:46 guy Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@unicom.net>
+ * Copyright 1998 Gerald Combs
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Low-order bits of first (extended) or only (basic) octet of control
+ * field, specifying the frame type.
+ */
+#define XDLC_I 0x00 /* Information frames */
+#define XDLC_S 0x01 /* Supervisory frames */
+#define XDLC_U 0x03 /* Unnumbered frames */
+
+int dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd,
+ proto_tree *xdlc_tree, int hf_xdlc_control, int is_response, int extended);