diff options
author | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-20 10:55:06 +0000 |
---|---|---|
committer | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-20 10:55:06 +0000 |
commit | db1e06e751b65264702120e0a17a4189b71282a3 (patch) | |
tree | 10d7d515d91dc7e6b8920769d7bb2603c62163bd /epan/dissectors/packet-lmp.c | |
parent | 51d15550dbbcb90a60898c5ad942baa9e3ee408e (diff) |
From Hannes Gredler:
attached a patch to display LMP bandwith values in Mbps format
rather than the Byte/s format which is IMO a bit awkward to read.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17923 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-lmp.c')
-rw-r--r-- | epan/dissectors/packet-lmp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index 3d2fd04638..1b25aabb05 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -1356,8 +1356,8 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Verify Transport Mechanism: 0x%0x", tvb_get_ntohs(tvb, offset2+10)); proto_tree_add_text(lmp_object_tree, tvb, offset2+12, 4, - "Transmission Rate: %.10g", - tvb_get_ntohieee_float(tvb, offset2+12)); + "Transmission Rate: %.3f Mbps", + tvb_get_ntohieee_float(tvb, offset2+12)*8/1000000); proto_tree_add_text(lmp_object_tree, tvb, offset2+16, 4, "Wavelength: %d", tvb_get_ntohl(tvb, offset2+16)); @@ -1561,13 +1561,13 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item_set_text(ti2, "Interface Switching Capability: " "Switching Cap: %s, Encoding Type: %s, " - "Min BW: %.10g, Max BW: %.10g", + "Min BW: %.3f Mbps, Max BW: %.3f Mbps", val_to_str(tvb_get_guint8(tvb, offset2+l+2), gmpls_switching_type_str, "Unknown (%d)"), val_to_str(tvb_get_guint8(tvb, offset2+l+3), gmpls_lsp_enc_str, "Unknown (%d)"), - tvb_get_ntohieee_float(tvb, offset2+l+4), - tvb_get_ntohieee_float(tvb, offset2+l+8)); + tvb_get_ntohieee_float(tvb, offset2+l+4)*8/1000000, + tvb_get_ntohieee_float(tvb, offset2+l+8)*8/1000000); proto_tree_add_item(lmp_subobj_tree, lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_SWITCHING_TYPE], tvb, offset2+l+2, 1, FALSE); @@ -1575,11 +1575,11 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_LSP_ENCODING], tvb, offset2+l+3, 1, FALSE); proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+4, 4, - "Minimum Reservable Bandwidth: %.10g bytes/s", - tvb_get_ntohieee_float(tvb, offset2+l+4)); + "Minimum Reservable Bandwidth: %.3f Mbps", + tvb_get_ntohieee_float(tvb, offset2+l+4)*8/1000000); proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+8, 4, - "Maximum Reservable Bandwidth: %.10g bytes/s", - tvb_get_ntohieee_float(tvb, offset2+l+8)); + "Maximum Reservable Bandwidth: %.3f Mbps", + tvb_get_ntohieee_float(tvb, offset2+l+8)*8/1000000); break; case 2: |