]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Renamed CONFIGURATION_ATTRIBUTE_LENGTH to streamline it with other ATTRIBUTE rules
authorMartin Willi <martin@revosec.ch>
Fri, 20 Jan 2012 14:00:06 +0000 (15:00 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:38 +0000 (17:31 +0100)
src/libcharon/encoding/generator.c
src/libcharon/encoding/parser.c
src/libcharon/encoding/payloads/configuration_attribute.c
src/libcharon/encoding/payloads/encodings.c
src/libcharon/encoding/payloads/encodings.h

index 823a4ec1034deb855460414ee10ac5c17a4b8221..bf44801932720711869e26e6972a7a41e72b25da 100644 (file)
@@ -214,7 +214,7 @@ static void generate_u_int_type(private_generator_t *this,
                        break;
                case U_INT_16:
                case PAYLOAD_LENGTH:
-               case CONFIGURATION_ATTRIBUTE_LENGTH:
+               case ATTRIBUTE_LENGTH:
                        number_of_bits = 16;
                        break;
                case U_INT_32:
@@ -329,7 +329,7 @@ static void generate_u_int_type(private_generator_t *this,
                }
                case U_INT_16:
                case PAYLOAD_LENGTH:
-               case CONFIGURATION_ATTRIBUTE_LENGTH:
+               case ATTRIBUTE_LENGTH:
                {
                        u_int16_t val = htons(*((u_int16_t*)(this->data_struct + offset)));
                        if (this->debug)
@@ -481,7 +481,7 @@ METHOD(generator_t, generate_payload, void,
                        case SPI_SIZE:
                        case TS_TYPE:
                        case ATTRIBUTE_TYPE:
-                       case CONFIGURATION_ATTRIBUTE_LENGTH:
+                       case ATTRIBUTE_LENGTH:
                                generate_u_int_type(this, rules[i].type, rules[i].offset);
                                break;
                        case RESERVED_BIT:
index 8f1d667fc6ee5e42343f1012398609b39e0e34f6..a599de60fe48b45b443ef761c5901428ba8689d6 100644 (file)
@@ -546,7 +546,7 @@ METHOD(parser_t, parse_payload, status_t,
                                }
                                break;
                        }
-                       case CONFIGURATION_ATTRIBUTE_LENGTH:
+                       case ATTRIBUTE_LENGTH:
                        {
                                if (!parse_uint16(this, rule_number, output + rule->offset))
                                {
index 4e3df9055dd12bd4e69cc777441098458cb285fb..482eca882e77cf3751299425cf41c7cad4977333 100644 (file)
@@ -71,13 +71,13 @@ struct private_configuration_attribute_t {
  */
 static encoding_rule_t encodings_v2[] = {
        /* 1 reserved bit */
-       { RESERVED_BIT,                                         offsetof(private_configuration_attribute_t, reserved)           },
+       { RESERVED_BIT,                                 offsetof(private_configuration_attribute_t, reserved)           },
        /* type of the attribute as 15 bit unsigned integer */
-       { ATTRIBUTE_TYPE,                                       offsetof(private_configuration_attribute_t, attr_type)          },
+       { ATTRIBUTE_TYPE,                               offsetof(private_configuration_attribute_t, attr_type)          },
        /* Length of attribute value */
-       { CONFIGURATION_ATTRIBUTE_LENGTH,       offsetof(private_configuration_attribute_t, length_or_value)},
+       { ATTRIBUTE_LENGTH,                             offsetof(private_configuration_attribute_t, length_or_value)},
        /* Value of attribute if attribute format flag is zero */
-       { ATTRIBUTE_VALUE,                      offsetof(private_configuration_attribute_t, value)                      },
+       { ATTRIBUTE_VALUE,                              offsetof(private_configuration_attribute_t, value)                      },
 };
 
 /*
index 7515c947fc1966a8e25f0403a1336b1e2af2d606..62de811205381211f7717a451b7446318530ca15 100644 (file)
@@ -32,7 +32,7 @@ ENUM(encoding_type_names, U_INT_4, ENCRYPTED_DATA,
        "ATTRIBUTE_FORMAT",
        "ATTRIBUTE_TYPE",
        "ATTRIBUTE_LENGTH_OR_VALUE",
-       "CONFIGURATION_ATTRIBUTE_LENGTH",
+       "ATTRIBUTE_LENGTH",
        "ATTRIBUTE_VALUE",
        "TS_TYPE",
        "ADDRESS",
index 124814ff552237abd67e183a5af701a5746dba44..54830bc8c2f028c8b87fdf3e5c31d22490f2a29f 100644 (file)
@@ -241,7 +241,7 @@ enum encoding_type_t {
         * The value is written to the associated data struct.
         * The current read pointer is moved 16 bit forward afterwards.
         */
-       CONFIGURATION_ATTRIBUTE_LENGTH,
+       ATTRIBUTE_LENGTH,
 
        /**
         * Depending on the field of type ATTRIBUTE_FORMAT