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

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


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

new_register_dissector() or register_dissector().
permanent link

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 ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×431
×1

question asked: 13 May '14, 04:34

question was seen: 1,651 times

last updated: 13 May '14, 06:49

p​o​w​e​r​e​d by O​S​Q​A