Wireshark-dev: Re: [Wireshark-dev] lua dissector: using base.UNIT_STRING on ftypes.DOUBLE Proto

From: John Thacker <johnthacker@xxxxxxxxx>
Date: Mon, 20 Mar 2023 19:14:11 -0400
On Mon, Mar 20, 2023, 2:36 PM Dennis Lambe <dennis@xxxxxxxxxxxxxx> wrote:
On Mon, Mar 20, 2023 at 12:17 PM chuck c <bubbasnmp@xxxxxxxxx> wrote:
> Have you tried defining the field using ProtoField.float or ProtoField.double?

Yup. Same behavior. Unit shows up correctly for `tshark -G values` but
doesn't appear in the UI.

The problem isn't in Lua, but in epan/proto.c

The code that handles the values displayed for doubles ignores unit strings.

Dr. Lars Völker started a MR to add this:


John Thacker