Comment # 2
on bug 8490
from David Arnold
(In reply to comment #1)
> Many similar comments to the SoupBinTCP dissector. In addition:
>
> - val_to_str uses the "Unknown" string as a format string passing a uint.
> You can either put a %u in, so something like "Unknown (%u)" or you can just
> use val_to_str_const which simply returns the string as-is without
> formatting it.
>
> - you should likely use tvb_reported_length instead of tvb_length so the
> dissector behaves correctly when the captured packet has been truncated
>
> - by convention proto_register_* is near the bottom, so should be below
> dissect_ouch_heur (though this is very minor)
>
> - rather than putting in (void)data; statements to avoid unused-parameter
> warnings, mark them explicitly unused with the _U_ flag that wireshark
> defines when building, so something like int myFunc(int used, int unused
> _U_, int used)
>
> Some of these may apply to SoupBinTCP as well, I just didn't notice them
> there.
>
> In general both dissectors look pretty nice, they just need a bit of work
> (and we need to document our APIs a little better!)
>
> Evan
Thanks (again) for the feedback; much appreciated.
re: tvb_reported_length(), do I understand correctly that tvb->reported_length
is what the packet headers have indicated, but tvb->length is what's actually
in the buffer?
You are receiving this mail because:
- You are watching all bug changes.