문제

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.

도움이 되었습니까?

해결책

Try this

function dissector(buffer,pinfo,tree)
    print(buffer:len())
end
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top