]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add deeper nested attributes to test dictionary
authorNick Porter <nick@portercomputing.co.uk>
Wed, 3 Aug 2022 18:24:57 +0000 (19:24 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 3 Aug 2022 19:16:19 +0000 (20:16 +0100)
src/lib/util/dict_test.c
src/lib/util/dict_test.h

index 9a9c04903beeed0dc69d7f0877ae2aeea5be41c4..05fa379721bcbe46b684e73e93be275c7bd6a304 100644 (file)
@@ -73,6 +73,11 @@ fr_dict_attr_t const *fr_dict_attr_test_vendor_string;
 
 fr_dict_attr_t const *fr_dict_attr_test_group;
 
+fr_dict_attr_t const *fr_dict_attr_test_nested_top_tlv;
+fr_dict_attr_t const *fr_dict_attr_test_nested_child_tlv;
+fr_dict_attr_t const *fr_dict_attr_test_nested_leaf_string;
+fr_dict_attr_t const *fr_dict_attr_test_nested_leaf_int32;
+
 fr_dict_attr_t const *fr_dict_attr_test_enum;
 
 fr_dict_test_attr_t const fr_dict_test_attrs[] = {
@@ -131,6 +136,14 @@ fr_dict_test_attr_t const fr_dict_test_attrs[] = {
 
        { .attr = FR_TEST_ATTR_GROUP, .da = &fr_dict_attr_test_group, .name = "Test-Group", .type = FR_TYPE_GROUP },
 
+       /*
+        *      Deeper nesting
+        */
+       { .attr = FR_TEST_ATTR_NESTED_TOP_TLV, .da = &fr_dict_attr_test_nested_top_tlv, .name = "Test-Nested-Top-TLV", .type = FR_TYPE_TLV },
+       { .attr = FR_TEST_ATTR_NESTED_CHILD_TLV, .parent = &fr_dict_attr_test_nested_top_tlv, .da = &fr_dict_attr_test_nested_child_tlv, .name = "Child-TLV", .type = FR_TYPE_TLV },
+       { .attr = FR_TEST_ATTR_NESTED_LEAF_STRING, .parent = &fr_dict_attr_test_nested_child_tlv, .da = &fr_dict_attr_test_nested_leaf_string, .name = "Leaf-String", .type = FR_TYPE_STRING },
+       { .attr = FR_TEST_ATTR_NESTED_LEAF_INT32, .parent = &fr_dict_attr_test_nested_child_tlv, .da = &fr_dict_attr_test_nested_leaf_int32, .name = "Leaf-Int32", .type = FR_TYPE_INT32 },
+
        /*
         *      Enumeration
         */
index 747f066fd20425276e99178e0f1a9eae15908f9b..0520c19580748e10c599a7a20fd4e711e2706ae9 100644 (file)
@@ -78,6 +78,11 @@ typedef enum {
 
        FR_TEST_ATTR_GROUP,
 
+       FR_TEST_ATTR_NESTED_TOP_TLV,
+       FR_TEST_ATTR_NESTED_CHILD_TLV,
+       FR_TEST_ATTR_NESTED_LEAF_STRING,
+       FR_TEST_ATTR_NESTED_LEAF_INT32,
+
        FR_TEST_ATTR_ENUM
 } fr_dict_test_attr_number_t;
 
@@ -146,6 +151,11 @@ extern fr_dict_attr_t const *fr_dict_attr_test_vendor_string;
 
 extern fr_dict_attr_t const *fr_dict_attr_test_group;
 
+extern fr_dict_attr_t const *fr_dict_attr_test_nested_top_tlv;
+extern fr_dict_attr_t const *fr_dict_attr_test_nested_child_tlv;
+extern fr_dict_attr_t const *fr_dict_attr_test_nested_leaf_string;
+extern fr_dict_attr_t const *fr_dict_attr_test_nested_leaf_int32;
+
 extern fr_dict_attr_t const *fr_dict_attr_test_enum;
 
 extern fr_dict_test_attr_t const fr_dict_test_attrs[];