ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Patch] Add "Copy as Filter" menu item

From: Sake Blok <sake@xxxxxxxxxx>
Date: Sat, 3 Mar 2007 19:44:32 +0100
On Fri, Mar 02, 2007 at 07:27:40PM -0800, Stephen Fisher wrote:
> On Thu, Mar 01, 2007 at 12:00:39AM +0100, Sake Blok wrote:
> 
> > This patch adds the menu-item "Copy as Filter" to the menu-bar, the 
> > context-menu of the packet-list-pane and the context-menu of the 
> > packet-detail-pane.
> 
> The feature sounds fine, but I keep wondering if there isn't a better 
> name for it.  How about Copy Filter?  Or could we put it under one of 
> the existing branches of the pop-up menu?

I named it "Copy as filter" to make it simular to the "Apply as Filter"
and the "Prepare as Filter" options. "Copy Filter" also sounds good
to me. But then, it is maybe best put after the current copy
options (I was doubting myself where to put it and decided it
felt more natural next to the other filter options, also because
the same code is used).

> > The motivation for this extra menu-item is that I often use "Prepare
> > as Filter", just to be able to copy the filter-expression from the
> > filter-strip (with the annoying side-effect that the original filter
> > in the strip gets lost).
> 
> What do you do with the filters that you prepare and copy?

What I do quite often is to have multiple files open of the 
same traffic at a different location (before and after a loadbalancer
or at the client and at the server side). Since port numbers are often 
translated, session matching can become difficult. I usually use
the tcp.seq or the ip.id to match packets across files. Therefor
the copy-function comes in very handy to be able to search or select
a frame in the other trace matching the one selected in the first 
trace :)

For me, to have it available only in the packet-detail pane is
enough (that was my first pacth). But I realised other people might
also want it in the packet-list or the menu-bar and so I added
those places too.

I hope this clears up the background of this patch. If not, feel 
free to ask me to clarify it some more :)

Cheers,


Sake