diff options
author | Michael Mann <mmann78@netscape.net> | 2014-07-09 21:21:32 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-07-10 01:51:21 +0000 |
commit | e6c87fe6b13f43d0c74ea8516d83a38ea4317688 (patch) | |
tree | 27eb9cf5e28b7fdb4fd99477b64e1062b7102cf6 /plugins/docsis/packet-dccreq.c | |
parent | 9b182b7097e339501977f595903c2e837055fb1d (diff) |
convert to proto_tree_add_subtree[_format] for plugin dissectors
Change-Id: I13924c5a2f056688a42cdee25654d82c056b5f97
Reviewed-on: https://code.wireshark.org/review/2974
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/docsis/packet-dccreq.c')
-rw-r--r-- | plugins/docsis/packet-dccreq.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/docsis/packet-dccreq.c b/plugins/docsis/packet-dccreq.c index eedbe0a575..dc842e0488 100644 --- a/plugins/docsis/packet-dccreq.c +++ b/plugins/docsis/packet-dccreq.c @@ -113,13 +113,12 @@ static void dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len) { guint8 type, length; - proto_item *dcc_item; proto_tree *dcc_tree; int pos; pos = start; - dcc_item = proto_tree_add_text ( tree, tvb, start, len, "2 DCC-REQ Downstream Params Encodings (Length = %u)", len); - dcc_tree = proto_item_add_subtree ( dcc_item , ett_docsis_dccreq_ds_params); + dcc_tree = proto_tree_add_subtree_format( tree, tvb, start, len, ett_docsis_dccreq_ds_params, NULL, + "2 DCC-REQ Downstream Params Encodings (Length = %u)", len); while ( pos < ( start + len) ) { @@ -198,13 +197,11 @@ static void dissect_dccreq_sf_sub (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len) { guint8 type, length; - proto_item *dcc_item; proto_tree *dcc_tree; int pos; pos = start; - dcc_item = proto_tree_add_text ( tree, tvb, start, len, "7 DCC-REQ Service Flow Substitution Encodings (Length = %u)", len); - dcc_tree = proto_item_add_subtree ( dcc_item , ett_docsis_dccreq_sf_sub); + dcc_tree = proto_tree_add_subtree_format( tree, tvb, start, len, ett_docsis_dccreq_sf_sub, NULL, "7 DCC-REQ Service Flow Substitution Encodings (Length = %u)", len); while ( pos < ( start + len) ) { @@ -271,8 +268,7 @@ dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { dcc_item = proto_tree_add_protocol_format (tree, proto_docsis_dccreq, tvb, 0, - tvb_length_remaining (tvb, 0), - "DCC-REQ Message"); + -1, "DCC-REQ Message"); dcc_tree = proto_item_add_subtree (dcc_item, ett_docsis_dccreq); proto_tree_add_item (dcc_tree, hf_docsis_dccreq_tran_id, tvb, 0, 2, ENC_BIG_ENDIAN); |