Revision history [back]

How to call lua dissector from C dissector?

I want to write a lua dissector that i can call from a dissector written in C in wireshark.

I want to be able to call the lua dissector as following in the C dissector.

static dissector_handle_t gtp_tpdu_custom_handle;
gtp_tpdu_custom_handle = find_dissector("gtp_tpdu_custom");
if (gtp_tpdu_custom_handle) {
call_dissector(gtp_tpdu_custom_handle, tvb, pinfo, tree);
}


I want to write a lua dissector and register as "gtp_tpdu_custom" that I can call from C dissector.

How can i achieve it?