diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-04-30 16:32:18 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-04-30 16:32:18 +0200 |
commit | cc28773b03a5ac1c2a8529c9d170f30b9b778d07 (patch) | |
tree | 8f90c6a08940d4921f8cf3f06d0fdc08d3e2170e /wireshark/nifi-dissect.lua | |
parent | 8f33d9c9a7c95f17c480782fee3b5e405d41a79c (diff) |
more fiddling (found plain text!)
Diffstat (limited to 'wireshark/nifi-dissect.lua')
-rw-r--r-- | wireshark/nifi-dissect.lua | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/wireshark/nifi-dissect.lua b/wireshark/nifi-dissect.lua deleted file mode 100644 index 98520e5..0000000 --- a/wireshark/nifi-dissect.lua +++ /dev/null @@ -1,32 +0,0 @@ -proto = Proto("NIFI", "Nintendo DS ni-fi") - -MAGIC = ProtoField.uint32("nifi.magic", "Magic", base.HEX) -SENDERID = ProtoField.int32("nifi.senderid", "SenderID", base.DEC) -TYPE = ProtoField.uint32("nifi.type", "Type", base.DEC) -LENGTH = ProtoField.uint32("nifi.length", "Length", base.DEC) -TIMESTAMP = ProtoField.uint64("nifi.timestamp", "Timestamp", base.DEC) - -proto.fields = { - MAGIC, - SENDERID, - TYPE, - LENGTH, - TIMESTAMP, -} - -function proto.dissector(buffer, pinfo, tree) - -- check magic ("NIFI") - if buffer(0, 4):uint() ~= 0x4e494649 then return end - - pinfo.cols.protocol = proto.name - - local subtree = tree:add(proto, buffer(), "Ni-Fi data") - - subtree:add(MAGIC, buffer(0, 4)) - subtree:add_le(SENDERID, buffer(4, 4)) - pinfo.cols.src = tostring(buffer(4, 4):le_int()) - subtree:add_le(TYPE, buffer(8, 4)) - subtree:add_le(LENGTH, buffer(12, 4)) - subtree:add_le(TIMESTAMP, buffer(16, 8)) -end - |