Wireshark mailing list archives
Re: 16 byte integer decoding
From: "Constantine Gavrilov" <CONSTG () il ibm com>
Date: Tue, 23 Mar 2021 08:57:50 +0200
No. So the idea is to have a new type FT_UINT128, and one new format BASE_BYTES. The BASE_HEX would display as it displays today -- there is no problem printing two FT_UINT64 in HEX (high and low parts). For FT_UNIT128 and BASE_DEC, 12 would be displayed as 12, and 1000000 would be displayed as 1000000. But after a certain digit length, it would be displayed as X.YYYYYYe+Z. Similar for BASE_BYTES, 12 would be displayed as 12, and 1048576 would be displayed as 1048576. But, after a cretain value, the display would round to the units of KiB, or MiB, or GiB, or TiB, etc... Just because these values are too long to print. Sometimes, the spec also says these are units of x10, or , x100, or x1000. This can be handled as a scaling factor in the field definion. If a multiplier does not exist, I can add it as well. -- ---------------------------------------- Constantine Gavrilov Storage Architect Master Inventor Tel-Aviv Storage Lab IDT Lead Tel-Aviv IBM Storage Lab 1 Azrieli Center, Tel-Aviv Phone: +972-3-6897318 Fax: +972-3-6897230 ---------------------------------------- From: Guy Harris <gharris () sonic net> To: Developer support list for Wireshark <wireshark-dev () wireshark org> Date: 03/22/2021 11:25 PM Subject: [EXTERNAL] Re: [Wireshark-dev] 16 byte integer decoding Sent by: "Wireshark-dev" <wireshark-dev-bounces () wireshark org> On Mar 22, 2021, at 11:35 AM, Constantine Gavrilov <CONSTG () il ibm com> wrote:
There are two repeated patterns for this: 1. For capacity (bytes, blocks, etc.). 2. For units (how many times). So, I am thinking about two formats: 1. For bytes. 2. For units. The implementation would get high and low 64-bits, and compute a 64-bit
value in units of 10^x (depending on the value) for units, and in units of KiB-ZiB (depending on the value) for bytes. So a value of 12 would be shown as "1.2 deca-XXX" for units, and a value of 1 would be shown as "1/1024 KiB bytes" for bytes? ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://urldefense.proofpoint.com/v2/url?u=https-3A__www.wireshark.org_lists_wireshark-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=XzHrT4jzZ2lsSkPL8XE51gcxM30kcdBgWfG2QV6bUpw&m=tQcxqgz5hde146ve9M9j1qhqTetC04DMFRtybs97_8M&s=OSgT1leFMYub6iWFr_4xCHXLkD-ORYmaPPBkhO_j7KQ&e= Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__www.wireshark.org_mailman_options_wireshark-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=XzHrT4jzZ2lsSkPL8XE51gcxM30kcdBgWfG2QV6bUpw&m=tQcxqgz5hde146ve9M9j1qhqTetC04DMFRtybs97_8M&s=2II6jhyUzo3gDG2D4C8Pp4OyRKh1IHGY4buVKQ43nEs&e= mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- 16 byte integer decoding Constantine Gavrilov (Mar 22)
- Re: 16 byte integer decoding Guy Harris (Mar 22)
- Re: 16 byte integer decoding Constantine Gavrilov (Mar 22)
- Re: 16 byte integer decoding Guy Harris (Mar 22)