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

where to declare a pattren name in lua while writting a dissector.

0

for example, i used :

dissector_add_string("rtp_ dyn_ payload_ type","PATTREN", xxx_handle);

while writing a normal dissector in c. Now i want to write the dissector in lua .please help me with this.

asked 15 Apr '15, 04:27

lakshmi's gravatar image

lakshmi
16669
accept rate: 0%

edited 19 Apr '15, 22:41

i tried like this:

local my_dissector_table = DissectorTable.get("rtp.pt") local xxx = dissectortable:get_dissector("PATTREN") my_dissector_table:add(xxx, p_myproto)

It is showing error as:

Lua: Error during loading: C:\Program Files\Wireshark1\myproto.lua:30: bad argument #1 to 'get_dissector' (number expected, got string)

(19 Apr '15, 22:28) lakshmi