Wireshark-dev: [Wireshark-dev] LUA development changing column headers
From: "Rowswell, Brent" <brent.rowswell@xxxxxxxx>
Date: Thu, 12 Jun 2008 16:04:18 -0600
Title: LUA development changing column headers

Over the past few weeks I've been trying to make a LUA script to parse out my header information, open up the packet and display the necessary data in a various tree structure.  So far all of that has been done well enough, but I find that the packets that I have dissected come maybe once every 300 packets, which makes it pretty hard to compare packets.  What I've been trying to do is either edit the packet column data, such as where the ip source or destination is displayed into my own data, or add a new column of my own type so that I can sort the data, which will then put all of my packets next to each other.  I know that on the wiki of lua examples there's an outdated way of doing something similar, but it no longer works with the current 1.0.0 build of wireshark.  I was wondering if I could get some help in how the syntax should look, for instance if this would work:  using pinfo.cols to grab the packet's columns, and upon that use :_newindex("Msgtype", "NameofMsg") to put in a new column named Msgtype where this packets data in that column would be NameofMsg, thus the message would look like

pinfo.cols:_newindex("Msgtype","NameofMsg") 
If anyone can think of another way of doing this, either by adding a new column or changing the text of an existing one, I would be appreciative.

Brent Rowswell