user1332907330
user1332907330

Reputation: 123

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.

Upvotes: 4

Views: 3787

Answers (1)

afkfurion
afkfurion

Reputation: 2865

Try this

function dissector(buffer,pinfo,tree)
    print(buffer:len())
end

Upvotes: 11

Related Questions