I an analysing a very large PCAP holding many HTTP transactions, some of which interest me. I am using tshark
with a Lua script essentially to query all packets that match a filter.
tshark -X lua_script:filter.lua -r some.pcap -q
So far so good. However, I am looking specifically for the value of a packet's TCP stream number which goes by the name tcp.stream
inside Wireshark. Can anyone say what changes I require to filter.lua
to print that?
-- filter.lua
do
local function init_listener()
local tap = Listener.new("http","http contains someKeyValue && tcp.port eq 1234")
function tap.reset()
end
function tap.packet(pinfo,tvb,ip)
print("Found my packet ... now what?")
end
function tap.draw()
end
end
init_listener()
end
The documentation on what pinfo
, tvb
and ip
are is unforthcoming.