Capturing Profisafe packets using Lua Wireshark dissector
I am writing a Lua script to capture profisafe packets on wireshark.It is above the profinet layer in the stack.The wireshark has a built in profinet dissector but does not have a profisafe dissector.
For other protocols built on tcp or udp protocol one can do something like
local tcp_port = Dissector.get("tcp.port")
tcp_port:add(1234,foo_protocol)
to capture the packets that arises and received by the port 1234.
But profisafe is built on profinet and does not contain tcp or udp as the underlying layer.How to capture the packets in this case? I tried giving ethernet frame address in the place of port name but it did not work.
I have no idea if this is related or what it does, but the Profinet IO dissector has an option for "detailed PROFIsafe dissection".
The Profinet IO dissector also has a sub-dissector table for heuristic dissectors named "pn_io" that can be used by sub-dissectors to add themselves to the table and be called by the PNIO dissector. Again I have no idea if this is useful to you.
Thanks for the reply. Can you provide any examples or direct me to any resources/ links where pnio dissector is implemented?
There is the source file here and the wiki page here.
Add dissection for PROFINET PROFIsafe packets
There are sample files attached to the issue above but the decode seems to be missing a config file:
GSD-file networkpath failure! Please check your GSD-file networkpath. (No Path configured)
i meant, can you show an example of Profisafe LUA dissector,