diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-09-27 03:12:55 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-09-27 03:12:55 +0000 |
commit | 2db2fd635136aa484c059ef98e4b331bcf3ffcbe (patch) | |
tree | afadf5226efab61dc8cf3fe38e991b392b16c6e4 /xdlc.h | |
parent | 19227388043efd0da47ef06e288e0b1d042a237a (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@729 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'xdlc.h')
-rw-r--r-- | xdlc.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |