This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Nested LUA Dissector with CIGI

0

I'm trying to write a LUA Dissector which consumes some bytes and calls the existing dissector CIGI for the rest of the package. As in Multi-Protocol-Dissector stated, i tried to get a reference to the CIGI dissector with

myDissector = Dissector.get("cigi")

but i'm not able to get a valid Dissector. Even not as in "can't find existing Dissector" stated with

DissectorTable.get("udp.port"):get_dissector("8005") or DissectorTable.get("udp.port"):get_dissector(8005) or DissectorTable.get("udp.port"):get_dissector("cigi") or DissectorTable.get("udp.port"):get_dissector("CIGI")

My dissector looks like this so far:

myCIGI = Proto("My CIGI", "My CIGI Interface")

function myCIGI.dissector(buffer,pinfo,tree) local subtree = tree:add(myCIGI, buffer, "My Header") subtree:add(buffer(0,1), "Header: " .. buffer(0,1):uint()) cigi_dissector = Dissector.get("cigi") sub_buf = buffer(1):tvb() cigi_dissector:call(sub_buf,pinfo,tree) end

upd_tabe = DissectorTable.get("udp.port") udp_table:add(8014, myCIGI) udp_table:add(8015, myCIGI)

Because of the small protocoll extension of myCIGI a would like to avoid to write a complete new dissector in C.

Thanks for any help.

asked 13 May ‘14, 04:34

athomi's gravatar image

athomi
11114
accept rate: 0%

edited 13 May ‘14, 04:46


One Answer:

2

For that to work the CIGI dissector needs to register by name with

new_register_dissector() or register_dissector().

answered 13 May '14, 05:52

Anders's gravatar image

Anders ♦
4.6k952
accept rate: 17%

This means i should send a "feature request" or "bug report" to the maintainers of the cigi dissector? On the developer mailing list?

(13 May '14, 06:24) athomi
(13 May '14, 06:49) grahamb ♦