This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Dumpcap syntax error

0

dumpcap -i 1 -f "ip.addr == 192.168.11.61" -b files:500 -b filesize:30000 -w textcap.pcap, error is string is not a valid capture filter. What is wrong with the string?

asked 22 Nov '10, 13:16

qs_tech_support's gravatar image

qs_tech_support
1111
accept rate: 0%


One Answer:

3

What's wrong is that it's a display filter, not a capture filter; capture filters are implemented by libpcap/WinPcap, and have a different syntax from display filters. (Display filters require a full-blown Wireshark packet dissection; dumpcap does not include Wireshark dissectors, because it might have to run with special privileges, and the Wireshark dissection code is a lot of code to run with privileges.)

The equivalent capture filter would be "host 192.168.11.61"; it would also work as a capture filter in Wireshark, TShark, and tcpdump.

answered 22 Nov '10, 13:40

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%