]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[trac4483] Tidy up some typos and spacing
authorShawn Routhier <sar@isc.org>
Mon, 22 Aug 2016 04:45:21 +0000 (21:45 -0700)
committerShawn Routhier <sar@isc.org>
Mon, 22 Aug 2016 04:45:21 +0000 (21:45 -0700)
doc/examples/kea4/classify.json
doc/examples/kea6/classify.json
doc/guide/classify.xml
src/lib/eval/eval_context.h
src/lib/eval/tests/evaluate_unittest.cc
src/lib/eval/tests/token_unittest.cc
src/lib/eval/token.h

index 88ab8bed0d4a313288b79c5acda690ead7c128f2..760f584fd55197a10742ceff1f05073e1fc849a4 100644 (file)
 # One packet can belong to zero or more classes.
   "client-classes": [
 
-# The first class attempts to match the whole hardware address to specific
-# value. All incoming packets with that MAC address will get special
+# The first class attempts to match the whole hardware address to specific
+# value. All incoming packets with that MAC address will get special
 # value of the option. If there are many hosts that require special
 # treatment, it is much better to use host reservations. However, doing
 # tricks with MAC addresses may prove useful in some cases, e.g.
-# by matching OUI to known value we can detect certain vendors.
+# by matching OUI to known values we can detect certain vendors.
   {
       "name": "special_snowflake",
       "test": "pkt4.mac == 0x010203040506",
@@ -41,7 +41,7 @@
       "test": "pkt4.msgtype == 1"
   },
 
-# Clients are supposed to set transaction-id field to a random value.
+# Clients are supposed to set the transaction-id field to a random value.
 # Clients that send it with 0 are most likely broken. Let's mark them
 # as such.
   {
 
 # The following list defines subnets. For some subnets we defined
 # a class that is allowed in that subnet. If not specified,
-# everyone is allowed. When it is specified, only packets belonging
-# to that class are allowed for a given subnet.  
+# everyone is allowed. When a class is specified, only packets belonging
+# to that class are allowed for that subnet.
   "subnet4": [
-      {
+    {
 # This one is for VoIP devices only.          
-          "pools": [ { "pool":  "192.0.2.1 - 192.0.2.200" } ],
-          "subnet": "192.0.2.0/24",
-          "client-class": "VoIP",
-          "interface": "ethX"
-      },
+        "pools": [ { "pool":  "192.0.2.1 - 192.0.2.200" } ],
+        "subnet": "192.0.2.0/24",
+        "client-class": "VoIP",
+        "interface": "ethX"
+    },
 # This one doesn't have any client-class specified, so everyone
 # is allowed in. The normal subnet selection rules still apply,
 # though.      
     {
-          "pools": [ { "pool":  "192.0.3.1 - 192.0.3.200" } ],
-          "subnet": "192.0.3.0/24",
-          "interface": "ethX"
+        "pools": [ { "pool":  "192.0.3.1 - 192.0.3.200" } ],
+        "subnet": "192.0.3.0/24",
+        "interface": "ethX"
     }
   ]
 },
index 55995d450c2a0dc5991a8e075714903065863740..eac05896c7e7285df626480a503df43ddc7aa2d7 100644 (file)
 # Let's classify all incoming RENEW (message type 5) to a separate
 # class.
   {
-      "name": "discovers",
+      "name": "renews",
       "test": "pkt6.msgtype == 5"
   },
 
 # Let's pick cable modems. In this simple example we'll assume the device
-# is a cable modem if it sends vendor option with enterprise-id equal
+# is a cable modem if it sends vendor option with enterprise-id equal
 # to 4491.    
   {
       "name": "cable-modems",
index 0216a9918fed1bd4da92c3d9b0b37c1ff53289a5..7876aed05911cb305cace97b59931f219f69b6fc 100644 (file)
               <entry>Integer literal</entry>
               <entry>123</entry>
               <entry>'123'</entry>
-              <entry>A 32 bits unsigned integer value</entry>
+              <entry>A 32 bit unsigned integer value</entry>
             </row>
             <row></row>
             <row>
               <entry>pkt.len</entry>
               <entry>513</entry>
               <entry>The length of a DHCP packet (UDP header field), expressed
-              as 32 bits unsigned integer.</entry>
+              as a 32 bit unsigned integer.</entry>
             </row>
             <row>
               <entry>Hardware address in DHCPv4 packet</entry>
               <entry>pkt4.msgtype</entry>
               <entry>1</entry>
               <entry>The value of the message type field in the DHCPv4
-              packet (expressed as 32 bits unsigned integer).</entry>
+              packet (expressed as a 32 bit unsigned integer).</entry>
             </row>
             <row>
               <entry>Transaction ID (xid) in DHCPv4 packet</entry>
               <entry>pkt4.transid</entry>
               <entry>12345</entry>
               <entry>The value of the transaction id in the DHCPv4
-              packet (expressed as 32 bits unsigned integer).</entry>
+              packet (expressed as a 32 bit unsigned integer).</entry>
             </row>
             <row>
               <entry>Message Type in DHCPv6 packet</entry>
               <entry>pkt6.msgtype</entry>
               <entry>1</entry>
               <entry>The value of the message type field in the DHCPv6
-              packet (expressed as 32 bits unsigned integer).</entry>
+              packet (expressed as a 32 bit unsigned integer).</entry>
             </row>
             <row>
               <entry>Transaction ID in DHCPv6 packet</entry>
               <entry>pkt6.transid</entry>
               <entry>12345</entry>
               <entry>The value of the transaction id in the DHCPv6
-              packet (expressed as 32 bits unsigned integer).</entry>
+              packet (expressed as a 32 bit unsigned integer).</entry>
             </row>
 
             <row>
       </para>
 
       <para>
-      Integers in the expression are converted to 32 bit unsigned integers and
+      Integers in an expression are converted to 32 bit unsigned integers and
       are represented as four byte strings. For example 123 is represented as
-      0x0000007b. All expressions that return numeric values use 32 bits
+      0x0000007b. All expressions that return numeric values use 32 bit
       unsigned integers, even if the field in the packet is smaller.  In general
       it is easier to use decimal notation to represent integers, but it is also
       possible to use hex notation. When using hex notation to represent an
index e42e9cb564b87f55cbc240446c9aee11c2961f61..385f1a7aeb36443d6c009cb948671e4dc0be7551 100644 (file)
@@ -133,12 +133,12 @@ public:
 
     /// @brief Converts integer to string representation
     ///
-    /// The integer is coded as 4 bytes long string in network order, e.g.
+    /// The integer is coded as a 4 byte long string in network order, e.g.
     /// 6 is represented as 00000006. For reverse conversion, see
     /// @ref convertUint32.
     ///
     /// @param integer value to be converted
-    /// @return 4 bytes long string that encodes the value.
+    /// @return 4 byte long string that encodes the value.
     static std::string fromUint32(const uint32_t integer);
 
     /// @brief Returns the universe (v4 or v6)
index befbfd6a17ff90bf4154ee8c18fc1f9e8cd60f26..d27fd652b6abf9b90303a234aa3cc4528d74f91c 100644 (file)
@@ -286,10 +286,10 @@ TEST_F(EvaluateTest, complex) {
 /// @brief Generic class for parsing expressions and evaluating them.
 ///
 /// The main purpose of this class is to provide a generic interface to the
-/// eval library, so everything (expression parsing and then its evaluation for
+/// eval library, so everything (expression parsing and then evaluation for
 /// given packets) can be done in one simple call.
 ///
-/// Those tests may be somewhat redundant to other more specialized tests, but
+/// These tests may be somewhat redundant to other more specialized tests, but
 /// the idea here is to mass produce tests that are trivial to write.
 class ExpressionsTest : public EvaluateTest {
 public:
@@ -302,7 +302,7 @@ public:
     /// Note that contrary to the usual interface, this method calls
     /// @ref isc::dhcp::evaluateString, rather than @ref isc::dhcp::evaluate.
     /// The main benefit of this is the ability to test partial expressions that
-    /// not necessarily evaluate to bool.
+    /// do not necessarily evaluate to bool.
     ///
     /// @param u universe (V4 or V6)
     /// @param expr expression to be parsed
@@ -380,7 +380,7 @@ TEST_F(ExpressionsTest, expressionsPkt4Hlen) {
     testExpression(Option::V4, "pkt4.hlen == 0", true);
     testExpression(Option::V4, "pkt4.htype == 1", true);
 
-    // Ok, let's initialized the hardware address to something plausible.
+    // Ok, let's initialize the hardware address to something plausible.
     const size_t hwaddr_len = 6;
     const uint16_t expected_htype = 123;
     std::vector<uint8_t> hw(hwaddr_len,0);
index 6c09f31270e140b66390806a0b1a4a318c48702d..690392d845141a218bdebe56939e84087f17b39e 100644 (file)
@@ -194,10 +194,10 @@ public:
         }
     }
 
-    /// @brief Aux. function that stores integer values as 4 bytes string.
+    /// @brief Aux. function that stores integer values as 4 byte string.
     ///
     /// @param value integer value to be stored
-    /// @return 4 bytes long string with encoded value.
+    /// @return 4 byte long string with encoded value.
     string encode(uint32_t value) {
         return EvalContext::fromUint32(value);
     }
@@ -483,10 +483,10 @@ public:
         evaluate(u, expected);
     }
 
-    /// @brief Tests if TokenInteger evaluates to proper value
+    /// @brief Tests if TokenInteger evaluates to the proper value
     ///
-    /// @param value integer value passed to constructor
     /// @param expected expected string representation on stack after evaluation
+    /// @param value integer value passed to constructor
     void testInteger(std::string expected, uint32_t value) {
 
         clearStack();
index 0fb8c4caafe709477f1d937b34d1f9468c957f52..37af93c4688c3b57981a071fc1a0ff20839c1749 100644 (file)
@@ -155,11 +155,11 @@ protected:
     std::string value_; ///< Constant value
 };
 
-/// @brief Token representing an unsigned 32 bits integer
+/// @brief Token representing an unsigned 32 bit integer
 ///
-/// For performance reasons, the constant integer value is converted to string
-/// just once (in constructor). Afterwards, this effectively works as constant
-/// 4 bytes long string. Hence this class is derived from TokenString and
+/// For performance reasons, the constant integer value is converted to string
+/// just once (in the constructor). Afterwards, this effectively works as a constant
+/// 4 byte long string. Hence this class is derived from TokenString and
 /// does not even need its own evaluate() method.
 class TokenInteger : public TokenString {
 public: