summaryrefslogtreecommitdiffstats
path: root/debian/tests/frame-count.lua
blob: b41b4d20500c86b142ce24361e1e98b0b322ddff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
do
    packets = 0;
    local function init_listener()
        local tap = Listener.new("frame")
        function tap.reset()
            packets = 0;
        end
        function tap.packet(pinfo,tvb, ip)
            packets = packets + 1
        end
        function tap.draw()
           print("Packet count:", packets)
           os.exit(0)
        end
    end
    init_listener()
end