Wireshark-bugs: [Wireshark-bugs] [Bug 10695] Lua Proto:register_heuristic should accept Dissecto

Date: Mon, 15 Dec 2014 19:13:30 +0000

Comment # 2 on bug 10695 from
(In reply to Matthijs Kooijman from comment #0)
> It seems that the Proto.dissector attribute setter expects a lua function,
> but the getter returns a Dissector object instead, which is not accepted by
> register_heuristic.

Yup.

> I think it makes sense to allow passing a Dissector object to
> register_heuristic. Additionally, it would also make sense to make the
> function argument optional and just use the dissector associated with the
> Proto object by default?

But a Proto dissector function (usually/should) behaves differently than a
heuristic... a heuristic should just return a true/false boolean for whether
the packet belongs to this protocol, whereas a dissector should parse fields
and set tree items and return the number of bytes consumed (or number of more
bytes needed).


You are receiving this mail because:
  • You are watching all bug changes.