aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-02-16 11:43:38 +0000
committerGuy Harris <guy@alum.mit.edu>2006-02-16 11:43:38 +0000
commitb13f6dcbd34e11cb7dff5f03be9c2bdde200b22a (patch)
treec5f9bd1a6b9cfb26df3de77c2cb27d661c19e9ab /epan
parent1b096ab156506856495860ef6b356e6992a3ba8c (diff)
Use the new "proto_tree_add_*_format_value" routines.
svn path=/trunk/; revision=17316
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-3g-a11.c53
-rw-r--r--epan/dissectors/packet-aarp.c28
-rw-r--r--epan/dissectors/packet-atm.c4
-rw-r--r--epan/dissectors/packet-auto_rp.c4
-rw-r--r--epan/dissectors/packet-bacnet.c32
-rw-r--r--epan/dissectors/packet-bfd.c42
-rw-r--r--epan/dissectors/packet-bootp.c30
-rw-r--r--epan/dissectors/packet-bssgp.c10
-rw-r--r--epan/dissectors/packet-bvlc.c24
-rw-r--r--epan/dissectors/packet-cdp.c8
-rw-r--r--epan/dissectors/packet-cpha.c8
-rw-r--r--epan/dissectors/packet-dcerpc-netlogon.c6
-rw-r--r--epan/dissectors/packet-dcerpc-samr.c3
-rw-r--r--epan/dissectors/packet-dcerpc.c2
-rw-r--r--epan/dissectors/packet-dcom-cba-acco.c4
-rw-r--r--epan/dissectors/packet-dcp.c32
-rw-r--r--epan/dissectors/packet-dhcp-failover.c40
-rw-r--r--epan/dissectors/packet-diameter.c24
18 files changed, 179 insertions, 175 deletions
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c
index aa57a2414a..7d3907b1e5 100644
--- a/epan/dissectors/packet-3g-a11.c
+++ b/epan/dissectors/packet-3g-a11.c
@@ -1170,10 +1170,10 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Identifier - assumed to be an NTP time here */
reftime = tvb_get_ptr(tvb, offset, 8);
- proto_tree_add_bytes_format(a11_tree, hf_a11_ident, tvb, offset, 8,
- reftime,
- "Identification: %s",
- ntp_fmt_ts(reftime));
+ proto_tree_add_bytes_format_value(a11_tree, hf_a11_ident, tvb,
+ offset, 8, reftime,
+ "%s",
+ ntp_fmt_ts(reftime));
offset += 8;
} /* if tree */
@@ -1210,10 +1210,11 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Identifier - assumed to be an NTP time here */
reftime = tvb_get_ptr(tvb, offset, 8);
- proto_tree_add_bytes_format(a11_tree, hf_a11_ident, tvb, offset, 8,
- reftime,
- "Identification: %s",
- ntp_fmt_ts(reftime));
+ proto_tree_add_bytes_format_value(a11_tree, hf_a11_ident, tvb,
+ offset, 8,
+ reftime,
+ "%s",
+ ntp_fmt_ts(reftime));
offset += 8;
} /* if tree */
@@ -1244,10 +1245,11 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Identifier - assumed to be an NTP time here */
reftime = tvb_get_ptr(tvb, offset, 8);
- proto_tree_add_bytes_format(a11_tree, hf_a11_ident, tvb, offset, 8,
- reftime,
- "Identification: %s",
- ntp_fmt_ts(reftime));
+ proto_tree_add_bytes_format_value(a11_tree, hf_a11_ident, tvb,
+ offset, 8,
+ reftime,
+ "%s",
+ ntp_fmt_ts(reftime));
offset += 8;
} /* if tree */
@@ -1283,10 +1285,11 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Identifier - assumed to be an NTP time here */
reftime = tvb_get_ptr(tvb, offset, 8);
- proto_tree_add_bytes_format(a11_tree, hf_a11_ident, tvb, offset, 8,
- reftime,
- "Identification: %s",
- ntp_fmt_ts(reftime));
+ proto_tree_add_bytes_format_value(a11_tree, hf_a11_ident, tvb,
+ offset, 8,
+ reftime,
+ "%s",
+ ntp_fmt_ts(reftime));
offset += 8;
} /* if tree */
@@ -1317,10 +1320,11 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Identifier - assumed to be an NTP time here */
reftime = tvb_get_ptr(tvb, offset, 8);
- proto_tree_add_bytes_format(a11_tree, hf_a11_ident, tvb, offset, 8,
- reftime,
- "Identification: %s",
- ntp_fmt_ts(reftime));
+ proto_tree_add_bytes_format_value(a11_tree, hf_a11_ident, tvb,
+ offset, 8,
+ reftime,
+ "%s",
+ ntp_fmt_ts(reftime));
offset += 8;
} /* if tree */
@@ -1356,10 +1360,11 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Identifier - assumed to be an NTP time here */
reftime = tvb_get_ptr(tvb, offset, 8);
- proto_tree_add_bytes_format(a11_tree, hf_a11_ident, tvb, offset, 8,
- reftime,
- "Identification: %s",
- ntp_fmt_ts(reftime));
+ proto_tree_add_bytes_format_value(a11_tree, hf_a11_ident, tvb,
+ offset, 8,
+ reftime,
+ "%s",
+ ntp_fmt_ts(reftime));
offset += 8;
} /* if tree */
diff --git a/epan/dissectors/packet-aarp.c b/epan/dissectors/packet-aarp.c
index 22f080bb24..56aab63808 100644
--- a/epan/dissectors/packet-aarp.c
+++ b/epan/dissectors/packet-aarp.c
@@ -234,13 +234,15 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
if (ar_pln != 0) {
if (AARP_PRO_IS_ATALK(ar_pro, ar_pln)) {
- proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_proto_id, tvb, spa_offset, ar_pln,
- spa_val,
- "Sender ID: %s", spa_str);
+ proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_src_proto_id, tvb,
+ spa_offset, ar_pln,
+ spa_val,
+ "%s", spa_str);
} else {
- proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_proto, tvb, spa_offset, ar_pln,
- spa_val,
- "Sender protocol address: %s", spa_str);
+ proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_src_proto, tvb,
+ spa_offset, ar_pln,
+ spa_val,
+ "%s", spa_str);
}
}
@@ -252,13 +254,15 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
if (ar_pln != 0) {
if (AARP_PRO_IS_ATALK(ar_pro, ar_pln)) {
- proto_tree_add_bytes_format(aarp_tree, hf_aarp_dst_proto_id, tvb, tpa_offset, ar_pln,
- tpa_val,
- "Target ID: %s", tpa_str);
+ proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_dst_proto_id, tvb,
+ tpa_offset, ar_pln,
+ tpa_val,
+ "%s", tpa_str);
} else {
- proto_tree_add_bytes_format(aarp_tree, hf_aarp_dst_proto, tvb, tpa_offset, ar_pln,
- tpa_val,
- "Target protocol address: %s", tpa_str);
+ proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_dst_proto, tvb,
+ tpa_offset, ar_pln,
+ tpa_val,
+ "%s", tpa_str);
}
}
}
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index 0cf1c96728..559efc7866 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -1573,9 +1573,9 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
}
- proto_tree_add_uint_format(atm_tree, hf_atm_aal, tvb, 0, 0,
+ proto_tree_add_uint_format_value(atm_tree, hf_atm_aal, tvb, 0, 0,
pinfo->pseudo_header->atm.aal,
- "AAL: %s",
+ "%s",
val_to_str(pinfo->pseudo_header->atm.aal, aal_vals,
"Unknown AAL (%u)"));
}
diff --git a/epan/dissectors/packet-auto_rp.c b/epan/dissectors/packet-auto_rp.c
index 1064b1b648..6fdce8bb32 100644
--- a/epan/dissectors/packet-auto_rp.c
+++ b/epan/dissectors/packet-auto_rp.c
@@ -150,8 +150,8 @@ static void dissect_auto_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset++;
holdtime = tvb_get_ntohs(tvb, offset);
- proto_tree_add_uint_format(auto_rp_tree, hf_auto_rp_holdtime, tvb, offset, 2, holdtime,
- "Holdtime: %u second%s", holdtime, plurality(holdtime, "", "s"));
+ proto_tree_add_uint_format_value(auto_rp_tree, hf_auto_rp_holdtime, tvb, offset, 2, holdtime,
+ "%u second%s", holdtime, plurality(holdtime, "", "s"));
offset+=2;
proto_tree_add_text(auto_rp_tree, tvb, offset, 4, "Reserved: 0x%x", tvb_get_ntohs(tvb, offset));
diff --git a/epan/dissectors/packet-bacnet.c b/epan/dissectors/packet-bacnet.c
index 47ae6cc767..571bcce368 100644
--- a/epan/dissectors/packet-bacnet.c
+++ b/epan/dissectors/packet-bacnet.c
@@ -213,9 +213,9 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
bacnet_tree = proto_item_add_subtree(ti, ett_bacnet);
- proto_tree_add_uint_format(bacnet_tree, hf_bacnet_version, tvb,
+ proto_tree_add_uint_format_value(bacnet_tree, hf_bacnet_version, tvb,
offset, 1,
- bacnet_version,"Version: 0x%02x (%s)",bacnet_version,
+ bacnet_version,"0x%02x (%s)",bacnet_version,
(bacnet_version == 0x01)?"ASHRAE 135-1995":"unknown");
offset ++;
ct = proto_tree_add_uint(bacnet_tree, hf_bacnet_control,
@@ -246,9 +246,9 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* DLEN = 0 is broadcast on dest.network */
if( bacnet_dlen == 0) {
/* append to hf_bacnet_dlen: broadcast */
- proto_tree_add_uint_format(bacnet_tree,
+ proto_tree_add_uint_format_value(bacnet_tree,
hf_bacnet_dlen, tvb, offset, 1, bacnet_dlen,
- "Destination MAC Layer Address Length: %d indicates Broadcast on Destination Network",
+ "%d indicates Broadcast on Destination Network",
bacnet_dlen);
offset ++;
/* going to SNET */
@@ -280,9 +280,9 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
bacnet_dlen, FALSE);
offset += bacnet_dlen;
} else {
- proto_tree_add_uint_format(bacnet_tree,
+ proto_tree_add_uint_format_value(bacnet_tree,
hf_bacnet_dlen, tvb, offset, 1, bacnet_dlen,
- "Destination MAC Layer Address Length: %d invalid!",
+ "%d invalid!",
bacnet_dlen);
}
}
@@ -293,9 +293,9 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 2;
bacnet_slen = tvb_get_guint8(tvb, offset);
if( bacnet_slen == 0) { /* SLEN = 0 invalid */
- proto_tree_add_uint_format(bacnet_tree,
+ proto_tree_add_uint_format_value(bacnet_tree,
hf_bacnet_slen, tvb, offset, 1, bacnet_slen,
- "Source MAC Layer Address Length: %d invalid!",
+ "%d invalid!",
bacnet_slen);
offset ++;
} else if (bacnet_slen==6) {
@@ -329,9 +329,9 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
bacnet_slen, FALSE);
offset += bacnet_slen;
} else {
- proto_tree_add_uint_format(bacnet_tree,
+ proto_tree_add_uint_format_value(bacnet_tree,
hf_bacnet_slen, tvb, offset, 1, bacnet_slen,
- "Source MAC Layer Address Length: %d invalid!",
+ "%d invalid!",
bacnet_slen);
offset ++;
}
@@ -344,9 +344,9 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Network Layer Message Type */
if (bacnet_control & BAC_CONTROL_NET) {
bacnet_mesgtyp = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint_format(bacnet_tree,
+ proto_tree_add_uint_format_value(bacnet_tree,
hf_bacnet_mesgtyp, tvb, offset, 1, bacnet_mesgtyp,
- "Network Layer Message Type: %02x (%s)", bacnet_mesgtyp,
+ "%02x (%s)", bacnet_mesgtyp,
bacnet_mesgtyp_name(bacnet_mesgtyp));
offset ++;
}
@@ -374,10 +374,10 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Reason, DNET (in Reject-Message-To-Network) */
if (bacnet_mesgtyp == BAC_NET_REJ) {
bacnet_rejectreason = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint_format(bacnet_tree,
+ proto_tree_add_uint_format_value(bacnet_tree,
hf_bacnet_rejectreason,
tvb, offset, 1,
- bacnet_rejectreason, "Rejection Reason: %d (%s)",
+ bacnet_rejectreason, "%d (%s)",
bacnet_rejectreason,
bacnet_rejectreason_name(bacnet_rejectreason));
offset ++;
@@ -556,9 +556,9 @@ proto_register_bacnet(void)
"Hop Count", HFILL }
},
{ &hf_bacnet_mesgtyp,
- { "Message Type", "bacnet.mesgtyp",
+ { "Network Layer Message Type", "bacnet.mesgtyp",
FT_UINT8, BASE_HEX, NULL, 0,
- "Message Type", HFILL }
+ "Network Layer Message Type", HFILL }
},
{ &hf_bacnet_vendor,
{ "Vendor ID", "bacnet.vendor",
diff --git a/epan/dissectors/packet-bfd.c b/epan/dissectors/packet-bfd.c
index 50d35d571f..da590e151b 100644
--- a/epan/dissectors/packet-bfd.c
+++ b/epan/dissectors/packet-bfd.c
@@ -158,12 +158,11 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
bfd_control_flag_values,
"%s"));
- ti = proto_tree_add_uint_format(bfd_tree, hf_bfd_detect_time_multiplier, tvb, 2,
- 1, bfd_detect_time_multiplier,
- "%s: %u (= %u ms Detection time)",
- proto_registrar_get_nth(hf_bfd_detect_time_multiplier) -> name,
- bfd_detect_time_multiplier,
- bfd_detect_time_multiplier * bfd_desired_min_tx_interval/1000);
+ ti = proto_tree_add_uint_format_value(bfd_tree, hf_bfd_detect_time_multiplier, tvb, 2,
+ 1, bfd_detect_time_multiplier,
+ "%u (= %u ms Detection time)",
+ bfd_detect_time_multiplier,
+ bfd_detect_time_multiplier * bfd_desired_min_tx_interval/1000);
ti = proto_tree_add_text ( bfd_tree, tvb, 3, 1, "Message Length: %u Bytes", bfd_length );
@@ -173,23 +172,20 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
ti = proto_tree_add_uint(bfd_tree, hf_bfd_your_discriminator, tvb, 8,
4, bfd_your_discriminator);
- ti = proto_tree_add_uint_format(bfd_tree, hf_bfd_desired_min_tx_interval, tvb, 12,
- 4, bfd_desired_min_tx_interval,
- "%s: %4u ms",
- proto_registrar_get_nth(hf_bfd_desired_min_tx_interval) -> name,
- bfd_desired_min_tx_interval/1000);
-
- ti = proto_tree_add_uint_format(bfd_tree, hf_bfd_required_min_rx_interval, tvb, 16,
- 4, bfd_required_min_rx_interval,
- "%s: %4u ms",
- proto_registrar_get_nth(hf_bfd_required_min_rx_interval) -> name,
- bfd_required_min_rx_interval/1000);
-
- ti = proto_tree_add_uint_format(bfd_tree, hf_bfd_required_min_echo_interval, tvb, 20,
- 4, bfd_required_min_echo_interval,
- "%s: %4u ms",
- proto_registrar_get_nth(hf_bfd_required_min_echo_interval) -> name,
- bfd_required_min_echo_interval/1000);
+ ti = proto_tree_add_uint_format_value(bfd_tree, hf_bfd_desired_min_tx_interval, tvb, 12,
+ 4, bfd_desired_min_tx_interval,
+ "%4u ms",
+ bfd_desired_min_tx_interval/1000);
+
+ ti = proto_tree_add_uint_format_value(bfd_tree, hf_bfd_required_min_rx_interval, tvb, 16,
+ 4, bfd_required_min_rx_interval,
+ "%4u ms",
+ bfd_required_min_rx_interval/1000);
+
+ ti = proto_tree_add_uint_format_value(bfd_tree, hf_bfd_required_min_echo_interval, tvb, 20,
+ 4, bfd_required_min_echo_interval,
+ "%4u ms",
+ bfd_required_min_echo_interval/1000);
}
return;
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index e70e8bd8a9..36c1cd619a 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -2168,8 +2168,8 @@ dissect_packetcable_mta_cap(proto_tree *v_tree, tvbuff_t *tvb, int voff, int len
"Bogus length: %s", asc_val);
return;
} else {
- proto_tree_add_uint_format(v_tree, hf_bootp_pkt_mtacap_len, tvb, off, 2,
- tlv_len, "MTA DC Length: %d", tlv_len);
+ proto_tree_add_uint_format_value(v_tree, hf_bootp_pkt_mtacap_len, tvb, off, 2,
+ tlv_len, "%d", tlv_len);
off += 2;
while (off - voff < len) {
@@ -2361,8 +2361,8 @@ dissect_docsis_cm_cap(proto_tree *v_tree, tvbuff_t *tvb, int voff, int len)
"Bogus length: %s", asc_val);
return;
} else {
- proto_tree_add_uint_format(v_tree, hf_bootp_docsis_cmcap_len, tvb, off, 2,
- tlv_len, "CM DC Length: %d", tlv_len);
+ proto_tree_add_uint_format_value(v_tree, hf_bootp_docsis_cmcap_len, tvb, off, 2,
+ tlv_len, "%d", tlv_len);
off += 2;
while (off - voff < len) {
@@ -2926,11 +2926,11 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(bp_tree, hf_bootp_type, tvb,
0, 1,
op);
- proto_tree_add_uint_format(bp_tree, hf_bootp_hw_type, tvb,
- 1, 1,
- htype,
- "Hardware type: %s",
- arphrdtype_to_str(htype,
+ proto_tree_add_uint_format_value(bp_tree, hf_bootp_hw_type, tvb,
+ 1, 1,
+ htype,
+ "%s",
+ arphrdtype_to_str(htype,
"Unknown (0x%02x)"));
proto_tree_add_uint(bp_tree, hf_bootp_hw_len, tvb,
2, 1, hlen);
@@ -2967,10 +2967,10 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else
/* The chaddr element is 16 bytes in length,
although only the first hlen bytes are used */
- proto_tree_add_bytes_format(bp_tree, hf_bootp_hw_addr, tvb,
+ proto_tree_add_bytes_format_value(bp_tree, hf_bootp_hw_addr, tvb,
28, 16,
haddr,
- "Client hardware address: %s",
+ "%s",
arphrdaddr_to_str(haddr,
hlen,
htype));
@@ -3016,9 +3016,9 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tvb_get_ntohl(tvb, voff) == 0x63825363) {
if (tree) {
ip_addr = tvb_get_ipv4(tvb, voff);
- proto_tree_add_ipv4_format(bp_tree, hf_bootp_cookie, tvb,
+ proto_tree_add_ipv4_format_value(bp_tree, hf_bootp_cookie, tvb,
voff, 4, ip_addr,
- "Magic cookie: (OK)");
+ "(OK)");
}
voff += 4;
}
@@ -3245,12 +3245,12 @@ proto_register_bootp(void)
"Name to register via DDNS", HFILL }},
{ &hf_bootp_pkt_mtacap_len,
- { "PacketCable MTA Device Capabilities Length", "bootp.vendor.pktc.mtacap_len",
+ { "MTA DC Length", "bootp.vendor.pktc.mtacap_len",
FT_UINT8, BASE_DEC, NULL, 0x0,
"PacketCable MTA Device Capabilities Length", HFILL }},
{ &hf_bootp_docsis_cmcap_len,
- { "DOCSIS CM Device Capabilities Length", "bootp.vendor.docsis.cmcap_len",
+ { "CM DC Length", "bootp.vendor.docsis.cmcap_len",
FT_UINT8, BASE_DEC, NULL, 0x0,
"DOCSIS Cable Modem Device Capabilities Length", HFILL }},
diff --git a/epan/dissectors/packet-bssgp.c b/epan/dissectors/packet-bssgp.c
index 071aa0c976..155e2f1d14 100644
--- a/epan/dissectors/packet-bssgp.c
+++ b/epan/dissectors/packet-bssgp.c
@@ -5701,11 +5701,11 @@ dissect_bssgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_bssgp, tvb, 0, -1, FALSE);
bssgp_tree = proto_item_add_subtree(ti, ett_bssgp);
- proto_tree_add_uint_format(bssgp_tree, hf_bssgp_pdu_type, tvb, 0, 1,
- pdutype,
- "PDU Type: %s (%#02x)",
- val_to_str(pdutype, tab_bssgp_pdu_types,
- "Unknown"), pdutype);
+ proto_tree_add_uint_format_value(bssgp_tree, hf_bssgp_pdu_type, tvb, 0, 1,
+ pdutype,
+ "%s (%#02x)",
+ val_to_str(pdutype, tab_bssgp_pdu_types,
+ "Unknown"), pdutype);
bi.bssgp_tree = bssgp_tree;
}
diff --git a/epan/dissectors/packet-bvlc.c b/epan/dissectors/packet-bvlc.c
index aa7820a588..9ac6677e98 100644
--- a/epan/dissectors/packet-bvlc.c
+++ b/epan/dissectors/packet-bvlc.c
@@ -152,23 +152,23 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_bvlc, tvb, 0,
bvlc_length, FALSE);
bvlc_tree = proto_item_add_subtree(ti, ett_bvlc);
- proto_tree_add_uint_format(bvlc_tree, hf_bvlc_type, tvb, offset, 1,
- bvlc_type,"Type: 0x%x (Version %s)",bvlc_type,
+ proto_tree_add_uint_format_value(bvlc_tree, hf_bvlc_type, tvb, offset, 1,
+ bvlc_type,"0x%x (Version %s)",bvlc_type,
(bvlc_type == 0x81)?"BACnet/IP (Annex J)":"unknown");
offset ++;
- proto_tree_add_uint_format(bvlc_tree, hf_bvlc_function, tvb,
- offset, 1, bvlc_function,"Function: 0x%02x (%s)",
+ proto_tree_add_uint_format_value(bvlc_tree, hf_bvlc_function, tvb,
+ offset, 1, bvlc_function,"0x%02x (%s)",
bvlc_function, val_to_str (bvlc_function,
bvlc_function_names, "Unknown"));
offset ++;
if (length_remaining != packet_length)
- proto_tree_add_uint_format(bvlc_tree, hf_bvlc_length, tvb, offset,
+ proto_tree_add_uint_format_value(bvlc_tree, hf_bvlc_length, tvb, offset,
2, bvlc_length,
- "BVLC-Length: %d of %d bytes (invalid length - expected %d bytes)",
+ "%d of %d bytes (invalid length - expected %d bytes)",
bvlc_length, packet_length, length_remaining);
else
- proto_tree_add_uint_format(bvlc_tree, hf_bvlc_length, tvb, offset,
- 2, bvlc_length, "BVLC-Length: %d of %d bytes BACnet packet length",
+ proto_tree_add_uint_format_value(bvlc_tree, hf_bvlc_length, tvb, offset,
+ 2, bvlc_length, "%d of %d bytes BACnet packet length",
bvlc_length, packet_length);
offset += 2;
switch (bvlc_function) {
@@ -179,8 +179,8 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
/* We should bitmask the result correctly when we have a
* packet to dissect, see README.developer, 1.6.2, FID */
- proto_tree_add_uint_format(bvlc_tree, hf_bvlc_result, tvb,
- offset, 2, bvlc_result,"Result: 0x%04x (%s)",
+ proto_tree_add_uint_format_value(bvlc_tree, hf_bvlc_result, tvb,
+ offset, 2, bvlc_result,"0x%04x (%s)",
bvlc_result, val_to_str(bvlc_result << 4,
bvlc_result_names, "Unknown"));
offset += 2;
@@ -306,10 +306,10 @@ proto_register_bvlc(void)
{ &hf_bvlc_function,
{ "Function", "bvlc.function",
FT_UINT8, BASE_HEX, NULL, 0,
- "BLVC Function", HFILL }
+ "BVLC Function", HFILL }
},
{ &hf_bvlc_length,
- { "Length", "bvlc.length",
+ { "BVLC-Length", "bvlc.length",
FT_UINT16, BASE_DEC, NULL, 0,
"Length of BVLC", HFILL }
},
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c
index 7f1cd7cf63..fea1bb8057 100644
--- a/epan/dissectors/packet-cdp.c
+++ b/epan/dissectors/packet-cdp.c
@@ -161,10 +161,10 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* CDP header */
proto_tree_add_item(cdp_tree, hf_cdp_version, tvb, offset, 1, FALSE);
offset += 1;
- proto_tree_add_uint_format(cdp_tree, hf_cdp_ttl, tvb, offset, 1,
- tvb_get_guint8(tvb, offset),
- "TTL: %u seconds",
- tvb_get_guint8(tvb, offset));
+ proto_tree_add_uint_format_value(cdp_tree, hf_cdp_ttl, tvb, offset, 1,
+ tvb_get_guint8(tvb, offset),
+ "%u seconds",
+ tvb_get_guint8(tvb, offset));
offset += 1;
proto_tree_add_item(cdp_tree, hf_cdp_checksum, tvb, offset, 2, FALSE);
offset += 2;
diff --git a/epan/dissectors/packet-cpha.c b/epan/dissectors/packet-cpha.c
index bcba0774d3..bc4ba960c4 100644
--- a/epan/dissectors/packet-cpha.c
+++ b/epan/dissectors/packet-cpha.c
@@ -242,7 +242,7 @@ dissect_cpha(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint_format(cpha_tree, hf_magic_number, tvb, offset, sizeof(hdr.magic_number), hdr.magic_number, "Magic Number: 0x%x (%s)", hdr.magic_number, ha_magic_num2str(hdr.magic_number));
offset += sizeof(hdr.magic_number);
- proto_tree_add_uint_format(cpha_tree, hf_cpha_protocol_ver, tvb, offset, sizeof(hdr.ha_protocol_ver), hdr.ha_protocol_ver, "Protocol Version: %d (%s)", hdr.ha_protocol_ver,version2str(hdr.ha_protocol_ver));
+ proto_tree_add_uint_format_value(cpha_tree, hf_cpha_protocol_ver, tvb, offset, sizeof(hdr.ha_protocol_ver), hdr.ha_protocol_ver, "%d (%s)", hdr.ha_protocol_ver,version2str(hdr.ha_protocol_ver));
offset += sizeof(hdr.ha_protocol_ver);
proto_tree_add_uint(cpha_tree, hf_cluster_number, tvb, offset, sizeof(hdr.cluster_number), g_ntohs(hdr.cluster_number));
@@ -314,10 +314,10 @@ static void dissect_my_state(tvbuff_t * tvb, int offset, proto_tree * tree) {
proto_tree_add_text(tree, tvb, offset, sizeof(hdr.report_code), "Report Code: %s",report_code2str(hdr.report_code));
offset += sizeof(hdr.report_code);
- proto_tree_add_uint_format(tree, hf_ha_mode, tvb, offset, sizeof(hdr.ha_mode), hdr.ha_mode, "HA mode: %d (%s)", hdr.ha_mode, ha_mode2str(hdr.ha_mode));
+ proto_tree_add_uint_format_value(tree, hf_ha_mode, tvb, offset, sizeof(hdr.ha_mode), hdr.ha_mode, "%d (%s)", hdr.ha_mode, ha_mode2str(hdr.ha_mode));
offset += sizeof(hdr.ha_mode);
- proto_tree_add_uint_format(tree, hf_ha_time_unit, tvb, offset, sizeof(hdr.ha_time_unit), hdr.ha_time_unit, "HA Time unit: %d miliseconds", hdr.ha_time_unit);
+ proto_tree_add_uint_format_value(tree, hf_ha_time_unit, tvb, offset, sizeof(hdr.ha_time_unit), hdr.ha_time_unit, "%d miliseconds", hdr.ha_time_unit);
offset += sizeof(hdr.ha_time_unit);
rep_mode = is_report_ifs(hdr.report_code);
@@ -513,7 +513,7 @@ proto_register_cpha(void)
{ &hf_ha_mode,
{ "HA mode", "cphap.ha_mode", FT_UINT16, BASE_DEC, NULL, 0x0, "HA Mode", HFILL}},
{ &hf_ha_time_unit,
- { "HA Time unit (ms)", "cphap.ha_time_unit", FT_UINT16, BASE_DEC, NULL, 0x0, "HA Time unit", HFILL}},
+ { "HA Time unit", "cphap.ha_time_unit", FT_UINT16, BASE_DEC, NULL, 0x0, "HA Time unit (ms)", HFILL}},
{ &hf_num_reported_ifs,
{ "Reported Interfaces", "cphap.reported_ifs", FT_UINT32, BASE_DEC, NULL, 0x0, "Reported Interfaces", HFILL}},
{ &hf_ethernet_add,
diff --git a/epan/dissectors/packet-dcerpc-netlogon.c b/epan/dissectors/packet-dcerpc-netlogon.c
index 7d35fcbf76..79f6a54d30 100644
--- a/epan/dissectors/packet-dcerpc-netlogon.c
+++ b/epan/dissectors/packet-dcerpc-netlogon.c
@@ -4781,8 +4781,8 @@ netlogon_dissect_DC_FLAGS(tvbuff_t *tvb, int offset,
hf_netlogon_dc_flags, &mask);
if(parent_tree){
- item = proto_tree_add_uint_format(parent_tree, hf_netlogon_dc_flags,
- tvb, offset-4, 4, mask, "Domain Controller Flags: 0x%08x%s", mask, (mask==0x0000ffff)?" PING (mask==0x0000ffff)":"");
+ item = proto_tree_add_uint_format_value(parent_tree, hf_netlogon_dc_flags,
+ tvb, offset-4, 4, mask, "0x%08x%s", mask, (mask==0x0000ffff)?" PING (mask==0x0000ffff)":"");
tree = proto_item_add_subtree(item, ett_dc_flags);
}
@@ -7155,7 +7155,7 @@ static hf_register_info hf[] = {
NULL, 0x0, "Negotiation Flags", HFILL }},
{ &hf_netlogon_dc_flags,
- { "Flags", "netlogon.dc.flags", FT_UINT32, BASE_HEX,
+ { "Domain Controller Flags", "netlogon.dc.flags", FT_UINT32, BASE_HEX,
NULL, 0x0, "Domain Controller Flags", HFILL }},
{ &hf_netlogon_dc_flags_pdc_flag,
diff --git a/epan/dissectors/packet-dcerpc-samr.c b/epan/dissectors/packet-dcerpc-samr.c
index 3318d998fc..4adde821a3 100644
--- a/epan/dissectors/packet-dcerpc-samr.c
+++ b/epan/dissectors/packet-dcerpc-samr.c
@@ -1189,8 +1189,7 @@ samr_dissect_connect_anon_rqst(tvbuff_t *tvb, int offset,
hf_samr_server, &server);
str[0]=server&0xff;
str[1]=0;
- proto_tree_add_string_format(tree, hf_samr_server, tvb, offset-2, 2,
- str, "Server: %s", str);
+ proto_tree_add_string(tree, hf_samr_server, tvb, offset-2, 2, str);
return offset;
}
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index d84c210553..f1a3eec786 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -1028,7 +1028,7 @@ dissect_dcerpc_time_t (tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
if (tree) {
if(data==0xffffffff){
/* special case, no time specified */
- proto_tree_add_time_format(tree, hfindex, tvb, offset, 4, &tv, "%s: No time specified", proto_registrar_get_nth(hfindex)->name);
+ proto_tree_add_time_format_value(tree, hfindex, tvb, offset, 4, &tv, "No time specified");
} else {
proto_tree_add_time (tree, hfindex, tvb, offset, 4, &tv);
}
diff --git a/epan/dissectors/packet-dcom-cba-acco.c b/epan/dissectors/packet-dcom-cba-acco.c
index 5b80e81124..f8a32c36d0 100644
--- a/epan/dissectors/packet-dcom-cba-acco.c
+++ b/epan/dissectors/packet-dcom-cba-acco.c
@@ -697,9 +697,9 @@ dissect_ICBAAccoServerSRT_ConnectCR_rqst(tvbuff_t *tvb, int offset,
/* add flags subtree */
u32Flags = tvb_get_guint8(tvb, offset);
- item = proto_tree_add_uint_format(tree, hf_cba_acco_serversrt_cr_flags,
+ item = proto_tree_add_uint_format_value(tree, hf_cba_acco_serversrt_cr_flags,
tvb, offset, 4, u32Flags,
- "Flags: 0x%02x (%s, %s)", u32Flags,
+ "0x%02x (%s, %s)", u32Flags,
(u32Flags & 0x2) ? "Reconfigure" : "not Reconfigure",
(u32Flags & 0x1) ? "Timestamped" : "not Timestamped");
flags_tree = proto_item_add_subtree(item, ett_cba_acco_serversrt_cr_flags);
diff --git a/epan/dissectors/packet-dcp.c b/epan/dissectors/packet-dcp.c
index 13772d17d3..e174137365 100644
--- a/epan/dissectors/packet-dcp.c
+++ b/epan/dissectors/packet-dcp.c
@@ -650,10 +650,10 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dcp_tree = proto_item_add_subtree(dcp_item, ett_dcp);
- proto_tree_add_uint_format(dcp_tree, hf_dcp_srcport, tvb, offset, 2, dcph->sport,
- "Source port: %s (%u)", get_dccp_port(dcph->sport), dcph->sport);
- proto_tree_add_uint_format(dcp_tree, hf_dcp_dstport, tvb, offset + 2, 2, dcph->dport,
- "Destination port: %s (%u)", get_dccp_port(dcph->dport), dcph->dport);
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_srcport, tvb, offset, 2, dcph->sport,
+ "%s (%u)", get_dccp_port(dcph->sport), dcph->sport);
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_dstport, tvb, offset + 2, 2, dcph->dport,
+ "%s (%u)", get_dccp_port(dcph->dport), dcph->dport);
proto_tree_add_uint_hidden(dcp_tree, hf_dcp_port, tvb, offset, 2, dcph->sport);
proto_tree_add_uint_hidden(dcp_tree, hf_dcp_port, tvb, offset + 2, 2, dcph->dport);
@@ -668,8 +668,8 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
len = tvb_length(tvb);
if (dcph->checksum == 0) {
/* No checksum supplied in the packet */
- proto_tree_add_uint_format(dcp_tree, hf_dcp_checksum, tvb,
- offset + 6, 2, dcph->checksum, "Checksum: 0x%04x (none)", dcph->checksum);
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
+ offset + 6, 2, dcph->checksum, "0x%04x (none)", dcph->checksum);
} else if (!pinfo->fragmented && len >= reported_len) {
/* The packet isn't part of a fragmented datagram and isn't
@@ -706,22 +706,22 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cksum_vec[3].len = reported_len;
computed_cksum = in_cksum(&cksum_vec[0], 4);
if (computed_cksum == 0) {
- proto_tree_add_uint_format(dcp_tree, hf_dcp_checksum, tvb,
- offset + 6, 2, dcph->checksum,
- "Checksum: 0x%04x [correct]", dcph->checksum);
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
+ offset + 6, 2, dcph->checksum,
+ "0x%04x [correct]", dcph->checksum);
} else {
proto_tree_add_boolean_hidden(dcp_tree, hf_dcp_checksum_bad, tvb, offset + 6, 2, TRUE);
- proto_tree_add_uint_format(dcp_tree, hf_dcp_checksum, tvb, offset + 6, 2, dcph->checksum,
- "Checksum: 0x%04x [incorrect, should be 0x%04x]", dcph->checksum,
- in_cksum_shouldbe(dcph->checksum, computed_cksum));
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb, offset + 6, 2, dcph->checksum,
+ "0x%04x [incorrect, should be 0x%04x]", dcph->checksum,
+ in_cksum_shouldbe(dcph->checksum, computed_cksum));
}
} else {
- proto_tree_add_uint_format(dcp_tree, hf_dcp_checksum, tvb,
- offset + 6, 2, dcph->checksum, "Checksum: 0x%04x", dcph->checksum);
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
+ offset + 6, 2, dcph->checksum, "0x%04x", dcph->checksum);
}
} else {
- proto_tree_add_uint_format(dcp_tree, hf_dcp_checksum, tvb,
- offset + 6, 2, dcph->checksum, "Checksum: 0x%04x", dcph->checksum);
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
+ offset + 6, 2, dcph->checksum, "0x%04x", dcph->checksum);
}
proto_tree_add_uint_hidden(dcp_tree, hf_dcp_res1, tvb, offset + 8, 1, dcph->reserved1);
diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c
index 6c8b7b05ce..971cdf034e 100644
--- a/epan/dissectors/packet-dhcp-failover.c
+++ b/epan/dissectors/packet-dhcp-failover.c
@@ -395,9 +395,9 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(dhcpfo_tree,
hf_dhcpfo_length, tvb, offset, 2, length);
} else {
- proto_tree_add_uint_format(dhcpfo_tree,
+ proto_tree_add_uint_format_value(dhcpfo_tree,
hf_dhcpfo_length, tvb, offset, 2, length,
- "Message length: %u (bogus, must be >= %u)",
+ "%u (bogus, must be >= %u)",
length, DHCPFO_FL_HDR_LEN);
}
}
@@ -418,17 +418,17 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (poffset < DHCPFO_FL_HDR_LEN) {
bogus_poffset = TRUE;
if (tree) {
- proto_tree_add_uint_format(dhcpfo_tree,
+ proto_tree_add_uint_format_value(dhcpfo_tree,
hf_dhcpfo_poffset, tvb, offset, 1, poffset,
- "Payload Offset: %u (bogus, must be >= %u)",
+ "%u (bogus, must be >= %u)",
poffset, DHCPFO_FL_HDR_LEN);
}
} else if (poffset > length) {
bogus_poffset = TRUE;
if (tree) {
- proto_tree_add_uint_format(dhcpfo_tree,
+ proto_tree_add_uint_format_value(dhcpfo_tree,
hf_dhcpfo_poffset, tvb, offset, 1, poffset,
- "Payload Offset: %u (bogus, must be <= length of message)",
+ "%u (bogus, must be <= length of message)",
poffset);
}
} else {
@@ -448,8 +448,8 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
time.secs = tvb_get_ntohl(tvb, offset);
time.nsecs = 0;
- proto_tree_add_time_format(dhcpfo_tree, hf_dhcpfo_time, tvb,
- offset, 4, &time, "Time: %s",
+ proto_tree_add_time_format_value(dhcpfo_tree, hf_dhcpfo_time, tvb,
+ offset, 4, &time, "%s",
abs_time_secs_to_str(time.secs));
}
offset += 4;
@@ -678,11 +678,11 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_append_text(oi, ", %s",
lease_expiration_time_str);
- proto_tree_add_uint_format(option_tree,
+ proto_tree_add_uint_format_value(option_tree,
hf_dhcpfo_lease_expiration_time, tvb,
offset, option_length,
lease_expiration_time,
- "Lease expiration time: %s",
+ "%s",
lease_expiration_time_str);
break;
@@ -702,11 +702,11 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_append_text(oi, ", %s",
potential_expiration_time_str);
- proto_tree_add_uint_format(option_tree,
+ proto_tree_add_uint_format_value(option_tree,
hf_dhcpfo_potential_expiration_time, tvb,
offset, option_length,
potential_expiration_time,
- "Potential expiration time: %s",
+ "%s",
potential_expiration_time_str);
break;
@@ -726,11 +726,11 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_append_text(oi, ", %s",
grace_expiration_time_str);
- proto_tree_add_uint_format(option_tree,
+ proto_tree_add_uint_format_value(option_tree,
hf_dhcpfo_grace_expiration_time, tvb,
offset, option_length,
grace_expiration_time,
- "Grace expiration time: %s",
+ "%s",
grace_expiration_time_str);
break;
@@ -749,11 +749,11 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_append_text(oi, ", %s",
client_last_transaction_time_str);
- proto_tree_add_uint_format(option_tree,
+ proto_tree_add_uint_format_value(option_tree,
hf_dhcpfo_client_last_transaction_time, tvb,
offset, option_length,
client_last_transaction_time,
- "Last transaction time: %s",
+ "%s",
abs_time_secs_to_str(client_last_transaction_time));
break;
@@ -772,11 +772,11 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_append_text(oi, ", %s",
start_time_of_state_str);
- proto_tree_add_uint_format(option_tree,
+ proto_tree_add_uint_format_value(option_tree,
hf_dhcpfo_start_time_of_state, tvb,
offset, option_length,
start_time_of_state,
- "Start time of state: %s",
+ "%s",
abs_time_secs_to_str(start_time_of_state));
break;
@@ -860,10 +860,10 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_append_text(oi,", %u seconds",
receive_timer);
- proto_tree_add_uint_format(option_tree,
+ proto_tree_add_uint_format_value(option_tree,
hf_dhcpfo_receive_timer, tvb, offset,
option_length, receive_timer,
- "Receive timer: %u seconds",
+ "%u seconds",
receive_timer);
break;
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c
index acdf32a968..3f9054a249 100644
--- a/epan/dissectors/packet-diameter.c
+++ b/epan/dissectors/packet-diameter.c
@@ -1380,9 +1380,9 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 3;
/* Flags */
- tf = proto_tree_add_uint_format(diameter_tree, hf_diameter_flags, tvb,
- offset , 1, flags, "Flags: 0x%02x (%s)", flags,
- flagstr);
+ tf = proto_tree_add_uint_format_value(diameter_tree, hf_diameter_flags, tvb,
+ offset, 1, flags, "0x%02x (%s)", flags,
+ flagstr);
flags_tree = proto_item_add_subtree(tf, ett_diameter_avp_flags);
proto_tree_add_boolean(flags_tree, hf_diameter_flags_request, tvb, offset, 1, flags);
proto_tree_add_boolean(flags_tree, hf_diameter_flags_proxyable, tvb, offset, 1, flags);
@@ -1396,8 +1396,8 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 1;
/* Command Code */
- proto_tree_add_uint_format(diameter_tree, hf_diameter_code,
- tvb, offset, 3, commandCode, "Command Code: %s-%s", commandString, commandStringType);
+ proto_tree_add_uint_format_value(diameter_tree, hf_diameter_code,
+ tvb, offset, 3, commandCode, "%s-%s", commandString, commandStringType);
offset += 3;
switch(gbl_version) {
@@ -1714,13 +1714,13 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
if (avpi_tree !=NULL) {
/* Command Code */
- proto_tree_add_uint_format(avpi_tree, hf_diameter_avp_code,
- tvb, offset, 4, avph.avp_code, "AVP Code: %s (%u)", avpNameString,avph.avp_code);
+ proto_tree_add_uint_format_value(avpi_tree, hf_diameter_avp_code,
+ tvb, offset, 4, avph.avp_code, "%s (%u)", avpNameString,avph.avp_code);
offset += 4;
- tf = proto_tree_add_uint_format(avpi_tree, hf_diameter_avp_flags, tvb,
- offset , 1, flags, "Flags: 0x%02x (%s)", flags,
- flagstr);
+ tf = proto_tree_add_uint_format_value(avpi_tree, hf_diameter_avp_flags, tvb,
+ offset, 1, flags, "0x%02x (%s)", flags,
+ flagstr);
flags_tree = proto_item_add_subtree(tf, ett_diameter_avp_flags);
proto_tree_add_boolean(flags_tree, hf_diameter_avp_flags_vendor_specific, tvb, offset, 1, flags);
proto_tree_add_boolean(flags_tree, hf_diameter_avp_flags_mandatory, tvb, offset, 1, flags);
@@ -1737,8 +1737,8 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
offset += 3;
if (flags & AVP_FLAGS_V) {
- proto_tree_add_uint_format(avpi_tree, hf_diameter_avp_vendor_id,
- tvb, offset, 4, vendorId, "Vendor-Id: %s", vendorName);
+ proto_tree_add_uint_format_value(avpi_tree, hf_diameter_avp_vendor_id,
+ tvb, offset, 4, vendorId, "%s", vendorName);
offset += 4;
}