aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iwarp-ddp-rdmap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-13 14:26:27 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-13 22:56:50 +0000
commitb7f4e250599d7ea0452711d388c161fd4ef61c60 (patch)
tree0eb636cef1c72912cef640148b680d8ddabbed2d /epan/dissectors/packet-iwarp-ddp-rdmap.c
parenta869ec6f55160622a90bc437517dee91d57f85d5 (diff)
Adjust proto_tree_add_uint_format_value calls to use unit string
Several calls to proto_tree_add_uint_format_value could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. There also a few cases where proto_tree_add_uint_format_value could just be proto_tree_add_uint. Added a few more "common" unit string values to unit_strings.[ch] Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d Reviewed-on: https://code.wireshark.org/review/19242 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-iwarp-ddp-rdmap.c')
-rw-r--r--epan/dissectors/packet-iwarp-ddp-rdmap.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/epan/dissectors/packet-iwarp-ddp-rdmap.c b/epan/dissectors/packet-iwarp-ddp-rdmap.c
index 6f1d90362c..4d8e1ce79b 100644
--- a/epan/dissectors/packet-iwarp-ddp-rdmap.c
+++ b/epan/dissectors/packet-iwarp-ddp-rdmap.c
@@ -328,8 +328,6 @@ dissect_iwarp_rdmap(tvbuff_t *tvb, proto_tree *rdma_tree, guint32 offset,
guint8 layer, etype, hdrct;
- guint32 rdmardsz;
-
if (rdma_tree) {
if (rdma_msg_opcode == RDMA_READ_REQUEST) {
@@ -345,11 +343,9 @@ dissect_iwarp_rdmap(tvbuff_t *tvb, proto_tree *rdma_tree, guint32 offset,
offset, RDMA_SINKTO_LEN, ENC_BIG_ENDIAN);
offset += RDMA_SINKTO_LEN;
- rdmardsz = (guint32) tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint_format_value(rdma_header_tree,
+ proto_tree_add_item(rdma_header_tree,
hf_iwarp_rdma_rdmardsz, tvb, offset,
- RDMA_RDMARDSZ_LEN, rdmardsz, "%u bytes",
- rdmardsz);
+ RDMA_RDMARDSZ_LEN, ENC_BIG_ENDIAN);
offset += RDMA_RDMARDSZ_LEN;
proto_tree_add_item(rdma_header_tree, hf_iwarp_rdma_srcstag, tvb,
@@ -846,7 +842,7 @@ proto_register_iwarp_ddp_rdmap(void)
NULL, HFILL} },
{ &hf_iwarp_rdma_rdmardsz, {
"RDMA Read Message Size", "iwarp_rdma.rdmardsz",
- FT_UINT32, BASE_DEC, NULL, 0x0,
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_byte_bytes, 0x0,
NULL, HFILL} },
{ &hf_iwarp_rdma_srcstag, {
"Data Source STag", "iwarp_rdma.srcstag",