Wireshark mailing list archives
Re: Can a Lua dissector access Wireshark preferences?
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Thu, 30 Aug 2018 13:39:11 -0400
For the preference side of it see: https://wiki.wireshark.org/LuaAPI/Pref On Thu, Aug 30, 2018 at 12:43 PM Maynard, Chris <Christopher.Maynard () igt com> wrote:
If you look at the documentation for ProtoField.new and friends[1], you
can see that there’s a “*mask*” argument. That specifies how many bits
applies to this field.
So for example, below there are 2 fields, field1 is the upper nibble of a
byte, field2 is the lower nibble of a byte:
local foo_field1 = ProtoField.uint8("foo.field1", "Field1", base.DEC, nil,
0xf0)
local foo_field2 = ProtoField.uint8("foo.field2", "Field2", base.DEC, nil,
0x0f)
- Chris
[1]:
https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Proto.html#lua_class_ProtoField
*From:* Wireshark-dev [mailto:wireshark-dev-bounces () wireshark org] *On
Behalf Of *David Aldrich
*Sent:* Thursday, August 30, 2018 11:51 AM
*To:* wireshark-dev () wireshark org
*Subject:* [Wireshark-dev] Can a Lua dissector access Wireshark
preferences?
Hi
For my lua dissector, I want to be able to specify the bit width of a data
field using a Wireshark Preference.
Is that possible? If so, where would I find some help on how to do it?
Best regards
David
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Can a Lua dissector access Wireshark preferences? David Aldrich (Aug 30)
- Re: Can a Lua dissector access Wireshark preferences? Maynard, Chris (Aug 30)
- Re: Can a Lua dissector access Wireshark preferences? Jeff Morriss (Aug 30)
- Re: Can a Lua dissector access Wireshark preferences? David Aldrich (Aug 31)
- Re: Can a Lua dissector access Wireshark preferences? Jeff Morriss (Aug 30)
- Re: Can a Lua dissector access Wireshark preferences? Maynard, Chris (Aug 30)
