Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I adjusted the dissectors and thus got rid of the "_ws.lua.text"s. My dissector used to look like this:

my_proto=Proto("my_proto", "My custom Protocol", "My custom Protocol")
*something something*
local my_proto_packet = tree:add(my_proto, buffer(),"My custom protocol");
value = buffer(curPos,4):uint();
local valueNode = my_proto_packet:add_le(buffer(curPos, 4), "value = " .. value)

The "value = 3.8"-String was displayed in Wireshark.

I added a ProtoField-variable and added it into the proto.fields-array. And then changed the valueNode definition so it now looks like this:

my_proto=Proto("my_proto", "My custom Protocol", "My custom Protocol")
local field_myproto_intfield = ProtoField.uint32("myproto.intfield", "Integer", base.DEC)
my_proto.fields = { field_myproto_intfield }
local my_proto_packet = tree:add(my_proto, buffer(),"My custom protocol");
*something something*

valueNode:add(field_myproto_intfield, buffer(curPos, 4))