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-isis-hello.c | |
parent | aa553f63ecc7b9e310a05b743502c50f6dffb800 (diff) |
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-isis-hello.c')
-rw-r--r-- | packet-isis-hello.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-isis-hello.c b/packet-isis-hello.c index 519e0e48b3..9f5c96e139 100644 --- a/packet-isis-hello.c +++ b/packet-isis-hello.c @@ -1,7 +1,7 @@ /* packet-isis-hello.c * Routines for decoding isis hello packets and their CLVs * - * $Id: packet-isis-hello.c,v 1.7 2000/05/11 08:15:16 gram Exp $ + * $Id: packet-isis-hello.c,v 1.8 2000/05/31 05:07:12 guy Exp $ * Stuart Stanley <stuarts@mxmail.net> * * Ethereal - Network traffic analyzer @@ -437,7 +437,7 @@ isis_dissect_isis_hello(int hello_type, int header_length, if (tree) { ti = proto_tree_add_item(tree, proto_isis_hello, NullTVB, - offset, END_OF_FRAME, NULL); + offset, END_OF_FRAME, FALSE); hello_tree = proto_item_add_subtree(ti, ett_isis_hello); proto_tree_add_uint_format(hello_tree, hf_isis_hello_circuit_reserved, @@ -453,16 +453,16 @@ isis_dissect_isis_hello(int hello_type, int header_length, offset + 1, 6, ihp->isis_hello_source_id, "SystemID{ Sender of PDU } : %s", print_system_id( pd + offset + 1, 6 ) ); - proto_tree_add_item(hello_tree, hf_isis_hello_holding_timer, NullTVB, + proto_tree_add_uint(hello_tree, hf_isis_hello_holding_timer, NullTVB, offset + 7, 2,pntohs(&ihp->isis_hello_holding_timer[0])); - proto_tree_add_item(hello_tree, hf_isis_hello_pdu_length, NullTVB, + proto_tree_add_uint(hello_tree, hf_isis_hello_pdu_length, NullTVB, offset + 9, 2,pntohs(&ihp->isis_hello_pdu_length[0])); proto_tree_add_uint_format(hello_tree, hf_isis_hello_priority_reserved, NullTVB, offset + 11, 1, ihp->isis_hello_priority_reserved, "Priority : %d, reserved(0x%02x == 0)", ihp->isis_hello_priority, ihp->isis_hello_preserved ); if (hello_type == ISIS_TYPE_PTP_HELLO) { - proto_tree_add_item(hello_tree, hf_isis_hello_local_circuit_id, NullTVB, + proto_tree_add_uint(hello_tree, hf_isis_hello_local_circuit_id, NullTVB, offset + 12, 1, ihp->isis_hello_lan_id[0] ); } else { proto_tree_add_string_format(hello_tree, hf_isis_hello_lan_id, NullTVB, |