dissect-wireshark: add type, len, bin fields
Change-Id: Ib5134f03f0d4ecc3bc19bddb9a87c4a573fbc196
diff --git a/tools/dissect-wireshark/ndn.lua b/tools/dissect-wireshark/ndn.lua
index f243a98..2ed49ab 100755
--- a/tools/dissect-wireshark/ndn.lua
+++ b/tools/dissect-wireshark/ndn.lua
@@ -248,6 +248,10 @@
table.insert(ndn.fields, value.field)
end
+ndn.fields.bin = ProtoField.bytes("ndn.bin", "Binary")
+ndn.fields.len = ProtoField.uint32("ndn.len", "Packet Length")
+ndn.fields.type = ProtoField.string("ndn.type", "Packet Type")
+
-----------------------------------------------------
-----------------------------------------------------
@@ -504,6 +508,12 @@
break
end
end
+
+ -- These fields can be used to get NDN-packet level information using tshark,
+ -- for example when using the dissector only for reassembling NDN packets from TCP
+ block.tree:add(ndn.fields.bin, tvb(0, tvb:len())):set_hidden()
+ block.tree:add(ndn.fields.len, tvb:len()):set_hidden()
+ block.tree:add(ndn.fields.type, pktType):set_hidden()
end -- while(block.size <= nBytesLeft)
pInfo.cols.protocol = tostring(pInfo.cols.protocol) .. " (" .. ndn.name .. ")"