Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Question to dissecting my protocol with Lua language

From: "wangguochao" <wangguochao01@xxxxxxxxxxxxxxxx>
Date: Wed, 8 Oct 2014 11:28:32 +0800
Dear Wireshark team:

Hello. I'm sorry to disturb you. However, I met the terrible trouble.

These days, I'm working on dissecting my protocol with Lua language.
And my protocol differs from other protocols in ethertype of the ethernet
packet.
When the ethertype is 0x8876, it is dissected by my dissector.

Here is the question as follows.
When the packet length is larger than 1514, the packet is divided into some
ethernet packets on the wire.
Then my dissector construct a new buffer to receive and connect these
packets.
And display the buffer in the packet detail panel.
However, when I click the node of dissector tree in the packet detail
Panel,sometimes(frequency is one in ten times) the wireshark will break
down.
What a difficulty it is ! The picture is the reference.
Please refer to attachment for the picture.

The meaning in the picture is
 "Wireshark stops running.
  Bug occurs. Program cannot be able to run. After the program is closed,
  if there is solution windows will notify you.

					Program Stop"

And I also send you source code. Hope that will help.
(function p_HdplcFrame.dissector(buf,pkt,root) is the entrance of my
protocol dissector.) Please refer to attachment for the code .
In conclusion,
Question1: Is it possible to use Lua language to dissector the reassembled
ethernet packets ? ( The Lua interface is enough ?)
            If it is possible , how to do ?

Question2: If Lua can't do this job, I wonder whether I can do this job by
calling C function in Lua ?

I'm appreciate your answer.

Best regards,
GC Wang from Panasonic.

Attachment: hdplcframe_protocol_dissector.lua
Description: Binary data

Attachment: wireshark breakdown.bmp
Description: Windows bitmap