tcpdump mailing list archives

Re: changing filter on running capture


From: Stephan Knabe <sknabe () ifh de>
Date: Fri, 21 Nov 2003 11:28:06 +0100 (MET)

On Fri, 21 Nov 2003, Guy Harris wrote:

On Fri, Nov 21, 2003 at 09:54:59AM +0100, Stephan Knabe wrote:
From another thread, I want to change the filter, replacing the one used
by the capture.

I'm not certain that you can do that safely; libpcap's code isn't
thread-safe, and I think that, when somebody last asked about this, I
found some places where you could have a problem if you change a capture
filter in one thread while you're capturing in another.

That discussion is probably somewhere in the tcpdump-workers archives.


Thanks for the quick answer, the question about this can be found here:
http://www.tcpdump.org/lists/workers/2003/08/msg00244.html

unfortunatly there wass now reply (or maybe I can't find it). So I think
I'll go the safe way and restart capturing.

Another interesting aspect would be, what happens when I change the filter
in the callback-function (which runs in the same thread). Will the old one
be replaced for the next packets?

regards

Stephan Knabe



-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: