diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-09-17 05:56:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-09-17 05:56:58 +0000 |
commit | 96e79ab6f80abdad1e3b525f4febef278de7eacc (patch) | |
tree | 7b49cc8eb0de5d9a929aa1676bc1981c3ebcfad3 /packet-cdp.c | |
parent | ff20b92b67d90a1e14ef73fde3300cec25c54932 (diff) |
Add a "BYTES_ARE_IN_FRAME()" macro, to test whether there are a
specified number of bytes of captured data in the frame at the specified
offset, and a "IS_DATA_IN_FRAME()" macro, to test whether there are any
bytes of captured data in the frame at the specified offset, and convert
some bounds checks to use them.
Add a dissector for the Internet Printing Protocol.
svn path=/trunk/; revision=685
Diffstat (limited to 'packet-cdp.c')
-rw-r--r-- | packet-cdp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-cdp.c b/packet-cdp.c index b0aad0d368..29dd383672 100644 --- a/packet-cdp.c +++ b/packet-cdp.c @@ -2,7 +2,7 @@ * Routines for the disassembly of the "Cisco Discovery Protocol" * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-cdp.c,v 1.13 1999/08/25 00:42:49 guy Exp $ + * $Id: packet-cdp.c,v 1.14 1999/09/17 05:56:53 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -97,7 +97,7 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { pntohs(&pd[offset])); offset += 2; - while( offset < pi.captured_len ){ + while( IS_DATA_IN_FRAME(offset) ){ type = pntohs(&pd[offset + TLV_TYPE]); length = pntohs(&pd[offset + TLV_LENGTH]); type_str = val_to_str(type, type_vals, |