ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Custom Columns in Packet List Pane

From: Stephen Fisher <stephentfisher@xxxxxxxxx>
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