aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-09-27 03:12:55 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-09-27 03:12:55 +0000
commita5558d09fe3898b6bc7005b697d106ccece60264 (patch)
treeafadf5226efab61dc8cf3fe38e991b392b16c6e4
parentf76a67e084126b063221a0bc4d308ce310c6c698 (diff)
Mask out unnecessary bits in control guint16 in order to properly
compare against XDLC_I, XDLC_UI, and XDLC_U in XDLC_HAS_PAYLOAD() and XDLC_CONTROL_LEN() macros. svn path=/trunk/; revision=729
-rw-r--r--xdlc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xdlc.h b/xdlc.h
index d3092719c0..878f903890 100644
--- a/xdlc.h
+++ b/xdlc.h
@@ -2,7 +2,7 @@
* 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.5 1999/09/27 03:12:55 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -64,7 +64,7 @@
* Unnumbered Information frame) and FALSE if it doesn't.
*/
#define XDLC_HAS_PAYLOAD(control) \
- ((control) == XDLC_I || (control) == (XDLC_UI|XDLC_U))
+ ((control & 0x3) == XDLC_I || (control & 0x3) == (XDLC_UI|XDLC_U))
/*
* This macro takes the control field of an xDLC frame, and a flag saying
@@ -73,7 +73,7 @@
* in extended mode, it's 3 bytes long, otherwise it's 4 bytes long).
*/
#define XDLC_CONTROL_LEN(control, is_extended) \
- (((control) == XDLC_U || !(is_extended)) ? 3 : 4)
+ (((control & 0x3) == XDLC_U || !(is_extended)) ? 3 : 4)
int get_xdlc_control(const u_char *pd, int offset, int is_response,
int extended);