Ask Your Question
0

How to call lua dissector from C dissector?

asked 2021-03-17 14:33:25 +0000

ranjeetsih gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-03-17 16:04:47 +0000

ranjeetsih gravatar image

a dissector as following is working fine.

local gtp_tpdu_custom = Proto.new("gtp_tpdu_custom", "BNG GTP Custom Demo dissector")

function gtp_tpdu_custom.dissector(buffer, pinfo, tree)
end
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: 2021-03-17 14:33:25 +0000

Seen: 743 times

Last updated: Mar 17 '21