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-lpd.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-lpd.c')
-rw-r--r-- | packet-lpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-lpd.c b/packet-lpd.c index 016076cfe0..c5fb8aa031 100644 --- a/packet-lpd.c +++ b/packet-lpd.c @@ -2,7 +2,7 @@ * Routines for LPR and LPRng packet disassembly * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-lpd.c,v 1.9 1999/08/25 17:38:36 guy Exp $ + * $Id: packet-lpd.c,v 1.10 1999/09/17 05:56:55 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -127,7 +127,7 @@ dissect_lpd(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) printer = strdup(&pd[offset]); line_pos = printer; curr_offset = offset; - while (pi.captured_len > curr_offset) { + while (IS_DATA_IN_FRAME(curr_offset)) { newline = strchr(line_pos, '\n'); if (!newline) { proto_tree_add_text(lpd_tree, curr_offset, |