if msgtyp == 0 then packets[xid] = { timestamp = frameepochtime, source = tostring(ipsrc), destination = tostring(ipdst), op_code = nfs_op }; else local l = packets[xid] if l ~= nul then packets[xid] = nil local time_delta = frameepochtime - l.timestamp if time_delta > min_time_delta then print(frametime .. " " .. l.source .. " <=> " .. l.destination .. " " .. string.format("%.3f",time_delta) .. " " .. l.op_code) end end
$ tshark -q -X lua_script:nfs.lua -f "port 2049"
"Aug 27, 2014 16: 44: 43.000 CEST" aaaa: bbbb: ccc: 10a0 :: 1: 7f <=> aaaa: bbbb: ccc: 10bf :: 1: 8c 0.001 v4_EXCHANGE_ID "Aug 27, 2014 16: 44: 43.000 CEST" aaaa: bbbb: ccc: 10a0 :: 1: 7f <=> aaaa: bbbb: ccc: 10bf :: 1: 8c 0.001 v4_CREATE_SESSION "Aug 27, 2014 16: 44: 43.000 CEST" aaaa: bbbb: ccc: 10a0 :: 1: 7f <=> aaaa: bbbb: ccc: 10bf :: 1: 8c 0.001 v4_PUTROOTFH "Aug 27, 2014 16: 44: 43.000 CEST" aaaa: bbbb: ccc: 10a0 :: 1: 7f <=> aaaa: bbbb: ccc: 10bf :: 1: 8c 0.002 v4_RECLAIM_COMPLETE "Aug 27, 2014 16: 44: 43.000 CEST" aaaa: bbbb: ccc: 10a0 :: 1: 7f <=> aaaa: bbbb: ccc: 10bf :: 1: 8c 0.001 v4_PUTROOTFH "Aug 27, 2014 16: 44: 43.000 CEST" aaaa: bbbb: ccc: 10a0 :: 1: 7f <=> aaaa: bbbb: ccc: 10bf :: 1: 8c 0.001 v4_DESTROY_SESSION "Aug 27, 2014 16: 44: 43.000 CEST" ab161.127 <=> ab191.140 0.001 v4_EXCHANGE_ID "Aug 27, 2014 16: 44: 43.000 CEST" ab161.127 <=> ab191.140 0.001 v4_CREATE_SESSION "Aug 27, 2014 16: 44: 43.000 CEST" ab161.127 <=> ab191.140 0.003 v4_PUTROOTFH "Aug 27, 2014 16: 44: 43.000 CEST" ab161.127 <=> ab191.140 0.002 v4_RECLAIM_COMPLETE "Aug 27, 2014 16: 44: 43.000 CEST" ab161.127 <=> ab191.140 0.004 v4_PUTROOTFH
Source: https://habr.com/ru/post/241513/
All Articles