问题
I am programming a LUA Dissector for Wireshark and have read about a VoidString object which could be passed by while creating a ProtoField object. See https://wiki.wireshark.org/LuaAPI/Proto#ProtoField for more information. I would like to no more about this object and what's the purpose of using it. If I am clicking on the link ''VoidString'' an empty page is getting displayed unfortunately because the documentation for this object seems to be missed. I have googled it but found nothing. Any Ideas?
Thanks in Advance!
回答1:
I have learned from the examples provided by Wireshark that voidString can be passed an table. This table maps the values that you expect with what the value means.
local packet_type = {
[0] = "Data",
[1] = "heartBeat",
[2] = "Keep Alive",
}
local pf_packet_type = ProtoField.uint16("my_discector.packet_type", "Packet Type", base.DEC, packet_type, nil, "This describes a packet type")
This packet will show the string along with the actual value it got instead of just the value. Hope this helps.
来源:https://stackoverflow.com/questions/51261175/what-is-a-voidstring-object