Ask Your Question
0

LUA extract tcp.analysis.ack_rtt value

asked 2020-05-04 15:26:25 +0000

romain_o gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-04 20:44:30 +0000

cmaynard gravatar image

You can try this:

subtree:add(F_rtt().value,rtt):set_generated()

See https://www.wireshark.org/docs/wsdg_h... for more information.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-05-04 15:26:25 +0000

Seen: 374 times

Last updated: May 04 '20