diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
commit | 292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch) | |
tree | db4edef02456a48d0f6d505166ac7d70f6c0f644 /packet-cgmp.c | |
parent | 162800efb308901e0c302517be01226130e39b19 (diff) |
Add tvbuff class.
Add exceptions routines.
Convert proto_tree_add_*() routines to require tvbuff_t* argument.
Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as
the tvbuff_t* argument to proto_tree_add_*() routines.
dissect_packet() creates a tvbuff_t, wraps the next dissect call in
a TRY block, will print "Short Frame" on the proto_tree if a BoundsError
exception is caught.
The FDDI dissector is converted to use tvbuff's.
svn path=/trunk/; revision=1939
Diffstat (limited to 'packet-cgmp.c')
-rw-r--r-- | packet-cgmp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packet-cgmp.c b/packet-cgmp.c index f07a6908fd..9155aeb682 100644 --- a/packet-cgmp.c +++ b/packet-cgmp.c @@ -1,7 +1,7 @@ /* packet-cgmp.c * Routines for the disassembly of the Cisco Group Management Protocol * - * $Id: packet-cgmp.c,v 1.1 2000/02/05 05:54:15 guy Exp $ + * $Id: packet-cgmp.c,v 1.2 2000/05/11 08:15:04 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -71,32 +71,32 @@ dissect_cgmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) col_add_str(fd, COL_INFO, "Cisco Group Management Protocol"); if (tree) { - ti = proto_tree_add_item(tree, proto_cgmp, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_cgmp, NullTVB, offset, END_OF_FRAME, NULL); cgmp_tree = proto_item_add_subtree(ti, ett_cgmp); - proto_tree_add_item(cgmp_tree, hf_cgmp_version, offset, 1, + proto_tree_add_item(cgmp_tree, hf_cgmp_version, NullTVB, offset, 1, pd[offset]); - proto_tree_add_item(cgmp_tree, hf_cgmp_type, offset, 1, + proto_tree_add_item(cgmp_tree, hf_cgmp_type, NullTVB, offset, 1, pd[offset]); offset += 1; offset += 2; /* skip reserved field */ count = pd[offset]; - proto_tree_add_item(cgmp_tree, hf_cgmp_count, offset, 1, + proto_tree_add_item(cgmp_tree, hf_cgmp_count, NullTVB, offset, 1, count); offset += 1; while (count != 0) { if (!BYTES_ARE_IN_FRAME(offset, 6)) break; - proto_tree_add_item(cgmp_tree, hf_cgmp_gda, offset, 6, + proto_tree_add_item(cgmp_tree, hf_cgmp_gda, NullTVB, offset, 6, &pd[offset]); offset += 6; if (!BYTES_ARE_IN_FRAME(offset, 6)) break; - proto_tree_add_item(cgmp_tree, hf_cgmp_usa, offset, 6, + proto_tree_add_item(cgmp_tree, hf_cgmp_usa, NullTVB, offset, 6, &pd[offset]); offset += 6; |