From e32c8605be4c7eda35c4e5ce6ff5c47ac37b9098 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 26 Jun 2013 12:30:09 +0200 Subject: wireshark dissector diff --git a/wireshark/README.org b/wireshark/README.org new file mode 100644 index 0000000..5cff8f2 --- /dev/null +++ b/wireshark/README.org @@ -0,0 +1,4 @@ +The Lua code in this directory implements a HBBP protocol dissector +for wireshark. Add the Lua code to /usr/share/wireshark/init.lua. If +you intend to run wireshark as root make sure to comment out the +appropriate lines in this file to allow Lua to run. diff --git a/wireshark/hbbp_dissector.lua b/wireshark/hbbp_dissector.lua new file mode 100644 index 0000000..73316f5 --- /dev/null +++ b/wireshark/hbbp_dissector.lua @@ -0,0 +1,24 @@ +hbbp_proto = Proto("hbbp","Home Brew Broadcast Protocol") +-- create a function to dissect it +function hbbp_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "HBBP" + local subtree = tree:add(hbbp_proto,buffer(),"HBBP Data") + + local i = 0 + local b = buffer():bytes() + + while (i