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

Wireshark-users: Re: [Wireshark-users] src host capture filter not working

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 12 Jan 2010 20:31:37 -0800
On Jan 12, 2010, at 2:35 PM, Jeff Liegel wrote:

> Hi.  I desperately need to see packets coming from OR going to ip 207.35.208.194 using capture filter
> 
> Works fine with display filter only but this is a really busy network and I need to ultimately save the capture to a file thus need a capture filter. 

The Wireshark display filter code, for the filter "ip.dst == 207.35.208.194 or ip.src == 207.35.208.194", looks for IP addresses wherever they appear in the packet.

The libpcap/WinPcap capture filter code, for the filter "host 207.35.208.194", generates BPF code that looks for IP addresses under the assumption that there are no VLAN headers.  The packets not being seen have VLAN headers.

The filter

	host 207.35.208.194 or (vlan and host 207.35.208.194)

(you will need to quote that if you put it on the command line) sees all the packets in the file; it will check for IP addresses with no VLAN headers or with one level of VLAN header.