Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are two types of filters in Wireshark - capture filters and display filters.

Capture filters are implemented by the software that Wireshark uses to capture network traffic, namely the libpcap/WinPcap/Npcap library and the kernel-mode code they run on top of. This is the syntax that those libraries implement for filters; this describes the filter of current versions of libpcap - older versions may not support all those features, and WinPcap is built on an older version of libpcap that doesn't support all those features.

Those filters can be specified as a parameter when capturing network traffic in Wireshark.

Display filters are implemented by Wireshark; they can perform complex tests on any "named field" in any protocol supported by Wireshark. This is the syntax that Wireshark implements for filters; it is not the same syntax that libpcap/WinPcap/Npcap implements.

Those filters can be specified to control which of the captured packets that Wireshark has read in will be displayed.

The libpcap/WInPcap/Npcap syntax is older than Wireshark, even when Wireshark was still called Ethereal; it doesn't support the notion of arbitrary named fields, so it wasn't a syntax that could be used for Wireshark's filtering.

Whether host 172.16.10.202, which is a capture filter, or ip.addr == 172.16.10.202, which is a display filter, is accepted as a filter depends only on where you specify the filter. Capture filters can be specified in the "Enter a capture filter" box underneath "Capture" on the Wireshark main screen and in the "Capture filter for selected interfaces" box in the "Input" tab of the "Capture Options" dialog. Display filters can be specified in the "Apply a display filter" box at the top of the main window, below the toolbar.