* Define *DLC frame types, and routine to dissect the control field of
* a *DLC frame.
*
- * $Id: xdlc.h,v 1.4 1999/09/26 20:31:51 guy Exp $
+ * $Id: xdlc.h,v 1.12 2000/01/24 02:05:39 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@unicom.net>
+ * By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
/*
* This macro takes the control field of an xDLC frame, as returned by
* "get_xdlc_control()" or "dissect_xdlc_control()", and evaluates to
- * TRUE if the frame has a payload (i.e., if it's an Information or
- * Unnumbered Information frame) and FALSE if it doesn't.
+ * TRUE if the frame is an "information" frame and FALSE if it isn't.
+ * Note that frames other than information frames can have data in them,
+ * e.g. TEST frames.
*/
-#define XDLC_HAS_PAYLOAD(control) \
- ((control) == XDLC_I || (control) == (XDLC_UI|XDLC_U))
+#define XDLC_IS_INFORMATION(control) \
+ (((control) & 0x1) == XDLC_I || (control) == (XDLC_UI|XDLC_U))
/*
* This macro takes the control field of an xDLC frame, and a flag saying
* whether we're doing basic or extended operation, and evaluates to
* the length of that field (if it's an Unnumbered frame, or we're not
- * in extended mode, it's 3 bytes long, otherwise it's 4 bytes long).
+ * in extended mode, it's 1 byte long, otherwise it's 2 bytes long).
*/
#define XDLC_CONTROL_LEN(control, is_extended) \
- (((control) == XDLC_U || !(is_extended)) ? 3 : 4)
+ ((((control) & 0x3) == XDLC_U || !(is_extended)) ? 1 : 2)
int get_xdlc_control(const u_char *pd, int offset, int is_response,
int extended);
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);
+ proto_tree *xdlc_tree, int hf_xdlc_control, gint ett_xdlc_control,
+ int is_response, int extended);