]> The Tcpdump Group git mirrors - libpcap/commitdiff
Add some BPF expressiones for to explore bpf_optimize(). 319/head
authorsolofox <[email protected]>
Tue, 3 Sep 2013 13:03:04 +0000 (21:03 +0800)
committersolofox <[email protected]>
Tue, 3 Sep 2013 13:03:04 +0000 (21:03 +0800)
tests/BPF/1.txt [new file with mode: 0644]
tests/BPF/2.txt [new file with mode: 0644]
tests/BPF/3.txt [new file with mode: 0644]
tests/BPF/4.txt [new file with mode: 0644]
tests/BPF/5.txt [new file with mode: 0644]
tests/BPF/6.txt [new file with mode: 0644]
tests/BPF/7.txt [new file with mode: 0644]

diff --git a/tests/BPF/1.txt b/tests/BPF/1.txt
new file mode 100644 (file)
index 0000000..6608695
--- /dev/null
@@ -0,0 +1,2 @@
+# common block merging, same block elimination, result propogation
+host 192.168.1.1
diff --git a/tests/BPF/2.txt b/tests/BPF/2.txt
new file mode 100644 (file)
index 0000000..e9bc116
--- /dev/null
@@ -0,0 +1,2 @@
+# common block merging
+port 80
diff --git a/tests/BPF/3.txt b/tests/BPF/3.txt
new file mode 100644 (file)
index 0000000..6c08d3d
--- /dev/null
@@ -0,0 +1 @@
+tcp[tcpflags]&tcp-syn != 0 or tcp[tcpflags]&tcp-fin != 0 or tcp[tcpflags]&tcp-rst != 0
diff --git a/tests/BPF/4.txt b/tests/BPF/4.txt
new file mode 100644 (file)
index 0000000..f705d8f
--- /dev/null
@@ -0,0 +1,2 @@
+# or pullup
+ether[12:2] = 0x800 or ether[12:2] = 0x8100 or ether[0] & 0x80 != 0 or ether[12:2] = 0x9100 
diff --git a/tests/BPF/5.txt b/tests/BPF/5.txt
new file mode 100644 (file)
index 0000000..23fc0ca
--- /dev/null
@@ -0,0 +1 @@
+vlan 186 and ip
diff --git a/tests/BPF/6.txt b/tests/BPF/6.txt
new file mode 100644 (file)
index 0000000..694c185
--- /dev/null
@@ -0,0 +1 @@
+ip and ((icmp and dst host 1.1.1.1 and not host 2.2.2.2) or (host 1.1.1.1 and src host 3.3.3.3))
diff --git a/tests/BPF/7.txt b/tests/BPF/7.txt
new file mode 100644 (file)
index 0000000..33978a4
--- /dev/null
@@ -0,0 +1 @@
+not vlan and tcp port 80