This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

Lua dissector for custom PcapNG blocks

asked Nov 07 '25

It seems it is possible to register dissectors in C for custom PcapNG blocks based on PEN numbers. I am trying to implement a dissector purely based on Lua code for this same purpose but I am unable to find a way to register my dissector.

Does Wireshark support this? Thanks,

Comments

Have you looked at the pcapng_custom_block table?
packet-bblog.c:

dissector_add_uint("pcapng_custom_block", PEN_NFLX, bblog_handle);
User 2763 ( Nov 07 '25 )

Thanks @User 2763, that works. Lua syntax would be:

table = DissectorTable.get("pcapng_custom_block")
table:add(PEN_NUMBER, my_proto)
User 51725 ( Nov 08 '25 )

1 Answer

0

answered Nov 08 '25

From @User 2763 comment the answer would be yes, Wireshark supports this and can be achieved adding a custom PEN number handler to the pcapng_custom_block table:

table = DissectorTable.get("pcapng_custom_block")
table:add(PEN_NUMBER, my_proto)
cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.