rpudpdl-stat-ssidsn.lua
-- reference "Wireshark User's Guide - Chapter 11. Lua Support in Wireshark"
-- This program will register a menu that will open a window with a count of occurrences
-- of every sn in the capture
do
local rpudpdls = {}
local f_rpudpdl_sn = Field.new("rpudpdl.sn")
local f_rpudpdl_ssid = Field.new("rpudpdl.ssid")
local f_rpudpdl_msgtype = Field.new("rpudpdl.msgtype")
-- this is our tap
local tap = Listener.new(tap, "rpudpdl");
function getkey(ssid, sn)
return ssid .. " " .. sn
end
-- this function will be called once for each packet
function tap.packet(pinfo,tvb)
local rpudpdl_ssid = f_rpudpdl_ssid()
local rpudpdl_sn = f_rpudpdl_sn()
local rpudpdl_msgtype = f_rpudpdl_msgtype()
local ssid = rpudpdl_ssid.value
local sn = rpudpdl_sn.value
local msgtype = rpudpdl_msgtype.value
local key = getkey(ssid, sn)