Comment # 13
on bug 8579
from Marko Hrastovec
(In reply to comment #12)
> Thanks for your work - the source is much larger, but do note that most of
> that isn't executable code, it's tables of data describing the fields in the
> protocol. I really am much more comfortable with this version :)
You are right about the tables and code. In fact code got even a little simpler
in one part and is certainly not longer.
> Warn Dissector bug, protocol ASTERIX, in packet 818: proto.c:2826: failed
> assertion "hfinfo->type == FT_FLOAT"
>
> I've dug a little, and it looks like there are some fields that are listed
> as either FIELD_PART_FLOAT or FIELD_PART_UFLOAT in your tables but are being
> registered with Wireshark as some other type of field (mostly FT_UINT8).
>
> I ran a quick shell script to look for occurrences of this and found the
> following hf variables:
>
> &hf_062_270_LENGTH,
> &hf_062_270_ORIENTATION,
> &hf_062_270_WIDTH,
> &hf_062_290_01_TRK,
> &hf_062_290_02_PSR,
> &hf_062_290_03_SSR,
> &hf_062_290_04_MDS,
> &hf_062_290_05_ADS,
> &hf_062_290_06_ES,
> &hf_062_290_07_VDL,
> &hf_062_290_08_UAT,
> &hf_062_290_09_LOP,
> &hf_062_290_10_MLT,
> &hf_062_380_04_IM,
> &hf_002_090_RE,
> &hf_002_090_AE,
> &hf_034_090_RE,
> &hf_034_090_AE,
> &hf_062_110_06_TOS,
> &hf_062_210_AX,
> &hf_062_210_AY,
>
> Should these simply be registered as FT_FLOAT or is there something more
> complicated at work?
I think they should be simply registered as FT_FLOAT. I will take a look. I was
a little bit confused because I think I saw a warning once when I was
registering FT_FLOAT shorter than two bytes. But it was probably when I was not
yet using custom way to display floats. Obviously I didn't correct all the
UINT8s to FLOATs.
Using own way to present floats is the only way in our case. In the protocol
there can be a float long only 7 bits or even shorter. In fact float is never
stored as floats usually are with sign, exponent and fraction. They are always
integers and then the scaling factor is defined. For instance, flight level is
stored as integer with LSB (least significant bit) 1/4FL. Value 50 is actually
12.5. Showing 50 would make no sense. So I decided to show them as floats
because decimals are important.
You are receiving this mail because:
- You are watching all bug changes.