Revision history [back]
Wireshark 4.05 to 4.07 broke lua dissector
I have a lua dissector that works just fine in 4.05 but in 4.07 it does not work. I get a range nil in the lua console window. I tracked it down to dissect_tcp_pdus. It does not call my get_len_func or dissect_func. Does anyone know if there was some breaking changed between the two version?
function cac_protocol.dissector(buffer, pinfo, tree)
length = buffer:len()
pinfo.cols.protocol = cac_protocol.name
if length == 0 then
return
end
local subtree = tree:add(cac_protocol, buffer(), "CAC Protocol Data")
--I get here
print("dissect_tcp_pdus:" )
dissect_tcp_pdus(buffer, subtree, 4, get_pdu_len, do_dissection)
end
function get_pdu_len(tvb, pinfo, tree)
--I dont get here
print("get_pdu_len:")
return tvb(0, 4):int() *4
end
function do_dissection(tvb, pinfo, tree)
--I dont get here
print("do_dissection:")
--CODE Removed
end