tcpdump command and filter explainer
Paste a tcpdump command or a capture filter and read every option and every primitive in plain words: the hidden defaults made explicit, how and, or and not group, byte-offset tests decoded, and errors placed where libpcap would stop.
NetworkingKept in this browser · My desk
Parsed entirely in your browser: nothing is captured, run, resolved or sent.
To write a capture command for a platform with its own syntax, use a builder: BIG-IP tcpdump builder · FortiOS packet sniffer builder
The text you paste is parsed entirely in your browser: nothing is captured, run, resolved or sent. A command line is split into words as a POSIX shell would split it, then read option by option as the getopt_long of tcpdump 4.99.7 reads it. The filter is tokenized and parsed by our own code following libpcap's scanner and grammar, so defaults, the qualifier shorthand, precedence and the errors libpcap would report come out as libpcap produces them, for libpcap 1.10.7 and 1.11.0 alike, and where the two differ the explanation says which does what. Names are not looked up, so what a name resolves to, and what a link-layer type supports, are stated as unknown.
- tcpdump.org, Latest Releasestcpdump 4.99.7 and libpcap 1.10.7 stable, libpcap 1.11.0 testing; no support or end-of-life dates are published (read 2026-10-27)
- tcpdump(1) for tcpdump 4.99.7, tcpdump.orgEvery option, the quoting advice and the TCP flag bits (read 2026-10-27)
- pcap-filter(7) for libpcap 1.11.0, tcpdump.orgThe filter language: qualifiers and defaults, primitives, precedence, offsets, vlan and mpls, and what changed in which version (read 2026-10-27)
- libpcap scanner.l, grammar.y.in, gencode.c and optimize.c at tags libpcap-1.10.7 and libpcap-1.11.0Tokens, grouping and qualifier passing, and what each release's compiler refuses (read 2026-10-27)
- tcpdump.c at tag tcpdump-4.99.7Option letters, long options, argument parsing and bounds (read 2026-10-27)
- GNU Bison manual, How Precedence WorksWhy % and ^ group as they do (read 2026-10-27)