Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在解析器函数中获取缓冲区数据的长度。类型userdata在 lua 中,它指向原始内存。我试图将它转换为元表,但仍然无法获得它的长度。
userdata
试试这个
function dissector(buffer,pinfo,tree) print(buffer:len()) end