#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.5 2005-04-26 09:42:44 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.7 2005-04-27 14:35:56 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
};
#define SLARP_MIN_LEN 14
-#define SLARP_LEN 18
+#define SLARP_MAX_LEN 18
static void
chdlc_slarp_print(const u_char *cp, u_int length)
EXTRACT_32BITS(&slarp->un.keep.yourseq),
EXTRACT_16BITS(&slarp->un.keep.rel));
- if (length >= SLARP_MIN_LEN) { /* uptime-stamp is optional */
+ if (length >= SLARP_MAX_LEN) { /* uptime-stamp is optional */
cp += SLARP_MIN_LEN;
if (!TTEST2(*cp, 4))
goto trunc;
break;
}
- if (SLARP_LEN < length && vflag)
- printf(", (trailing junk: %d bytes)", length - SLARP_LEN);
+ if (SLARP_MAX_LEN < length && vflag)
+ printf(", (trailing junk: %d bytes)", length - SLARP_MAX_LEN);
if (vflag > 1)
print_unknown_data(cp+4,"\n\t",length-4);
return;