aboutsummaryrefslogtreecommitdiff
path: root/wireshark/txhdr.lua
diff options
context:
space:
mode:
Diffstat (limited to 'wireshark/txhdr.lua')
-rw-r--r--wireshark/txhdr.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/wireshark/txhdr.lua b/wireshark/txhdr.lua
index e901d7d..f70f983 100644
--- a/wireshark/txhdr.lua
+++ b/wireshark/txhdr.lua
@@ -11,10 +11,7 @@ p.fields.status = ProtoField.uint16("txhdr.status", "Status", base.DEC, {
[0x05] = "Failed",
}, 0x00ff)
p.fields.new = ProtoField.bool("txhdr.new", "New frame")
-p.fields.rate = ProtoField.uint8("txhdr.rate", "Transfer rate", base.HEX, {
- [0x0a] = "1 Mbit/s",
- [0x14] = "2 Mbit/s",
-})
+p.fields.rate = ProtoField.uint8("txhdr.rate", "Transfer rate", base.HEX)
p.fields.channel = ProtoField.uint8("txhdr.channel", "802.11 channel")
p.fields.length = ProtoField.uint16("txhdr.len", "Remaining message length")
p.fields.data = ProtoField.bytes("txhdr.data", "Remaining message")
@@ -33,7 +30,8 @@ function p.dissector(buffer, pinfo, tree)
subtree:add_le(p.fields.unknown, buffer(0x04, 1))
subtree:add_le(p.fields.unknown, buffer(0x05, 1))
subtree:add_le(p.fields.unknown, buffer(0x06, 2))
- subtree:add_le(p.fields.rate, buffer(0x08, 1))
+ local rate_field = subtree:add_le(p.fields.rate, buffer(0x08, 1))
+ rate_field:append_text(string.format(" (%1.1f Mbit/s)", buffer(0x08, 1):uint() / 10))
subtree:add_le(p.fields.channel, buffer(0x09, 1))
subtree:add_le(p.fields.length, buffer(0x0a, 2))
local length = buffer(0x0a, 2):le_uint()