Ethereal-dev: Re: [Ethereal-dev] Mbps display in the LMP dissector
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Kirby Files <kfiles@xxxxxxxxxxx>
Date: Wed, 29 Mar 2006 08:10:54 -0500
Nope. Bandwidth is measured in metric units of bits, not IEC binary
units. If you think about it, there is no natural restriction on
bandwidth to occur in powers of 2, the way there is on, say, computer
RAM. Packets are sized appropriately to their payload, whether that's
40, 53 or 1500 bytes. Circuits are generally sized in multiples of
64kbps, but are rarely/never exactly 2^n.
Thanks, --kirby Michael Tuexen wrote on 03/29/2006 08:05 AM:
Just wondering: Should it not be divided by 1024*1024 instead of 1000*1000? Best regards Michael On Mar 29, 2006, at 2:35 PM, Hannes Gredler wrote:hi ethereal developers, 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. asking for inclusion tx, /hannes Index: epan/dissectors/packet-lmp.c =================================================================== --- epan/dissectors/packet-lmp.c (revision 17750) +++ epan/dissectors/packet-lmp.c (working copy) @@ -1356,8 +1356,8 @@"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 @@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 @@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);_______________________________________________ Ethereal-dev mailing list Ethereal-dev@xxxxxxxxxxxx http://www.ethereal.com/mailman/listinfo/ethereal-dev_______________________________________________ Ethereal-dev mailing list Ethereal-dev@xxxxxxxxxxxx http://www.ethereal.com/mailman/listinfo/ethereal-dev
- References:
- [Ethereal-dev] Mbps display in the LMP dissector
- From: Hannes Gredler
- Re: [Ethereal-dev] Mbps display in the LMP dissector
- From: Michael Tuexen
- [Ethereal-dev] Mbps display in the LMP dissector
- Prev by Date: Re: [Ethereal-dev] Mbps display in the LMP dissector
- Next by Date: Re: [Ethereal-dev] Armagetronad dissector update
- Previous by thread: Re: [Ethereal-dev] Mbps display in the LMP dissector
- Next by thread: [Ethereal-dev] Small wiretap-related [patches]
- Index(es):