Ethereal uses the libpcap filter language to capture and filter Ethereal. it is explained on the man page of tcpdump, but it is hard to understand, therefore, I will give some further explanations here. Prompt! Some capture filtering examples can be obtained from the following addresses: http://wiki.ethereal.com/capturefilters.a filter expression is used to filter when captured.
Ethereal uses the libpcap filter language for capture and filtering. TcpdumpBut it is difficult to understand, so I will give some further explanations here.
Prompt! Some capture filtering examples can be obtained from the following addresses: http://wiki.ethereal.com/capturefilters.a filter expression is formed by a few simple expressions connected by and/or and not
[Not] simple expression [and | or [not] simple expression...]
For Example, see Example 4.1, "one capture filter: telnet from one host to another ".
Tcp port 23 and host 10.0.0.5
In this example, telnet data packets entering and exiting the host 10.0.0.5 are captured, and two simple expressions and connectors are displayed. In another example, Example4.2, "capture all telnet traffic except 10.0.0.5 hosts"
Tcp port 23 and not host 10.0.0.5
A simple expression is usually one of the following:
9 [src | dst] host
This allows filtering based on the host IP address or name. you can use src | dst to specify the source or destination. If omitted, both the source and target are selected.
9 ether [src | dst] host
This expression allows filtering based on the Ethernet address. It can include src | dst to indicate whether the source or the target is selected. if it is omitted, the source or the target is selected.
9 gateway host
This expression allows you to filter packets using the host as the gateway. That is, the source or destination IP address of Ethernet is the host, but the source or destination IP address is not the host.
9 [src | dst] net [{Mask } | {Len }]
This expression allows filtering by CIDR block number. You can select src | dst to specify the source or target. If this parameter is omitted, the source or destination is selected. In addition, you can specify the length of the network mask or CIDR prefix.
9 [tcp | udp] [src | dst] port
Allow filtering by TCP and UDP ports. You can select src | dst and tcp | udp to specify the content you are interested in. Keyword tcp | udp must appear before src | dst.
9 less | greater
Filter by package length
9 ip | ether proto
Allows filtering based on specified protocols at the link layer or network layer.
9 ether | ip broadcast | multicast
Allow broadcast or multicast filtering by link layer or network layer
9 Relop
A complex filter expression, such as the byte or byte range of a package, can be created. For more information, see the man page http://www.tcpdump.org/tcpdump_man.html for tcpdump.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service