This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

variables in lua

0

I'm using MPTCP(Multipath tcp) I'm trying just to display duplicated packets by filtering duplicated DSN(data sequence number) There is a filter called 'mptcp.duplicated_dsn' but never displays the packets though there are duplicated ones.

why does this filter not work?

And I'm trying to make a simple dissector in LUA for this. So I wrote just one DSN of a packet to see if it can dissect by data sequence number. but It never reads the DSN. I think it's because of the length of DSN as I've checked it reads values of other fields which are shorter than DSN. The DSN must be greater than INTEGER number. Probably I need a bigger variable like 'long' in c I can't figure out where to put this bigger variable for the numbers. Can anyone help?

 local r_transmission = Proto("Rtsm", "RTSM")
 local dup_dsn = Field.new.("tcp.options.mptcp.rawdataseqno")

function r_transmission.dissector(buffer, pinfo, root)

dsn = dup_dsn().value
if dsn == 1096995081 then
pinfo.cols.info = "rrrrr"

end end

register_postdissector(r_transmission)

asked 12 Jul ‘17, 02:09

ngn505's gravatar image

ngn505
6779
accept rate: 0%

The dot between Field.new and (“tcp.options.mptcp.rawdataseqno”) is really present in your code or it is only here?

(12 Jul ‘17, 05:52) sindy