diff options
Diffstat (limited to 'wireshark/nifi.lua')
-rw-r--r-- | wireshark/nifi.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wireshark/nifi.lua b/wireshark/nifi.lua index d81ff31..2bc96a6 100644 --- a/wireshark/nifi.lua +++ b/wireshark/nifi.lua @@ -1,6 +1,3 @@ --- NOTE: my system is little-endian, so the .pcap files and this decoder expect --- little endian - local nifi = Proto("nifi", "Nintendo DS ni-fi") nifi.fields.magic = ProtoField.uint32("nifi.magic", "Magic", base.HEX) nifi.fields.senderid = ProtoField.int32("nifi.senderid", "SenderID", base.DEC) @@ -21,7 +18,7 @@ local nifi_type_enum_field = Field.new("nifi.type.enum") function nifi.dissector(buffer, pinfo, tree) -- check magic ("NIFI") if buffer(0, 4):uint() ~= 0x4e494649 then return end - local nifi_tree = tree:add(nifi, buffer(), "Ni-Fi data") + local nifi_tree = tree:add(nifi, buffer(0, 24), "Ni-Fi data") nifi_tree:add(nifi.fields.magic, buffer(0, 4)) nifi_tree:add_le(nifi.fields.senderid, buffer(4, 4)) @@ -36,5 +33,7 @@ function nifi.dissector(buffer, pinfo, tree) pinfo.cols.protocol = nifi.name pinfo.cols.src = nifi_senderid_field().display pinfo.cols.info = "type:" .. nifi_type_enum_field().display + + return 24 end |