summaryrefslogtreecommitdiff
path: root/packet-gre.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-09-17 05:56:58 +0000
committerGuy Harris <guy@alum.mit.edu>1999-09-17 05:56:58 +0000
commit96e79ab6f80abdad1e3b525f4febef278de7eacc (patch)
tree7b49cc8eb0de5d9a929aa1676bc1981c3ebcfad3 /packet-gre.c
parentff20b92b67d90a1e14ef73fde3300cec25c54932 (diff)
downloadwireshark-96e79ab6f80abdad1e3b525f4febef278de7eacc.tar.gz
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-gre.c')
-rw-r--r--packet-gre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-gre.c b/packet-gre.c
index 9a6a57fbd7..b8298dfaae 100644
--- a/packet-gre.c
+++ b/packet-gre.c
@@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-gre.c,v 1.5 1999/08/26 07:34:42 guy Exp $
+ * $Id: packet-gre.c,v 1.6 1999/09/17 05:56:54 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -77,7 +77,7 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
col_add_str(fd, COL_INFO, "Encapsulated unknown");
}
- if (pi.captured_len > offset && tree) {
+ if (IS_DATA_IN_FRAME(offset) && tree) {
int is_ppp;
proto_item * ti;
proto_tree * gre_tree;