diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-05-31 05:09:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-05-31 05:09:07 +0000 |
commit | 283ce59938ad2be252a6232e40a958e177a40e1a (patch) | |
tree | b451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-esis.c | |
parent | aa553f63ecc7b9e310a05b743502c50f6dffb800 (diff) | |
download | wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.gz wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.bz2 wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.zip |
Add routines for adding items to a protocol tree that take arguments of
a particular type, rather than taking a varargs list, along the lines of
the "proto_tree_add_XXX_format()" routines.
Replace most calls to "proto_tree_add_item()" and
"proto_tree_add_item_hidden()" with calls to those routines.
Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to
"proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and
add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()"
routines that don't take the item to be added as an argument - instead,
they fetch the argument from the packet whose tvbuff was handed to them,
from the offset handed to them.
svn path=/trunk/; revision=2031
Diffstat (limited to 'packet-esis.c')
-rw-r--r-- | packet-esis.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-esis.c b/packet-esis.c index 2b3980a155..90f562663f 100644 --- a/packet-esis.c +++ b/packet-esis.c @@ -2,7 +2,7 @@ * Routines for ISO/OSI End System to Intermediate System * Routeing Exchange Protocol ISO 9542. * - * $Id: packet-esis.c,v 1.3 2000/05/11 08:15:07 gram Exp $ + * $Id: packet-esis.c,v 1.4 2000/05/31 05:07:02 guy Exp $ * Ralf Schneider <Ralf.Schneider@t-online.de> * * Ethereal - Network traffic analyzer @@ -319,15 +319,15 @@ dissect_esis(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } if (tree) { - ti = proto_tree_add_item(tree, proto_esis, NullTVB, offset, END_OF_FRAME, NULL ); + ti = proto_tree_add_item(tree, proto_esis, NullTVB, offset, END_OF_FRAME, FALSE); esis_tree = proto_item_add_subtree(ti, ett_esis); - proto_tree_add_item( esis_tree, hf_esis_nlpi, NullTVB, offset, 1, ehdr->esis_nlpi ); - proto_tree_add_item( esis_tree, hf_esis_length, NullTVB, + proto_tree_add_uint( esis_tree, hf_esis_nlpi, NullTVB, offset, 1, ehdr->esis_nlpi ); + proto_tree_add_uint( esis_tree, hf_esis_length, NullTVB, offset + 1, 1, ehdr->esis_length ); - proto_tree_add_item( esis_tree, hf_esis_version, NullTVB, offset + 2, 1, + proto_tree_add_uint( esis_tree, hf_esis_version, NullTVB, offset + 2, 1, ehdr->esis_version ); - proto_tree_add_item( esis_tree, hf_esis_reserved, NullTVB, offset + 3, 1, + proto_tree_add_uint( esis_tree, hf_esis_reserved, NullTVB, offset + 3, 1, ehdr->esis_reserved ); pdu_type_string = val_to_str(ehdr->esis_type&OSI_PDU_TYPE_MASK, |