From 56ab058543bf63de1cc9794b0ee04f16025185cf Mon Sep 17 00:00:00 2001
From: Dale Glass <dale@daleglass.net>
Date: Thu, 18 Jul 2024 20:00:22 +0200
Subject: [PATCH] Expand documentation and add packet type to the info column

---
 tools/dissectors/1-hfudt.lua |  3 +++
 tools/dissectors/README.md   | 23 +++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/tools/dissectors/1-hfudt.lua b/tools/dissectors/1-hfudt.lua
index 2be889c8c9..0a7937e980 100644
--- a/tools/dissectors/1-hfudt.lua
+++ b/tools/dissectors/1-hfudt.lua
@@ -259,6 +259,7 @@ function p_hfudt.dissector(buf, pinfo, tree)
       type:append_text(" (".. control_types[shifted_type][1] .. ")")
 
       subtree:add(f_control_type_text, control_types[shifted_type][1])
+      pinfo.cols.info:append(" [" .. control_types[shifted_type][1] .. "]")
     end
 
     if shifted_type == 0 then
@@ -337,10 +338,12 @@ function p_hfudt.dissector(buf, pinfo, tree)
     local packet_type = buf(payload_offset, 1):le_uint()
     local ptype = subtree:add_le(f_type, buf(payload_offset, 1))
     local packet_type_text = packet_types[packet_type]
+
     if packet_type_text ~= nil then
       subtree:add(f_type_text, packet_type_text)
       -- if we know this packet type then add the name
       ptype:append_text(" (".. packet_type_text .. ")")
+      pinfo.cols.info:append(" [" .. packet_type_text .. "]")
     end
 
     -- read the version
diff --git a/tools/dissectors/README.md b/tools/dissectors/README.md
index b97e9e3b7a..3b391f60c0 100644
--- a/tools/dissectors/README.md
+++ b/tools/dissectors/README.md
@@ -48,3 +48,26 @@ After a capture any detected Overte Packets should be easily identifiable by one
 `[Expert Info (Error/Undecoded): Lua Error: /home/dale/.local/lib/wireshark/plugins/1-hfudt.lua:207: attempt to index global 'bit32' (a nil value)]`
 
 See the installation requirements, you need to install the bit32 Lua module for the right Lua version.
+
+## Development hints
+
+
+* Symlink files from the development tree to  `$HOME/.local/lib/wireshark/plugins`, to have Wireshark work on the latest dissector code.
+* Capture packets for later analysis in a PCAPNG file.
+* Only save needed packets in the dump
+
+Decode on the commandline with:
+
+    tshark -r packets.pcapng.gz -V
+
+Decode only the first packet:
+
+    tshark -r packets.pcapng.gz -V -c 1
+
+### Useful tshark arguments
+
+* `-x` hex dump
+* `-c N` Only decode first N packets
+* `-O hfudt,hf-domain,hf-entity,hf-avatar,hf-audio` Only dump Overte protocol data, skip dumping UDP/etc parts.
+* `-V` decode protocols
+*
\ No newline at end of file