Add a description for the bitwise_and (&) operator.
authorobiot <obiot@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 24 Mar 2004 00:38:34 +0000 (00:38 +0000)
committerobiot <obiot@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 24 Mar 2004 00:38:34 +0000 (00:38 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10471 f5534014-38df-0310-8fa8-9805f1628bb7

doc/ethereal-filter.pod.template

index 9ce2c00f68fc7188b402f50f3538599bc34bb7b7..fe455fd142d7e732d62f1a2f1095edd1880aa089 100644 (file)
@@ -238,6 +238,29 @@ You can create complex concatenations of slices using the comma operator:
 
        field[1,3-5,9:] == 01:03:04:05:09:0a:0b
 
+=head2 Bit field operations
+
+It is also possible to define tests with bit field operations. Currently the
+following bit field operation is supported:
+
+    bitwise_and, &     Bitwise AND
+
+The bitwise AND operation allows testing if one or more bits are set.
+Bitwise AND operates on integer protocol fields and slices.
+
+When testing for TCP SYN packets, once can write:
+
+    tcp.flags & 0x02
+
+Similarly, filtering for all WSP GET and extended GET methods is achieved with:
+
+    wsp.pdu_type & 0x40
+
+When using slices, the bit mask must be specified as byte string, and it must
+have the same number of bytes as the slice itself, as in:
+
+    ip[42:2] & 40:ff
+
 =head2 Logical expressions
 
 All the above tests can be combined together with logical expressions.