Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lua wireshark plugin dissector buffer length

How can I get the length of buffer data in dissector function. The type is userdata in lua, it points to raw memory. I have tried to convert it to metatable, but still cannot get the length of it.

like image 353
user1332907330 Avatar asked Jan 12 '23 05:01

user1332907330


1 Answers

Try this

function dissector(buffer,pinfo,tree)
    print(buffer:len())
end
like image 98
afkfurion Avatar answered Jan 18 '23 15:01

afkfurion