Ask Your Question

Revision history [back]

Coloring Rules based on Preference

Hi, is there a way to use preferences that a lua disector created to modify the coloring rules.

Example: Set the port number in a preferences because the port number can change and doing this will not require to change the lua script.

myprotocol = Proto("myproto", "MyProtocol")

local pref = myprotocol.prefs pref.port = Pref.uint ("Port", 3000, "Port for this protocal")

so in the coloring rules I just have to the folowing:

(tcp.dstport == myproto.port) || (tcp.srcport == myproto.port)

so only the preferences needs to change and not the coloring rules or the lua script when the port number changes.

Thanks