Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Edition of the information column using lua...

From: jean-francois <jeffcopin@xxxxxxxx>
Date: Sat, 25 Aug 2007 00:26:24 +0200
Hello,

I am using LUA to make a dissector. I would like to modify informations in the info column of the wirshark display but the following code does not seem to work. I have not found an example for this. I would be grateful to anyone for some help.
Thanks in advance.

---------------------------------------------------------------------------------------------------------------------
#include "ionet_maintenance.h"

trivial_proto =  Proto("MyProtocole","Protocole","My Protocole")

-- create a function to dissect it
function trivial_proto.dissector(buffer, pinfo, tree)
    pinfo.cols.protocol = "My Protocole"
    local subtree = tree:add(trivial_proto,"My Protocole")
    subtree:add(buffer(0, 4), "1st word: " .. buffer(0,4):uint())
    subtree:add(buffer(4, 4),"2nd word: " .. buffer(4, 4):uint())   
    pinfo.cols.cinfo = "My informations"
end

udp_table  = DissectorTable.get("udp.port")
udp_table:add( 15010, trivial_proto)

---------------------------------------------------------------------------------------------------------------------