diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-09-27 03:12:55 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-09-27 03:12:55 +0000 |
commit | a5558d09fe3898b6bc7005b697d106ccece60264 (patch) | |
tree | afadf5226efab61dc8cf3fe38e991b392b16c6e4 /xdlc.h | |
parent | f76a67e084126b063221a0bc4d308ce310c6c698 (diff) | |
download | wireshark-a5558d09fe3898b6bc7005b697d106ccece60264.tar.gz wireshark-a5558d09fe3898b6bc7005b697d106ccece60264.tar.bz2 wireshark-a5558d09fe3898b6bc7005b697d106ccece60264.zip |
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
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); |