From 292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Thu, 11 May 2000 08:18:09 +0000 Subject: 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 --- packet-bootparams.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packet-bootparams.c') diff --git a/packet-bootparams.c b/packet-bootparams.c index fa5a0af688..d644f05cad 100644 --- a/packet-bootparams.c +++ b/packet-bootparams.c @@ -1,7 +1,7 @@ /* packet-bootparams.c * Routines for bootparams dissection * - * $Id: packet-bootparams.c,v 1.9 2000/04/04 06:46:24 guy Exp $ + * $Id: packet-bootparams.c,v 1.10 2000/05/11 08:15:03 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -62,7 +62,7 @@ int dissect_bp_address(const u_char *pd, int offset, frame_data *fd, if ( !BYTES_ARE_IN_FRAME(offset, 1)) return offset; type = pntohl(&pd[offset]); /* type of address */ #if 0 - proto_tree_add_item(tree, hf_bootparams_addresstype, + proto_tree_add_item(tree, hf_bootparams_addresstype, NullTVB, offset, 4, type); #endif offset += 4; @@ -76,7 +76,7 @@ int dissect_bp_address(const u_char *pd, int offset, frame_data *fd, if ( ! BYTES_ARE_IN_FRAME(offset, 16)) return offset; ipaddr = (pd[offset+3]<<24) + (pd[offset+7]<<16) + (pd[offset+11]<<8) + (pd[offset+15]); - proto_tree_add_item(tree, hfindex, + proto_tree_add_item(tree, hfindex, NullTVB, offset, 16, ntohl(ipaddr)); offset += 16; -- cgit v1.2.3