Ask Your Question
0

Lua dissector for custom PcapNG blocks

asked 2025-11-07 15:04:49 +0000

Antón gravatar image

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,

edit retag flag offensive close merge delete

Comments

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

dissector_add_uint("pcapng_custom_block", PEN_NFLX, bblog_handle);
Chuckc gravatar imageChuckc ( 2025-11-07 18:32:45 +0000 )edit

Thanks @Chuckc, that works. Lua syntax would be:

table = DissectorTable.get("pcapng_custom_block")
table:add(PEN_NUMBER, my_proto)
Antón gravatar imageAntón ( 2025-11-08 10:48:16 +0000 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2025-11-08 10:50:05 +0000

Antón gravatar image

From @Chuckc 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)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2025-11-07 15:04:49 +0000

Seen: 97 times

Last updated: Nov 08