From 729b6da8a74a6ddba6539f641e4faf8d6de44d16 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 6 Feb 2008 19:11:45 +0000 Subject: added wireshakr lua script for satp --- wireshark-lua/satp.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 wireshark-lua/satp.lua (limited to 'wireshark-lua') diff --git a/wireshark-lua/satp.lua b/wireshark-lua/satp.lua new file mode 100644 index 0000000..e10cdba --- /dev/null +++ b/wireshark-lua/satp.lua @@ -0,0 +1,32 @@ +do + -- satp example + -- declare our protocol + + satp_proto = Proto("SATP","Secure Anycast Tunneling Protocol") + + -- create a function to dissect it + function satp_proto.dissector(buffer,pinfo,tree) + pinfo.cols.protocol = "SATP" + local subtree = tree:add(satp_proto,buffer(),"SATP Protocol Data") + subtree:add(buffer(0,4),"Sequence Number: " .. buffer(0,4):uint()) + subtree:add(buffer(4,2),"Sender ID: " .. buffer(4,2):uint()) + subtree:add(buffer(6,2),"Mux: " .. buffer(6,2):uint()) + subtree:add(buffer(8,2),"Payload Type: " .. buffer(8,2):uint()) + + local data_dis = Dissector.get("data") + local payload_dis = Dissector.get("ip") + + if payload_dis ~= nil then + payload_dis:call(buffer(10):tvb(),pinfo,tree) + else + data_dis:call(buffer(10):tvb(),pinfo,tree) + end + end + + -- load the udp.port table + + udp_table = DissectorTable.get("udp.port") + + -- register our protocol to handle udp port 4444 + udp_table:add(4444,satp_proto) +end -- cgit v1.2.3