Parcourir la source

[4231] Added doc

Francis Dupont il y a 9 ans
Parent
commit
2cc2e7e0eb
1 fichiers modifiés avec 19 ajouts et 1 suppressions
  1. 19 1
      doc/guide/classify.xml

+ 19 - 1
doc/guide/classify.xml

@@ -164,6 +164,7 @@
 <row><entry>Option Text</entry><entry>option[code].text</entry><entry>The value of the option with code "code" from the packet as text</entry></row>
 <row><entry>Option Text</entry><entry>option[code].text</entry><entry>The value of the option with code "code" from the packet as text</entry></row>
 -->
 -->
 <row><entry>Option Hex</entry><entry>option[code].hex</entry><entry>The value of the option with code "code" from the packet as hex</entry></row>
 <row><entry>Option Hex</entry><entry>option[code].hex</entry><entry>The value of the option with code "code" from the packet as hex</entry></row>
+<row><entry>Option Exist</entry><entry>option[code].exist</entry><entry>If the option with code "code" is present in the packet "true" else "false"</entry></row>
           </tbody>
           </tbody>
           </tgroup>
           </tgroup>
         </table>
         </table>
@@ -185,6 +186,11 @@
       </para>
       </para>
 
 
       <para>
       <para>
+      "option[code].exist" checks if an option with the given code is present
+      in the incoming packet. It can be used with empty options.
+      </para>
+
+      <para>
         <table frame="all" id="classification-expressions-list">
         <table frame="all" id="classification-expressions-list">
           <title>List of Classification Expressions</title>
           <title>List of Classification Expressions</title>
           <tgroup cols='3'>
           <tgroup cols='3'>
@@ -200,6 +206,9 @@
           </thead>
           </thead>
           <tbody>
           <tbody>
 <row><entry>Equal</entry> <entry>'foo' == 'bar'</entry><entry>Compare the two values and return "true" or "false"</entry></row>
 <row><entry>Equal</entry> <entry>'foo' == 'bar'</entry><entry>Compare the two values and return "true" or "false"</entry></row>
+<row><entry>Not</entry> <entry>not ('foo' == 'bar')</entry><entry>Logical negation</entry></row>
+<row><entry>And</entry> <entry>('foo' == 'bar') and ('bar' == 'foo')</entry><entry>Logical and</entry></row>
+<row><entry>Or</entry> <entry>('foo' == 'bar') or ('bar' == 'foo')</entry><entry>Logical or</entry></row>
 <row><entry>Substring</entry><entry>substring('foobar',0,3)</entry><entry>Return the requested substring</entry></row>
 <row><entry>Substring</entry><entry>substring('foobar',0,3)</entry><entry>Return the requested substring</entry></row>
           </tbody>
           </tbody>
           </tgroup>
           </tgroup>
@@ -207,6 +216,15 @@
       </para>
       </para>
 
 
       <section>
       <section>
+        <title>Logical operators</title>
+        The Not, And and Or logical operators are the common operators. Not
+        has the highest precedence, Or the lowest. And and Or are (left)
+        associative, parentheses around a logical expression can be used
+        to enforce a specific grouping, for instance in "A and (B or C)"
+        ("A and B or C" means "(A and B) or C").
+      </section>
+
+      <section>
         <title>Substring</title>
         <title>Substring</title>
         The substring operator "substring(value, start, length)" accepts both positive and
         The substring operator "substring(value, start, length)" accepts both positive and
         negative values for the starting position and the length.  For "start", a value of
         negative values for the starting position and the length.  For "start", a value of
@@ -362,7 +380,7 @@
       </para>
       </para>
 
 
       <para>
       <para>
-     	The following example shows restricting access to a DHCPv6 subnet.  This
+        The following example shows restricting access to a DHCPv6 subnet.  This
         configuration will restrict use of the addresses 2001:db8:1::1 to
         configuration will restrict use of the addresses 2001:db8:1::1 to
         2001:db8:1::FFFF to members of the "Client_enterprise" class.
         2001:db8:1::FFFF to members of the "Client_enterprise" class.