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-smb-common.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-smb-common.c')
-rw-r--r-- | packet-smb-common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-smb-common.c b/packet-smb-common.c index 067f401ead..ea07153527 100644 --- a/packet-smb-common.c +++ b/packet-smb-common.c @@ -2,7 +2,7 @@ * Common routines for smb packet dissection * Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> * - * $Id: packet-smb-common.c,v 1.3 2000/02/14 04:22:22 guy Exp $ + * $Id: packet-smb-common.c,v 1.4 2000/05/11 08:15:44 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -49,7 +49,7 @@ int display_ms_value( char *Name, int len, const u_char *pd, int offset, else return 0; - proto_tree_add_text( tree, offset, len, "%s: %u", Name, Temp32); + proto_tree_add_text( tree, NullTVB, offset, len, "%s: %u", Name, Temp32); return len; } @@ -59,7 +59,7 @@ int display_ms_string( char *Name, const u_char *pd, int offset, {/* display a string from the tree and return the amount to move offset */ - proto_tree_add_text( tree, offset, strlen( &pd[offset]) + 1, "%s: %s ", + proto_tree_add_text( tree, NullTVB, offset, strlen( &pd[offset]) + 1, "%s: %s ", Name, &pd[offset]); return strlen( &pd[offset]) + 1; @@ -83,7 +83,7 @@ int display_unicode_string( char *Name, const u_char *pd, int offset, } *OutPtr = 0; /* terminate out string */ - proto_tree_add_text( tree, offset, strlen( Temp) * 2 + 2, "%s: %s ", + proto_tree_add_text( tree, NullTVB, offset, strlen( Temp) * 2 + 2, "%s: %s ", Name, Temp); return strlen( Temp) * 2 + 2; @@ -96,7 +96,7 @@ dissect_smb_unknown( const u_char *pd, int offset, frame_data *fd, /* display data as unknown */ - proto_tree_add_text(tree, offset, END_OF_FRAME, "Data (%u bytes)", + proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "Data (%u bytes)", END_OF_FRAME); } @@ -142,7 +142,7 @@ display_flags( struct flag_array_type *flag_array, int length, } while( array_ptr->mask) { - proto_tree_add_text( tree, offset, 2, "%s%s%s%s", + proto_tree_add_text( tree, NullTVB, offset, 2, "%s%s%s%s", decode_boolean_bitfield( flags, array_ptr->mask, length * 8, "",""), array_ptr->pre_string, |