aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimax
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-07-09 21:21:32 -0400
committerMichael Mann <mmann78@netscape.net>2014-07-10 01:51:21 +0000
commite6c87fe6b13f43d0c74ea8516d83a38ea4317688 (patch)
tree27eb9cf5e28b7fdb4fd99477b64e1062b7102cf6 /plugins/wimax
parent9b182b7097e339501977f595903c2e837055fb1d (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/wimax')
-rw-r--r--plugins/wimax/msg_dlmap.c230
-rw-r--r--plugins/wimax/msg_ulmap.c217
-rw-r--r--plugins/wimax/packet-wmx.c10
3 files changed, 152 insertions, 305 deletions
diff --git a/plugins/wimax/msg_dlmap.c b/plugins/wimax/msg_dlmap.c
index 455e419cd7..b4176f79db 100644
--- a/plugins/wimax/msg_dlmap.c
+++ b/plugins/wimax/msg_dlmap.c
@@ -319,8 +319,7 @@ gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint leng
else if (RCID_Type_lcl == 3) length = 4;
}
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, length), "RCID_IE");
- tree = proto_item_add_subtree(ti, ett_286j);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, length), ett_286j, &ti, "RCID_IE");
if (RCID_Type_lcl == 0) {
XBIT(cid, 16, "CID");
@@ -360,16 +359,14 @@ static gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bufptr,
/* offset of IE in nibbles, length is variable */
gint nib;
gint nibble;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint len;
nib = offset;
length = NIB_NIBBLE(nib, bufptr); /* length in nibbles */
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(nib, length+1), "Dedicated_DL_Control_IE");
- tree = proto_item_add_subtree(ti, ett_286i);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(nib, length+1), ett_286i, NULL, "Dedicated_DL_Control_IE");
proto_tree_add_text(tree, tvb, NIBHI(nib,1), "Length: %d", length);
nib++;
@@ -399,16 +396,14 @@ static gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, const guint8 *bu
/* offset of IE in bits, length is variable */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint mci, cqi, cmi, matrix = 0, pad, CQICH_num, mimo_mode;
gint j;
bit = offset;
/* 8.4.5.3.21 table 286t */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 1), "Dedicated MIMO DL Control IE");
- tree = proto_item_add_subtree(ti, ett_286t);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286t, NULL, "Dedicated MIMO DL Control IE");
XBIT(length, 5, "Length (nibbles)");
XBIT(mci, 1, "Control Header (MIMO Control Info)");
@@ -473,16 +468,14 @@ static gint DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufp
/* offset of IE in nibbles, length is variable */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint nsub, ddci, dur, sbi, res, diuc, rci, ind, per, ofs;
gint j;
bit = NIB_TO_BIT(offset);
/* 8.4.5.3.21 table 286m */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, length), "DL_HARQ_Chase_sub_burst_IE");
- tree = proto_item_add_subtree(ti, ett_286m);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, length), ett_286m, NULL, "DL_HARQ_Chase_sub_burst_IE");
XBIT(nsub, 4, "N sub burst[ISI]");
XBIT(data, 4, "N ACK channel");
@@ -528,8 +521,7 @@ static gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *buf
/* offset of IE in nibbles, length is variable */
gint bit;
guint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
proto_item *generic_item = NULL;
gint nsub, ddci, dur, ind, per, ofs;
gint j;
@@ -538,8 +530,7 @@ static gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *buf
bit = NIB_TO_BIT(offset);
/* 8.4.5.3.21 table 286n */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 4), "DL HARQ IR CTC sub-burst IE");
- tree = proto_item_add_subtree(ti, ett_286n);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 4), ett_286n, NULL, "DL HARQ IR CTC sub-burst IE");
XBIT(nsub, 4, "N sub burst[ISI]");
XBIT(data, 4, "N ACK channel");
@@ -593,8 +584,7 @@ static gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufp
/* offset of IE in nibbles, length is variable */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
proto_item *generic_item = NULL;
gint nsub, sbdi, ddci, dur, ind, per, ofs;
gint j;
@@ -603,8 +593,7 @@ static gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufp
bit = NIB_TO_BIT(offset);
/* 8.4.5.3.21 table 286o */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 4), "DL HARQ IR CC sub-burst IE");
- tree = proto_item_add_subtree(ti, ett_286o);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 4), ett_286o, NULL, "DL HARQ IR CC sub-burst IE");
XBIT(nsub, 4, "N sub burst[ISI]");
XBIT(data, 4, "N ACK channel");
@@ -666,8 +655,7 @@ static gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8
/* offset of IE in nibbles, length is variable */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
proto_item *generic_item = NULL;
gint nsub, mui, dci, akd;
gint i, j;
@@ -676,8 +664,7 @@ static gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8
bit = NIB_TO_BIT(offset);
/* 8.4.5.3.21 table 286p */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 1), "MIMO DL Chase HARQ sub-burst IE");
- tree = proto_item_add_subtree(ti, ett_286p);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286p, NULL, "MIMO DL Chase HARQ sub-burst IE");
XBIT(nsub, 4, "N sub burst[ISI]");
XBIT(data, 6, "N ACK channel");
@@ -735,8 +722,7 @@ static gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bu
/* offset of IE in nibbles, length is variable */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
proto_item *generic_item = NULL;
gint nsub, mui, dci, akd;
gint i, j;
@@ -745,8 +731,7 @@ static gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bu
bit = NIB_TO_BIT(offset);
/* 8.4.5.3.21 table 286q */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 4), "MIMO DL IR HARQ sub-burst IE");
- tree = proto_item_add_subtree(ti, ett_286q);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 4), ett_286q, NULL, "MIMO DL IR HARQ sub-burst IE");
XBIT(nsub, 4, "N sub burst[ISI]");
XBIT(data, 6, "N ACK channel");
@@ -798,8 +783,7 @@ static gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, const gui
/* offset of IE in nibbles, length is variable */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
proto_item *generic_item = NULL;
gint nsub, mui, dci, akd;
gint i, j;
@@ -808,8 +792,7 @@ static gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, const gui
bit = NIB_TO_BIT(offset);
/* 8.4.5.3.21 table 286r */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 1), "MIMO DL IR HARQ for CC sub-burst IE");
- tree = proto_item_add_subtree(ti, ett_286r);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286r, NULL, "MIMO DL IR HARQ for CC sub-burst IE");
XBIT(nsub, 4, "N sub burst[ISI]");
XBIT(data, 6, "N ACK channel");
@@ -862,8 +845,7 @@ static gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *b
/* offset of IE in nibbles, length is variable */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
proto_item *generic_item = NULL;
gint nsub, sbi, txc, akd, dmci;
gint j;
@@ -872,8 +854,7 @@ static gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *b
bit = NIB_TO_BIT(offset);
/* 8.4.5.3.21 table 286s */
- ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, 1), "MIMO DL STC HARQ sub-burst IE");
- tree = proto_item_add_subtree(ti, ett_286s);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286s, NULL, "MIMO DL STC HARQ sub-burst IE");
XBIT(nsub, 4, "N sub burst[ISI]");
XBIT(data, 6, "N ACK channel");
@@ -930,14 +911,12 @@ static gint MBS_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint mde, dci, s3i;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "MBS_MAP_IE");
- tree = proto_item_add_subtree(ti, ett_286a);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286a, NULL, "MBS_MAP_IE");
XBIT(data, 4, "Extended-2 DIUC");
XBIT(data, 8, "Length");
@@ -989,13 +968,11 @@ static gint HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufp
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "HO_Anchor_Active_DL_MAP_IE");
- tree = proto_item_add_subtree(ti, ett_286c);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286c, NULL, "HO_Anchor_Active_DL_MAP_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1010,13 +987,11 @@ static gint HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufp
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "HO_Active_Anchor_DL_MAP_IE");
- tree = proto_item_add_subtree(ti, ett_286d);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286d, NULL, "HO_Active_Anchor_DL_MAP_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1031,13 +1006,11 @@ static gint HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, const guint8 *bufpt
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "CID_Translation_MAP_IE");
- tree = proto_item_add_subtree(ti, ett_286e);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286e, NULL, "CID_Translation_MAP_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1052,13 +1025,11 @@ static gint MIMO_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *bufptr, g
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "MIMO_in_another_BS_IE");
- tree = proto_item_add_subtree(ti, ett_286f);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286f, NULL, "MIMO_in_another_BS_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1073,13 +1044,11 @@ static gint Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr,
/* offset of tlv in nibbles, length of tlv in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "Macro_MIMO_DL_Basic_IE");
- tree = proto_item_add_subtree(ti, ett_286g);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286g, NULL, "Macro_MIMO_DL_Basic_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1094,13 +1063,11 @@ static gint Skip_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gi
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "Skip_IE");
- tree = proto_item_add_subtree(ti, ett_286k);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286k, NULL, "Skip_IE");
XBIT(data, 4, "Extended-2 DIUC");
XBIT(data, 8, "Length");
@@ -1118,14 +1085,12 @@ static gint HARQ_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint off
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint len, lastbit, rui, mode, sub_len, pad;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "HARQ_DL_MAP_IE");
- tree = proto_item_add_subtree(ti, ett_286l);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286l, NULL, "HARQ_DL_MAP_IE");
XBIT(data, 4, "Extended-2 DIUC");
XBIT(len, 8, "Length");
@@ -1200,13 +1165,11 @@ static gint HARQ_ACK_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset
/* offset of TLV in nibbles, length of TLV in nibbles */
gint data;
gint nib;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "HARQ_ACK_IE");
- tree = proto_item_add_subtree(ti, ett_286u);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286u, NULL, "HARQ_ACK_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1223,15 +1186,13 @@ static gint Enhanced_DL_MAP_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint numass, n_cid;
gint i, n;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "Enhanced_DL-MAP_IE");
- tree = proto_item_add_subtree(ti, ett_286v);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286v, NULL, "Enhanced_DL-MAP_IE");
XBIT(data, 4, "Extended-2 DIUC");
XBIT(data, 8, "Length");
@@ -1260,13 +1221,11 @@ static gint Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "CL_MIMO_DL_Enhanced_IE");
- tree = proto_item_add_subtree(ti, ett_286w);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286w, NULL, "CL_MIMO_DL_Enhanced_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1281,8 +1240,7 @@ static gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint off
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint num_region, num_users, pilot_pattern, encoding_mode, ackch_alloc, cqich_alloc;
gint aas_preamble = 1;
gint zone_permut = 0; /* TODO */
@@ -1290,8 +1248,7 @@ static gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint off
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "AAS_SDMA_DL_IE");
- tree = proto_item_add_subtree(ti, ett_286y);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286y, NULL, "AAS_SDMA_DL_IE");
XBIT(data, 4, "Extended-2 DIUC");
XBIT(data, 8, "Length");
@@ -1397,13 +1354,11 @@ static gint Channel_Measurement_IE(proto_tree *diuc_tree, const guint8 *bufptr,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "Channel_Measurement_IE");
- tree = proto_item_add_subtree(ti, ett_280);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_280, NULL, "Channel_Measurement_IE");
XNIB(data, 1, "Extended DIUC");
XNIB(data, 1, "Length");
@@ -1425,13 +1380,11 @@ static gint STC_Zone_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset
* used in 8.4.5.3.21.1 Dedicated MIMO Control IE 286t */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "STC_Zone_IE");
- tree = proto_item_add_subtree(ti, ett_279);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_279, NULL, "STC_Zone_IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1460,13 +1413,11 @@ static gint AAS_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "AAS_DL_IE");
- tree = proto_item_add_subtree(ti, ett_278);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_278, NULL, "AAS_DL_IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1490,13 +1441,11 @@ static gint Data_location_in_another_BS_IE(proto_tree *diuc_tree, const guint8 *
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "Data location in another BS IE");
- tree = proto_item_add_subtree(ti, ett_281);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_281, NULL, "Data location in another BS IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1525,16 +1474,13 @@ static gint CID_Switch_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offs
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
INC_CID = INC_CID ? 0 : 1;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "CID_Switch_IE");
- proto_item_append_text(ti, " (INC_CID = %d)",INC_CID);
- tree = proto_item_add_subtree(ti, ett_282);
+ tree = proto_tree_add_subtree_format(diuc_tree, tvb, NIBHI(offset, length), ett_282, NULL, "CID_Switch_IE (INC_CID = %d)", INC_CID);
XNIB(data, 1, "Extended DIUC");
XNIB(data, 1, "Length");
@@ -1549,13 +1495,11 @@ static gint MIMO_DL_Basic_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint o
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "MIMO_DL_Basic_IE");
- tree = proto_item_add_subtree(ti, ett_283);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_283, NULL, "MIMO_DL_Basic_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1570,13 +1514,11 @@ static gint MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, const guint8 *bufptr, gin
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "MIMO_DL_Enhanced_IE");
- tree = proto_item_add_subtree(ti, ett_284);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_284, NULL, "MIMO_DL_Enhanced_IE");
XNIB(data, 1, "Extended-2 DIUC");
XNIB(data, 2, "Length");
@@ -1591,14 +1533,12 @@ static gint HARQ_Map_Pointer_IE(proto_tree *diuc_tree, const guint8 *bufptr, gin
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint length_in_bits, rep, map, diuc, slots, idle, sleep, mask_len;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "HARQ_Map_Pointer_IE");
- tree = proto_item_add_subtree(ti, ett_285);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_285, NULL, "HARQ_Map_Pointer_IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1642,14 +1582,12 @@ static gint PHYMOD_DL_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offse
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint pmt;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "PHYMOD_DL_IE");
- tree = proto_item_add_subtree(ti, ett_286);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286, NULL, "PHYMOD_DL_IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1673,14 +1611,12 @@ static gint Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, const guint8 *bu
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint skip;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "Broadcast Control Pointer IE");
- tree = proto_item_add_subtree(ti, ett_286x);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286x, NULL, "Broadcast Control Pointer IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1701,13 +1637,11 @@ static gint DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "DL_PUSC_Burst_Allocation_in_Other_Segment_IE");
- tree = proto_item_add_subtree(ti, ett_286b);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286b, NULL, "DL_PUSC_Burst_Allocation_in_Other_Segment_IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1737,13 +1671,11 @@ static gint PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "PUSC_ASCA_Alloc_IE");
- tree = proto_item_add_subtree(ti, ett_286z);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286z, NULL, "PUSC_ASCA_Alloc_IE");
XBIT(data, 4, "Extended DIUC");
XBIT(data, 4, "Length");
@@ -1767,14 +1699,12 @@ static gint UL_interference_and_noise_level_IE(proto_tree *diuc_tree, const guin
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint bitmap;
nib = offset;
- ti = proto_tree_add_text(diuc_tree, tvb, NIBHI(offset, length), "UL_interference_and_noise_level_IE");
- tree = proto_item_add_subtree(ti, ett_286h);
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286h, NULL, "UL_interference_and_noise_level_IE");
XNIB(data, 1, "Extended DIUC");
XNIB(data, 1, "Length");
@@ -2079,8 +2009,7 @@ static void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo
/* PHY Synchronization Field 8.4.5.1 */
{
- ti = proto_tree_add_text(dlmap_tree, tvb, offset, 4, "Phy Synchronization Field");
- phy_tree = proto_item_add_subtree(ti, ett_275_phy);
+ phy_tree = proto_tree_add_subtree(dlmap_tree, tvb, offset, 4, ett_275_phy, NULL, "Phy Synchronization Field");
proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_ms, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_per_sec, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2097,8 +2026,7 @@ static void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo
/* DL-MAP IEs */
length = tvb_len - offset; /* remaining length in bytes */
- ti = proto_tree_add_text(dlmap_tree, tvb, offset, length, "DL-MAP IEs (%d bytes)", length);
- ie_tree = proto_item_add_subtree(ti, ett_dlmap_ie);
+ ie_tree = proto_tree_add_subtree_format(dlmap_tree, tvb, offset, length, ett_dlmap_ie, NULL, "DL-MAP IEs (%d bytes)", length);
/* length = BYTE_TO_NIB(length); */ /* convert length to nibbles */
@@ -2157,8 +2085,7 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre
proto_tree_add_item(tree, hf_dlmapc_len, tvb, offset, 2, ENC_BIG_ENDIAN);
/* PHY Synchronization Field 8.4.5.1 */
{
- ti_phy = proto_tree_add_text(tree, tvb, offset+2, 4, "Phy Synchronization Field");
- phy_tree = proto_item_add_subtree(ti_phy, ett_275_phy);
+ phy_tree = proto_tree_add_subtree(tree, tvb, offset+2, 4, ett_275_phy, &ti_phy, "Phy Synchronization Field");
proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_ms, tvb, offset+2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_per_sec, tvb, offset+2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(phy_tree, hf_dlmap_phy_fnum, tvb, offset+3, 3, ENC_BIG_ENDIAN);
@@ -2175,8 +2102,7 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre
/* DL-MAP IEs */
length -= 15; /* remaining length in bytes (11 bytes above + CRC at end) */
if (dl_ie_count) {
- ti_dlmap_ies = proto_tree_add_text(tree, tvb, offset, length, "DL-MAP IEs (%d bytes)", length);
- ie_tree = proto_item_add_subtree(ti_dlmap_ies, ett_dlmap_ie);
+ ie_tree = proto_tree_add_subtree_format(tree, tvb, offset, length, ett_dlmap_ie, &ti_dlmap_ies, "DL-MAP IEs (%d bytes)", length);
/* length = BYTE_TO_NIB(mac_len - (int)sizeof(mac_crc) - 1); */ /* convert length to nibbles */
@@ -2238,7 +2164,6 @@ gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
/* decode a SUB-DL-UL-MAP message 6.3.2.3.60 and return the length in bytes */
/* first three bits are 0x7, which following a compressed DL map indicates this message */
guint offset = 0;
- proto_item *ti = NULL;
proto_tree *tree = NULL;
proto_tree *ie_tree = NULL;
proto_item *generic_item = NULL;
@@ -2254,8 +2179,7 @@ gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
sub_dl_ul_map = 1; /* set flag */
- ti = proto_tree_add_text(base_tree, tvb, NIBHI(nib,lennib-nib), "SUB-DL-UL-MAP");
- tree = proto_item_add_subtree(ti, ett_109x);
+ tree = proto_tree_add_subtree(base_tree, tvb, NIBHI(nib,lennib-nib), ett_109x, NULL, "SUB-DL-UL-MAP");
data = NIB_WORD(nib,bufptr);
proto_tree_add_uint(tree, hf_109x_cmi, tvb, NIBHI(nib,4), data);
@@ -2279,8 +2203,7 @@ gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
nib += 2;
/* DL-MAP IEs */
- ti = proto_tree_add_text(tree, tvb, NIBHI(nib,1), "DL-MAP IEs");
- ie_tree = proto_item_add_subtree(ti, ett_109x_dl);
+ ie_tree = proto_tree_add_subtree(tree, tvb, NIBHI(nib,1), ett_109x_dl, NULL, "DL-MAP IEs");
for (i = 0; i < numie; i++) {
nib += dissect_dlmap_ie(ie_tree, bufptr, nib, lennib - nib, tvb);
}
@@ -2294,8 +2217,7 @@ gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
nib += 2;
/* UL-MAP IEs */
- ti = proto_tree_add_text(tree, tvb, NIBHI(nib,lennib-nib), "UL-MAP IEs");
- ie_tree = proto_item_add_subtree(ti, ett_109x_ul);
+ ie_tree = proto_tree_add_subtree(tree, tvb, NIBHI(nib,lennib-nib), ett_109x_ul, NULL, "UL-MAP IEs");
for ( ; nib < lennib - 1; ) {
nib += dissect_ulmap_ie(ie_tree, bufptr, nib, lennib - nib, tvb);
}
diff --git a/plugins/wimax/msg_ulmap.c b/plugins/wimax/msg_ulmap.c
index 248655aee8..a177424f62 100644
--- a/plugins/wimax/msg_ulmap.c
+++ b/plugins/wimax/msg_ulmap.c
@@ -275,14 +275,12 @@ static gint Dedicated_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr,
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint sdma;
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Dedicated_UL_Control_IE");
- tree = proto_item_add_subtree(ti, ett_302r);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302r, NULL, "Dedicated_UL_Control_IE");
XBIT(data, 4, "Length");
XBIT(sdma, 4, "Control Header");
@@ -299,13 +297,11 @@ static gint Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, const guint8 *bu
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Dedicated_MIMO_UL_Control_IE");
- tree = proto_item_add_subtree(ti, ett_302s);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302s, NULL, "Dedicated_MIMO_UL_Control_IE");
XBIT(data, 2, "Matrix");
XBIT(N_layer, 2, "N_layer");
@@ -321,16 +317,14 @@ static gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufp
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
/*proto_item *generic_item = NULL;*/
gint duci;
/*guint16 calculated_crc;*/
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, BITHI(offset,length), "UL_HARQ_Chase_Sub_Burst_IE");
- tree = proto_item_add_subtree(ti, ett_302k);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, BITHI(offset,length), ett_302k, NULL, "UL_HARQ_Chase_Sub_Burst_IE");
bit += RCID_IE(tree, bufptr, bit, length, tvb, RCID_Type);
XBIT(duci, 1, "Dedicated UL Control Indicator");
@@ -370,16 +364,14 @@ static gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *buf
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
/*proto_item *generic_item = NULL;*/
gint duci;
/*guint16 calculated_crc;*/
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_HARQ_IR_CTC_Sub_Burst_IE");
- tree = proto_item_add_subtree(ti, ett_302l);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302l, NULL, "UL_HARQ_IR_CTC_Sub_Burst_IE");
bit += RCID_IE(tree, bufptr, bit, length, tvb, RCID_Type);
XBIT(duci, 1, "Dedicated UL Control Indicator");
@@ -419,16 +411,14 @@ static gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *bufp
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
/*proto_item *generic_item = NULL;*/
gint duci;
/*guint16 calculated_crc;*/
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_HARQ_IR_CC_Sub_Burst_IE");
- tree = proto_item_add_subtree(ti, ett_302m);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302m, NULL, "UL_HARQ_IR_CC_Sub_Burst_IE");
bit += RCID_IE(tree, bufptr, bit, length, tvb, RCID_Type);
XBIT(duci, 1, "Dedicated UL Control Indicator");
@@ -469,16 +459,14 @@ static gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
/*proto_item *generic_item = NULL;*/
gint muin,dmci,ackd,i;
/*guint16 calculated_crc;*/
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "MIMO_UL_Chase_HARQ_Sub_Burst_IE");
- tree = proto_item_add_subtree(ti, ett_302n);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302n, NULL, "MIMO_UL_Chase_HARQ_Sub_Burst_IE");
XBIT(muin, 1, "MU indicator");
XBIT(dmci, 1, "Dedicated MIMO ULControl Indicator");
@@ -529,16 +517,14 @@ static gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *b
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
/*proto_item *generic_item = NULL;*/
gint muin,dmci,ackd,i;
/*guint16 calculated_crc;*/
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "MIMO_UL_IR_HARQ__Sub_Burst_IE");
- tree = proto_item_add_subtree(ti, ett_302o);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302o, NULL, "MIMO_UL_IR_HARQ__Sub_Burst_IE");
XBIT(muin, 1, "MU indicator");
XBIT(dmci, 1, "Dedicated MIMO UL Control Indicator");
@@ -589,16 +575,14 @@ static gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, const gu
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
/*proto_item *generic_item = NULL;*/
gint muin,dmci,ackd,i;
/*guint16 calculated_crc;*/
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE");
- tree = proto_item_add_subtree(ti, ett_302p);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302p, NULL, "MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE");
XBIT(muin, 1, "MU indicator");
XBIT(dmci, 1, "Dedicated MIMO UL Control Indicator");
@@ -650,16 +634,14 @@ static gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, const guint8 *b
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
/*proto_item *generic_item = NULL;*/
gint ackd,txct,sboi;
/*guint16 calculated_crc;*/
bit = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "MIMO_UL_STC_HARQ_Sub_Burst_IE");
- tree = proto_item_add_subtree(ti, ett_302q);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302q, NULL, "MIMO_UL_STC_HARQ_Sub_Burst_IE");
XBIT(txct, 2, "Tx count");
XBIT(data, 10, "Duration");
@@ -709,13 +691,11 @@ static gint Power_Control_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint o
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
nib = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Power_Control_IE");
- tree = proto_item_add_subtree(ti, ett_292);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_292, NULL, "Power_Control_IE");
XNIB(data, 1, "Extended UIUC");
XNIB(data, 1, "Length");
@@ -732,15 +712,13 @@ static gint Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, const guint8 *b
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint j, M;
const gint m_table[4] = { 2, 2, 3, 6 };
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Mini_subchannel_allocation_IE");
- tree = proto_item_add_subtree(ti, ett_295);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_295, NULL, "Mini_subchannel_allocation_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -773,13 +751,11 @@ static gint AAS_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "AAS_UL_IE");
- tree = proto_item_add_subtree(ti, ett_293);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_293, NULL, "AAS_UL_IE");
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
@@ -802,14 +778,12 @@ static gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint off
gint bit;
gint data;
gint target;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint rci, rtype, ftype, zperm, mgi, api, pad;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "CQICH_Alloc_IE");
- tree = proto_item_add_subtree(ti, ett_300);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_300, NULL, "CQICH_Alloc_IE");
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
@@ -873,13 +847,11 @@ static gint UL_Zone_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_Zone_IE");
- tree = proto_item_add_subtree(ti, ett_294);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_294, NULL, "UL_Zone_IE");
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
@@ -901,14 +873,12 @@ static gint PHYMOD_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offse
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint pmt;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "PHYMOD_UL_IE");
- tree = proto_item_add_subtree(ti, ett_302);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302, NULL, "PHYMOD_UL_IE");
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
@@ -931,13 +901,11 @@ static gint MIMO_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
nib = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "MIMO_UL_Basic_IE");
- tree = proto_item_add_subtree(ti, ett_299);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_299, NULL, "MIMO_UL_Basic_IE");
XNIB(data, 1, "Extended UIUC");
XNIB(data, 1, "Length");
@@ -952,13 +920,11 @@ static gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, const guint8 *bufptr,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Fast_Tracking_IE");
- tree = proto_item_add_subtree(ti, ett_302h);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302h, NULL, "Fast_Tracking_IE");
length = NIB_TO_BIT(length);
@@ -982,13 +948,11 @@ static gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_PUSC_Burst_Allocation_in_Other_Segment_IE");
- tree = proto_item_add_subtree(ti, ett_302c);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302c, NULL, "UL_PUSC_Burst_Allocation_in_Other_Segment_IE");
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
@@ -1011,14 +975,12 @@ static gint Fast_Ranging_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint of
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint hidi;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Fast_Ranging_IE");
- tree = proto_item_add_subtree(ti, ett_302g);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302g, NULL, "Fast_Ranging_IE");
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
@@ -1046,13 +1008,11 @@ static gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, const guint8 *bufptr,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_Allocation_start_IE");
- tree = proto_item_add_subtree(ti, ett_302a);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302a, NULL, "UL_Allocation_start_IE");
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
@@ -1076,15 +1036,13 @@ static gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, const guint8 *bu
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint i, cnum, bapm;
guint pad;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "CQICH_Enhanced_Alloc_IE");
- tree = proto_item_add_subtree(ti, ett_302b);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302b, NULL, "CQICH_Enhanced_Alloc_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -1129,13 +1087,11 @@ static gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufp
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
nib = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "HO_Anchor_Active_UL_MAP_IE");
- tree = proto_item_add_subtree(ti, ett_302d);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302d, NULL, "HO_Anchor_Active_UL_MAP_IE");
XNIB(data, 1, "Extended-2 UIUC");
XNIB(data, 2, "Length");
@@ -1150,13 +1106,11 @@ static gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, const guint8 *bufp
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
nib = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "HO_Active_Anchor_UL_MAP_IE");
- tree = proto_item_add_subtree(ti, ett_302e);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302e, NULL, "HO_Active_Anchor_UL_MAP_IE");
XNIB(data, 1, "Extended-2 UIUC");
XNIB(data, 2, "Length");
@@ -1171,15 +1125,13 @@ static gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gin
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint nbss, acod, cqai, pad;
gint i;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Anchor_BS_switch_IE");
- tree = proto_item_add_subtree(ti, ett_302i);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302i, NULL, "Anchor_BS_switch_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -1232,15 +1184,13 @@ static gint UL_sounding_command_IE(proto_tree *uiuc_tree, const guint8 *bufptr,
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint stype, ssrf, srlf, iafb, pad, sept, nssym, ncid, amod;
gint i, j;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "UL_Sounding_Command_IE");
- tree = proto_item_add_subtree(ti, ett_315d);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_315d, NULL, "UL_Sounding_Command_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -1338,13 +1288,11 @@ static gint MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gin
/* offset of TLV in nibbles, length of TLV in nibbles */
gint nib;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
nib = offset;
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "MIMO_UL_Enhanced_IE");
- tree = proto_item_add_subtree(ti, ett_302f);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302f, NULL, "MIMO_UL_Enhanced_IE");
XNIB(data, 1, "Extended-2 UIUC");
XNIB(data, 2, "Length");
@@ -1359,8 +1307,7 @@ static gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offs
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint bitlength;
gint lastbit;
gint pad, mode, alsi, nsub;
@@ -1369,8 +1316,7 @@ static gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offs
bit = NIB_TO_BIT(offset);
bitlength = NIB_TO_BIT(length);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "HARQ_ULMAP_IE");
- tree = proto_item_add_subtree(ti, ett_302j);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302j, NULL, "HARQ_ULMAP_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -1422,13 +1368,11 @@ static gint HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, const guint8
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "HARQ_ACKCH_Region_IE");
- tree = proto_item_add_subtree(ti, ett_302t);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302t, NULL, "HARQ_ACKCH_Region_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -1447,16 +1391,14 @@ static gint AAS_SDMA_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint off
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint nreg, pad, user, encm, ppmd, padj;
gint aasp = 0; /* TODO AAS UL preamble used */
gint ii, jj;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "AAS_SDMA_UL_IE");
- tree = proto_item_add_subtree(ti, ett_302u);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302u, NULL, "AAS_SDMA_UL_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -1531,15 +1473,13 @@ static gint Feedback_Polling_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gin
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
- proto_item *ti = NULL;
- proto_item *tree = NULL;
+ proto_item *tree;
gint nalloc, dula, pad, adur;
gint i;
bit = NIB_TO_BIT(offset);
- ti = proto_tree_add_text(uiuc_tree, tvb, NIBHI(offset, length), "Feedback_Polling_IE");
- tree = proto_item_add_subtree(ti, ett_302v);
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302v, NULL, "Feedback_Polling_IE");
XBIT(data, 4, "Extended-2 UIUC");
XBIT(data, 8, "Length");
@@ -1582,8 +1522,8 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
* length of the IE in nibbles
* offset = start of IE (nibbles)
* length = total length of bufptr (nibbles) */
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_item *ti;
+ proto_tree *tree;
gint nibble;
gint uiuc, ext_uiuc, ext2_uiuc, len, aas_or_amc;
guint cid;
@@ -1599,8 +1539,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
if (uiuc == 0)
{
/* 8.4.5.4.9 FAST-FEEDBACK channel */
- ti = proto_tree_add_text(ie_tree, tvb, NIBHI(nibble, 5+8), "FAST FEEDBACK Allocation IE");
- tree = proto_item_add_subtree(ti, ett_ulmap_ffb);
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble, 5+8), ett_ulmap_ffb, NULL, "FAST FEEDBACK Allocation IE");
proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
nibble += 4;
@@ -1621,8 +1560,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
ext2_uiuc = NIB_NIBBLE(5+nibble, bufptr);
len = NIB_BYTE(5+nibble+1, bufptr);
- ti = proto_tree_add_text(ie_tree, tvb, NIBHI(nibble, 5+3+len*2), "UIUC: %d (Extended-2 IE)", uiuc);
- tree = proto_item_add_subtree(ti, ett_290b);
+ tree = proto_tree_add_subtree_format(ie_tree, tvb, NIBHI(nibble, 5+3+len*2), ett_290b, NULL, "UIUC: %d (Extended-2 IE)", uiuc);
proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
nibble += 4;
@@ -1691,8 +1629,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
else if (uiuc == 12)
{
/* 8.4.5.4 [2] CDMA bandwidth request, CDMA ranging */
- ti = proto_tree_add_text(ie_tree, tvb, NIBHI(nibble, 5+8), "CDMA Bandwidth/Ranging Request IE");
- tree = proto_item_add_subtree(ti, ett_287_1);
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble, 5+8), ett_287_1, NULL, "CDMA Bandwidth/Ranging Request IE");
proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
nibble += 4;
@@ -1711,8 +1648,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
else if (uiuc == 13)
{
/* 8.4.5.4.2 [2] PAPR reduction allocation, safety zone - table 289 */
- ti = proto_tree_add_text(ie_tree, tvb, NIBHI(nibble,5+8), "PAPR/Safety/Sounding Zone IE");
- tree = proto_item_add_subtree(ti, ett_289);
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble,5+8), ett_289, NULL, "PAPR/Safety/Sounding Zone IE");
proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
@@ -1733,8 +1669,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
else if (uiuc == 14)
{
/* 8.4.5.4.3 [2] CDMA allocation IE */
- ti = proto_tree_add_text(ie_tree, tvb, NIBHI(nibble,5+10), "CDMA allocation IE");
- tree = proto_item_add_subtree(ti, ett_290);
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble,5+10), ett_290, &ti, "CDMA allocation IE");
proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
nibble += 4;
@@ -1770,8 +1705,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
ext_uiuc = NIB_NIBBLE(5+nibble, bufptr);
len = NIB_NIBBLE(5+nibble+1, bufptr);
- ti = proto_tree_add_text(ie_tree, tvb, NIBHI(nibble, 5+2+len*2), "UIUC: %d (Extended IE)", uiuc);
- tree = proto_item_add_subtree(ti, ett_291);
+ tree = proto_tree_add_subtree_format(ie_tree, tvb, NIBHI(nibble, 5+2+len*2), ett_291, NULL, "UIUC: %d (Extended IE)", uiuc);
proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble,4), cid);
nibble += 4;
@@ -1847,8 +1781,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
if (aas_or_amc) len += 3;
- ti = proto_tree_add_text(ie_tree, tvb, NIBHI(nibble, 5+len), "Data Grant Burst Profile");
- tree = proto_item_add_subtree(ti, ett_287_2);
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble, 5+len), ett_287_2, NULL, "Data Grant Burst Profile");
proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
nibble += 4;
@@ -1902,8 +1835,7 @@ static void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo
/* UL-MAP IEs */
length = tvb_len - offset; /* remaining length in bytes */
- ti = proto_tree_add_text(ulmap_tree, tvb, offset, length, "UL-MAP IEs (%u bytes)", length);
- ie_tree = proto_item_add_subtree(ti, ett_ulmap_ie);
+ ie_tree = proto_tree_add_subtree_format(ulmap_tree, tvb, offset, length, ett_ulmap_ie, NULL, "UL-MAP IEs (%u bytes)", length);
/* length = BYTE_TO_NIB(length); */ /* convert length to nibbles */
nib = BYTE_TO_NIB(offset);
@@ -1945,8 +1877,7 @@ gint wimax_decode_ulmapc(proto_tree *base_tree, const guint8 *bufptr, gint offse
proto_tree_add_uint(tree, hf_ulmap_ofdma_sym, tvb, NIBHI(nib,2), data); /* added 2005 */
nib += 2;
- ti = proto_tree_add_text(tree, tvb, NIBHI(nib,length-nib), "UL-MAP IEs (%u bytes)", NIB_ADDR(length-nib));
- ie_tree = proto_item_add_subtree(ti, ett_306_ul);
+ ie_tree = proto_tree_add_subtree_format(tree, tvb, NIBHI(nib,length-nib), ett_306_ul, NULL, "UL-MAP IEs (%u bytes)", NIB_ADDR(length-nib));
while (nib < length-1) {
nib += dissect_ulmap_ie(ie_tree, bufptr, nib, length-nib, tvb);
}
@@ -1970,14 +1901,12 @@ gint wimax_decode_ulmap_reduced_aas(proto_tree *base_tree, const guint8 *bufptr,
* return length in bits */
gint bit;
guint data;
- proto_item *ti = NULL;
- proto_tree *tree = NULL;
+ proto_tree *tree;
gint azci, azpi, umii, phmi, powi, fbck;
bit = offset;
- ti = proto_tree_add_text(base_tree, tvb, BITHI(bit,length), "Reduced_AAS_Private_UL_MAP");
- tree = proto_item_add_subtree(ti, ett_308b);
+ tree = proto_tree_add_subtree(base_tree, tvb, BITHI(bit,length), ett_308b, NULL, "Reduced_AAS_Private_UL_MAP");
/* Decode and display the Reduced AAS private UL-MAP */
XBIT(azci, 1, "AAS zone configuration included");
diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c
index ef0ef4573e..fdbf2aa75d 100644
--- a/plugins/wimax/packet-wmx.c
+++ b/plugins/wimax/packet-wmx.c
@@ -99,8 +99,7 @@ proto_item *add_tlv_subtree(tlv_info_t *self, proto_tree *tree, int hfindex, tvb
hf = proto_registrar_get_nth(hfindex);
- tlv_item = proto_tree_add_text(tree, tvb, start, tlv_value_length+tlv_val_offset, "%s", hf->name);
- tlv_tree = proto_item_add_subtree(tlv_item, ett_tlv[tlv_type]);
+ tlv_tree = proto_tree_add_subtree(tree, tvb, start, tlv_value_length+tlv_val_offset, ett_tlv[tlv_type], NULL, hf->name);
proto_tree_add_uint(tlv_tree, hf_tlv_type, tvb, start, 1, tlv_type);
if (size_of_tlv_length_field > 0) /* It is */
@@ -137,7 +136,6 @@ proto_tree *add_tlv_subtree_no_item(tlv_info_t *self, proto_tree *tree, int hfin
{
header_field_info *hf;
proto_tree *tlv_tree;
- proto_item *tlv_item;
gint tlv_value_length, tlv_val_offset;
guint8 size_of_tlv_length_field;
guint8 tlv_type;
@@ -154,8 +152,7 @@ proto_tree *add_tlv_subtree_no_item(tlv_info_t *self, proto_tree *tree, int hfin
hf = proto_registrar_get_nth(hfindex);
- tlv_item = proto_tree_add_text(tree, tvb, start, tlv_value_length+tlv_val_offset, "%s", hf->name);
- tlv_tree = proto_item_add_subtree(tlv_item, ett_tlv[tlv_type]);
+ tlv_tree = proto_tree_add_subtree(tree, tvb, start, tlv_value_length+tlv_val_offset, ett_tlv[tlv_type], NULL, hf->name);
proto_tree_add_uint(tlv_tree, hf_tlv_type, tvb, start, 1, tlv_type);
if (size_of_tlv_length_field > 0) /* It is */
@@ -250,8 +247,7 @@ proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, i
break;
}
/* Show "TLV value: " */
- tlv_item = proto_tree_add_text(tlv_tree, tvb, start+tlv_val_offset, tlv_value_length, hex_fmt, label, tlv_value);
- tlv_tree = proto_item_add_subtree(tlv_item, idx);
+ tlv_tree = proto_tree_add_subtree_format(tlv_tree, tvb, start+tlv_val_offset, tlv_value_length, idx, NULL, hex_fmt, label, tlv_value);
/* Return a pointer to the value level */
return tlv_tree;