This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Can WSGD understand float NAN, QNAN?

0

Have a packet with float32 values. Some of them are filled with NAN(QNAN). With WSGD Wireshark shows them as 6.90546e-041.
How to fix it with .fdesk and .wsgd files only? I cannot edit sources and recompile WSGD at the time.

Upd. Sorry, it was my mistake, wrong byte order.

asked 18 Jan '16, 08:20

kyb's gravatar image

kyb
16357
accept rate: 100%

edited 19 Jan '16, 05:22


One Answer:

0

Relying on http://www.astro.umass.edu/~weinberg/a732/notes07_01.pdf for hexa decimal values of +/-Infinity and Nan.

The following test :

  call frame_append_hexa_data (internal_frame, "7f800000");
  call frame_append_hexa_data (internal_frame, "ff800000");
  call frame_append_hexa_data (internal_frame, "7fc00000");
  float32  float32_7f800000_PosInfinity;
  float32  float32_ff800000_NegInfinity;
  float32  float32_7fc00000_NaN;

call frame_append_hexa_data (internal_frame, "7ff00000 00000000"); call frame_append_hexa_data (internal_frame, "fff00000 00000000"); call frame_append_hexa_data (internal_frame, "7ff80000 00000000"); float64 float64_7ff00000_00000000_PosInfinity; float64 float64_fff00000_00000000_NegInfinity; float64 float64_7ff80000_00000000_NaN;

Displays (win64 wireshark 2.0 & 1.12) :

  float32_7f800000_PosInfinity: 1.#INF
float32_ff800000_NegInfinity: -1.#INF
float32_7fc00000_NaN: 1.#QNAN
float64_7ff00000_00000000_PosInfinity: 1.#INF
float64_fff00000_00000000_NegInfinity: -1.#INF
float64_7ff80000_00000000_NaN: 1.#QNAN

Which seems coherent.

answered 18 Jan ‘16, 13:54

wsgd's gravatar image

wsgd
9113
accept rate: 100%