Wireshark-dev: Re: [Wireshark-dev] Custom Columns in Packet List Pane
From: Stephen Fisher <[email protected]>
Date: Tue, 19 Jun 2007 08:56:11 -0700
On Tue, Jun 19, 2007 at 08:45:47AM -0400, Purandhar Krishnamurthy wrote:

>   I want to add a new column in my Packet List Pane, in which I am 
> planning to display an integer value (say for example, Retransmission 
> Count) for each message/packet. The format of the column i selected 
> was "Number".
> 
>   As the format is "Number", I re-used the macro "COL_NUMBER" in the 
> dissector to display the integer value. In the packet list pane, a new 
> column was created but the values that are displayed are packet or 
> frame number (and not the one I wished to display).
> 
>   Can anyone please tell me, whether is it possible to re-use 
> COL_NUMBER (which was already used to display the packet-frame number) 
> to display an integer value?

No.  You need to create a new column type.

>   If it is possible, please advice me the changes that are to be made and
>   If it is not possible, please advice me what else can be done.
> 
> I tried to find it in Developer's Guide, but these information are not 
> provided in that.

Take a look at this commit for an example of two new columns that 
dissectors fill in:

http://anonsvn.wireshark.org/viewvc/viewvc.py?view=rev&revision=20118

Click on the text changed link to see what is added to each file to make 
it work.


Steve