From 9aa39c5190ac312318a2c0a90f7736c5ddc41c0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Thu, 2 Jun 2011 20:08:24 +0000 Subject: [PATCH] wireshark: show flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- wireshark/nsdp.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wireshark/nsdp.lua b/wireshark/nsdp.lua index 897f1b1..7128296 100644 --- a/wireshark/nsdp.lua +++ b/wireshark/nsdp.lua @@ -9,9 +9,12 @@ local f_data = ProtoField.string("nsdp.data", "Data", FT_STRING) local f_cmd = ProtoField.uint16("nsdp.cmd", "Command", base.HEX) local f_password = ProtoField.string("nsdp.password", "Password", FT_STRING) local f_newpassword = ProtoField.string("nsdp.newpassword", "New password", FT_STRING) +local f_flags = ProtoField.uint16("nsdp.flags", "Flags", base.HEX, { + [0x000a] = "Password error" +}) --local f_debug = ProtoField.uint8("nsdp.debug", "Debug") -p_nsdp.fields = {f_type,f_source,f_destination,f_seq,f_cmd,f_password,f_newpassword} +p_nsdp.fields = {f_type,f_source,f_destination,f_seq,f_cmd,f_password,f_newpassword,f_flags} -- nsdp dissector function function p_nsdp.dissector (buf, pkt, root) @@ -24,7 +27,9 @@ function p_nsdp.dissector (buf, pkt, root) local offset = 0 local ptype = buf(offset,2):uint() subtree:add(f_type, ptype) - offset = offset + 8 + offset = offset + 4 + subtree:add(f_flags, buf(offset,2)) + offset = offset + 4 subtree:add(f_source, buf(offset,6)) offset = offset + 6 subtree:add(f_destination, buf(offset,6)) -- 1.7.10.4