wireshark 有两种过滤器。
捕获过滤器----Capture---->Options---->Capture Filter。

BPF限定词(Berkeley Packet Filter)
例子: host、net、port、src、dst、ether、ip、tcp、udp、http、ftp。
操作符: && || !。
比如:dst host 200.0.0.1 && tcp port 80
port http但不能是http。
icmp[0]==8表示数据包偏移量为0的位置值为8。
icmp[0:2]==0x0301表示数据包偏移量为0再延续两个字节,值为0x0301。
icmp数据包格式:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| unused |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Internet Header + 64 bits of Original Data Datagram |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
详见:http://www.ietf.org/rfc/rfc792.txt
TCP Header Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgment Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data | |U|A|P|R|S|F| |
| Offset| Reserved |R|C|S|S|Y|I| Window |
| | |G|K|H|T|N|N| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
TCP Header Format
详见:http://www.ietf.org/rfc/rfc793.txt
只捕获tcp标志为是RST的数据包了?
tcp[13]&4==4,数据包位偏移13字节,那“&4”是什么意思了?因为RST在这第13字节代表数字4[*(128) *(64) urg(32) ack(16) psh(8) rst(4) syn(2) fin(0)]。
那syn+ack了?tcp[13]==18。
显示过滤器

点击expression后可指定详细的表达式。下面是些常用的:
ip.addr==192.168.1.1
frame.len<=128帧长度小于等于128字节。
ip.addr==1.1.1.1 || ip.addr==2.2.2.2
tcp.port==80或者http。填写好后点击apply就可以生效了。
具体的自己可以慢慢研究。