Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LUA extract tcp.analysis.ack_rtt value

Hi,

I'm new on LUA and try to read the value of tcp.analysis.ack_rtt.

I try something like that:

local f_tcp_rtt = Field.new("tcp.analysis.ack_rtt")
[...]
function p_tcprttm.dissector(extend,pinfo,tree)
    rtt = f_tcp_rtt()
    [...]
    subtree:add(F_rtt,rtt):set_generated()

But obtain this error:

Lua Error: C:\Program Files\Wireshark\plugins\myproto.lua:129: calling 'add' on bad self (number expected, got userdata)

How can I extract the value of this field ?

thanks !

Romain