summaryrefslogtreecommitdiffstats
path: root/debian/tests/frame-count.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/tests/frame-count.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/tests/frame-count.lua b/debian/tests/frame-count.lua
new file mode 100644
index 0000000..b41b4d2
--- /dev/null
+++ b/debian/tests/frame-count.lua
@@ -0,0 +1,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