]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Rename 'alias' to 'name' in the dictionary code
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 5 Nov 2019 17:59:09 +0000 (11:59 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 5 Nov 2019 17:59:15 +0000 (11:59 -0600)
43 files changed:
src/bin/radsnmp.c
src/lib/eap/types.c
src/lib/eap_aka_sim/xlat.c
src/lib/json/json.c
src/lib/server/module.c
src/lib/server/virtual_servers.c
src/lib/unlang/call.c
src/lib/unlang/compile.c
src/lib/util/dict.h
src/lib/util/dict_priv.h
src/lib/util/dict_tokenize.c
src/lib/util/dict_util.c
src/lib/util/pair.c
src/lib/util/value.c
src/modules/proto_detail/proto_detail.c
src/modules/proto_detail/proto_detail_process.c
src/modules/proto_dhcpv4/proto_dhcpv4.c
src/modules/proto_dhcpv4/proto_dhcpv4_base.c
src/modules/proto_ldap_sync/proto_ldap_sync.c
src/modules/proto_radius/proto_radius.c
src/modules/proto_radius/proto_radius_acct.c
src/modules/proto_radius/proto_radius_auth.c
src/modules/proto_radius/proto_radius_coa.c
src/modules/proto_radius/proto_radius_status.c
src/modules/proto_tacacs/proto_tacacs.c
src/modules/proto_vmps/proto_vmps.c
src/modules/proto_vmps/proto_vmps_all.c
src/modules/rlm_chap/rlm_chap.c
src/modules/rlm_detail/rlm_detail.c
src/modules/rlm_digest/rlm_digest.c
src/modules/rlm_eap/rlm_eap.c
src/modules/rlm_eap/types/rlm_eap_gtc/rlm_eap_gtc.c
src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c
src/modules/rlm_mschap/rlm_mschap.c
src/modules/rlm_opendirectory/rlm_opendirectory.c
src/modules/rlm_pap/rlm_pap.c
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_rediswho/rlm_rediswho.c
src/modules/rlm_winbind/rlm_winbind.c
src/modules/rlm_yubikey/rlm_yubikey.c
src/protocols/dhcpv4/base.c
src/protocols/dhcpv6/base.c
src/protocols/tacacs/base.c

index 26759c9249d783099f36075ebd2eff21a4399e6d..092c5f1a42e48e1ead5ed447134ab80b010beb02 100644 (file)
@@ -697,7 +697,7 @@ static int radsnmp_send_recv(radsnmp_conf_t *conf, int fd)
 
                        strlcpy(type_str, value, (p - value) + 1);
 
-                       type = fr_dict_enum_by_alias(attr_freeradius_snmp_type, type_str, -1);
+                       type = fr_dict_enum_by_name(attr_freeradius_snmp_type, type_str, -1);
                        if (!type) {
                                ERROR("Unknown type \"%s\"", type_str);
                                RESPOND_STATIC("NONE");
index 8529a64c89082fda4272ac3e12fd2753ab07015f..960902d9bbe2d4fa1b6232215b266844b854c5ae 100644 (file)
@@ -37,7 +37,7 @@ eap_type_t eap_name2type(char const *name)
 {
        fr_dict_enum_t  *dv;
 
-       dv = fr_dict_enum_by_alias(attr_eap_type, name, -1);
+       dv = fr_dict_enum_by_name(attr_eap_type, name, -1);
        if (!dv) return FR_EAP_METHOD_INVALID;
 
        if (dv->value->vb_uint32 >= FR_EAP_METHOD_MAX) return FR_EAP_METHOD_INVALID;
@@ -54,7 +54,7 @@ char const *eap_type2name(eap_type_t method)
        fr_dict_enum_t  *dv;
 
        dv = fr_dict_enum_by_value(attr_eap_type, fr_box_uint32(method));
-       if (dv) return dv->alias;
+       if (dv) return dv->name;
 
        return "unknown";
 }
index b1195e989656ac2ef5ddada100deffc6c7ef99fc..c92eda52921ed59ce45a1eb7f2284460ad619e48 100644 (file)
@@ -79,17 +79,17 @@ static ssize_t aka_sim_xlat_id_method_xlat(TALLOC_CTX *ctx, char **out, UNUSED s
                return 0;
 
        case AKA_SIM_METHOD_HINT_SIM:
-               method = fr_dict_enum_alias_by_value(attr_eap_aka_sim_method_hint,
+               method = fr_dict_enum_name_by_value(attr_eap_aka_sim_method_hint,
                                                     fr_box_uint32(FR_METHOD_HINT_VALUE_SIM));
                break;
 
        case AKA_SIM_METHOD_HINT_AKA:
-               method = fr_dict_enum_alias_by_value(attr_eap_aka_sim_method_hint,
+               method = fr_dict_enum_name_by_value(attr_eap_aka_sim_method_hint,
                                                     fr_box_uint32(FR_METHOD_HINT_VALUE_AKA));
                break;
 
        case AKA_SIM_METHOD_HINT_AKA_PRIME:
-               method = fr_dict_enum_alias_by_value(attr_eap_aka_sim_method_hint,
+               method = fr_dict_enum_name_by_value(attr_eap_aka_sim_method_hint,
                                                     fr_box_uint32(FR_METHOD_HINT_VALUE_AKA_PRIME));
                break;
        }
@@ -150,17 +150,17 @@ static ssize_t aka_sim_xlat_id_type_xlat(TALLOC_CTX *ctx, char **out, UNUSED siz
                return 0;
 
        case AKA_SIM_ID_TYPE_PERMANENT:
-               type = fr_dict_enum_alias_by_value(attr_eap_aka_sim_identity_type,
+               type = fr_dict_enum_name_by_value(attr_eap_aka_sim_identity_type,
                                                   fr_box_uint32(FR_IDENTITY_TYPE_VALUE_PERMANENT));
                break;
 
        case AKA_SIM_ID_TYPE_PSEUDONYM:
-               type = fr_dict_enum_alias_by_value(attr_eap_aka_sim_identity_type,
+               type = fr_dict_enum_name_by_value(attr_eap_aka_sim_identity_type,
                                                   fr_box_uint32(FR_IDENTITY_TYPE_VALUE_PSEUDONYM));
                break;
 
        case AKA_SIM_ID_TYPE_FASTAUTH:
-               type = fr_dict_enum_alias_by_value(attr_eap_aka_sim_identity_type,
+               type = fr_dict_enum_name_by_value(attr_eap_aka_sim_identity_type,
                                                   fr_box_uint32(FR_IDENTITY_TYPE_VALUE_FASTAUTH));
                break;
        }
index a4b48afca8efccc203fddd9cf376cab508d65e37..7a49e35d8ae32feca13aa3373d5e208ca24635f7 100644 (file)
@@ -62,7 +62,7 @@ int fr_json_object_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, json_objec
                /*
                 *      If an alias exists, use that value instead
                 */
-               found = fr_dict_enum_by_alias(enumv, value, len);
+               found = fr_dict_enum_by_name(enumv, value, len);
                if (found) {
                        if (fr_value_box_copy(ctx, out, found->value) < 0) return -1;
                        return 0;
@@ -160,7 +160,7 @@ json_object *json_object_from_value_box(TALLOC_CTX *ctx, fr_value_box_t const *d
                fr_dict_enum_t *enumv;
 
                enumv = fr_dict_enum_by_value(data->enumv, data);
-               if (enumv) return json_object_new_string(enumv->alias);
+               if (enumv) return json_object_new_string(enumv->name);
        }
 
        switch (data->type) {
index 6f90b128a5851df731db43ddd47e1459e98efc7a..9c30ed33bdeca2746ef8ebfd910c9591be937f24 100644 (file)
@@ -627,7 +627,7 @@ bool module_section_type_set(REQUEST *request, fr_dict_attr_t const *type_da, fr
                return true;
 
        case 1:
-               RDEBUG2("&control:%s already set.  Not setting to %s", vp->da->name, enumv->alias);
+               RDEBUG2("&control:%s already set.  Not setting to %s", vp->da->name, enumv->name);
                return false;
 
        default:
index 00ac7b27ee163ef277e053708491622effe8e451..31e2d488e476fd622f7d384660770ebe1b104af9 100644 (file)
@@ -387,7 +387,7 @@ int virtual_server_section_attribute_define(CONF_SECTION *server_cs, char const
                 *      If the value already exists, don't
                 *      create it again.
                 */
-               dv = fr_dict_enum_by_alias(da, name2, -1);
+               dv = fr_dict_enum_by_name(da, name2, -1);
                if (dv) continue;
 
                cf_log_debug(subcs, "Creating %s = %s", da->name, name2);
@@ -398,7 +398,7 @@ int virtual_server_section_attribute_define(CONF_SECTION *server_cs, char const
                 *      this code, so it doesn't matter.  The only
                 *      requirement is that it's unique.
                 */
-               if (fr_dict_enum_add_alias_next(da, name2) < 0) {
+               if (fr_dict_enum_add_name_next(da, name2) < 0) {
                        PERROR("Failed adding section value");
                        return -1;
                }
@@ -1072,15 +1072,15 @@ rlm_rcode_t process_authenticate(int auth_type, REQUEST *request)
        dv = fr_dict_enum_by_value(da, fr_box_uint32((uint32_t) auth_type));
        if (!dv) return RLM_MODULE_FAIL;
 
-       subcs = cf_section_find(cs, da->name, dv->alias);
+       subcs = cf_section_find(cs, da->name, dv->name);
        if (!subcs) {
                RDEBUG2("%s %s sub-section not found.  Using default return values.",
-                       da->name, dv->alias);
+                       da->name, dv->name);
                return RLM_MODULE_REJECT;
        }
 
        RDEBUG("Running %s %s from file %s",
-              da->name, dv->alias, cf_filename(subcs));
+              da->name, dv->name, cf_filename(subcs));
        cs = subcs;
 
        /*
@@ -1119,7 +1119,7 @@ rlm_rcode_t virtual_server_process_auth(REQUEST *request, CONF_SECTION *virtual_
                return unlang_module_yield_to_section(request, NULL, RLM_MODULE_FAIL, resume, signal, rctx);
        }
 
-       auth_name = fr_dict_enum_alias_by_value(attr_auth_type, &vp->data);
+       auth_name = fr_dict_enum_name_by_value(attr_auth_type, &vp->data);
        if (!auth_name) {
                REDEBUG2("Invalid %pP value", vp);
                goto fail;
@@ -1274,7 +1274,7 @@ int fr_app_process_instantiate(CONF_SECTION *server, dl_module_inst_t **type_sub
 
                code = enumv->value->vb_uint32;
                if (code >= code_max) {
-                       cf_log_err(conf, "Invalid type code \"%s\" for \"%s\"", enumv->alias, app_process->name);
+                       cf_log_err(conf, "Invalid type code \"%s\" for \"%s\"", enumv->name, app_process->name);
                        return -1;
                }
 
index 1806d17e327b9e1a82d96cd93c4d756a36b5b3af..3e1cc106cb3ddcee34cc426a2c6fa5d36cfccc93 100644 (file)
@@ -161,10 +161,10 @@ static unlang_action_t unlang_call(REQUEST *request, rlm_rcode_t *presult)
                return UNLANG_ACTION_CALCULATE_RESULT;
        }
 
-       process_p = (fr_io_process_t *) cf_data_value(cf_data_find(g->server_cs, fr_io_process_t, type_enum->alias));
+       process_p = (fr_io_process_t *) cf_data_value(cf_data_find(g->server_cs, fr_io_process_t, type_enum->name));
        if (!process_p) {
                REDEBUG("No such packet type '%s' in server '%s'",
-                       type_enum->alias, cf_section_name2(g->server_cs));
+                       type_enum->name, cf_section_name2(g->server_cs));
                *presult = RLM_MODULE_FAIL;
                return UNLANG_ACTION_CALCULATE_RESULT;
        }
@@ -173,7 +173,7 @@ static unlang_action_t unlang_call(REQUEST *request, rlm_rcode_t *presult)
         *      We MUST use _cd_data_find() so that we don't try to
         *      find the "value" with talloc type "CF_IDENT_ANY".
         */
-       process_inst = cf_data_value(_cf_data_find(cf_section_to_item(g->server_cs), CF_IDENT_ANY, type_enum->alias));
+       process_inst = cf_data_value(_cf_data_find(cf_section_to_item(g->server_cs), CF_IDENT_ANY, type_enum->name));
        /* can be NULL */
 
        child = unlang_io_subrequest_alloc(request, dict, UNLANG_NORMAL_CHILD);
index 9783f9713ad51f6e95f79d8ba3ed1c6bb93388c1..de749bf551d9701b1880e6a8c97ad79d1d0df90a 100644 (file)
@@ -465,7 +465,7 @@ static bool pass2_fixup_map(fr_cond_t *c, vp_tmpl_rules_t const *rules)
         *      Where "foo" is dynamically defined.
         */
        if (c->pass2_fixup == PASS2_FIXUP_TYPE) {
-               if (!fr_dict_enum_by_alias(map->lhs->tmpl_da, map->rhs->name, -1)) {
+               if (!fr_dict_enum_by_name(map->lhs->tmpl_da, map->rhs->name, -1)) {
                        cf_log_err(map->ci, "Invalid reference to non-existent %s %s { ... }",
                                   map->lhs->tmpl_da->name,
                                   map->rhs->name);
@@ -2944,7 +2944,7 @@ static unlang_t *compile_subrequest(unlang_t *parent, unlang_compile_t *unlang_c
                }
        }
 
-       type_enum = fr_dict_enum_by_alias(da, packet_name, -1);
+       type_enum = fr_dict_enum_by_name(da, packet_name, -1);
        if (!type_enum) {
                cf_log_err(cs, "No such value '%s' for attribute 'Packet-Type' in namespace '%s'",
                           packet_name, namespace);
index 5d249867e0e4e1d5716abd7086e0ebdc72e82f8a..c3faf5cab2d2bb1d5c84a5928d97caf589aeaf2f 100644 (file)
@@ -140,8 +140,8 @@ struct dict_attr {
  */
 typedef struct {
        fr_dict_attr_t const    *da;                            //!< Dictionary attribute enum is associated with.
-       char const              *alias;                         //!< Enum name.
-       size_t                  alias_len;                      //!< Allows for efficient alias lookups when operating
+       char const              *name;                          //!< Enum name.
+       size_t                  name_len;                       //!< Allows for efficient name lookups when operating
                                                                ///< on partial buffers.
        fr_value_box_t const    *value;                         //!< Enum value (what name maps to).
 } fr_dict_enum_t;
@@ -248,10 +248,10 @@ extern bool const fr_dict_non_data_types[FR_TYPE_MAX + 1];
 int                    fr_dict_attr_add(fr_dict_t *dict, fr_dict_attr_t const *parent, char const *name, int attr,
                                         fr_type_t type, fr_dict_attr_flags_t const *flags) CC_HINT(nonnull(1,2,3));
 
-int                    fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
+int                    fr_dict_enum_add_name(fr_dict_attr_t const *da, char const *name,
                                               fr_value_box_t const *value, bool coerce, bool replace);
 
-int                    fr_dict_enum_add_alias_next(fr_dict_attr_t const *da, char const *alias) CC_HINT(nonnull);
+int                    fr_dict_enum_add_name_next(fr_dict_attr_t const *da, char const *name) CC_HINT(nonnull);
 
 int                    fr_dict_str_to_argv(char *str, char **argv, int max_argc);
 /** @} */
@@ -381,9 +381,9 @@ fr_dict_attr_t const        *fr_dict_attr_child_by_num(fr_dict_attr_t const *parent, un
 
 fr_dict_enum_t         *fr_dict_enum_by_value(fr_dict_attr_t const *da, fr_value_box_t const *value);
 
-char const             *fr_dict_enum_alias_by_value(fr_dict_attr_t const *da, fr_value_box_t const *value);
+char const             *fr_dict_enum_name_by_value(fr_dict_attr_t const *da, fr_value_box_t const *value);
 
-fr_dict_enum_t         *fr_dict_enum_by_alias(fr_dict_attr_t const *da, char const *alias, ssize_t len);
+fr_dict_enum_t         *fr_dict_enum_by_name(fr_dict_attr_t const *da, char const *name, ssize_t len);
 /** @} */
 
 /** @name Dictionary and protocol loading
index 90757f01118c0c49c1335e0a363d9a44427dee3c..1659bff8c5f59553e19d527637db9e95156140f0 100644 (file)
@@ -73,7 +73,7 @@ struct fr_dict {
        fr_hash_table_t         *attributes_combo;      //!< Lookup variants of polymorphic attributes.
 
        fr_hash_table_t         *values_by_da;          //!< Lookup an attribute enum by its value.
-       fr_hash_table_t         *values_by_alias;       //!< Lookup an attribute enum by its alias name.
+       fr_hash_table_t         *values_by_name;        //!< Lookup an attribute enum by its name name.
 
        fr_dict_attr_t          *root;                  //!< Root attribute of this dictionary.
 
index 017587f94ae52fd20e3c83c96c17a732517d7865..4481407acdfbb7323a415401bd5a790ee37305cc 100644 (file)
@@ -43,7 +43,7 @@ struct dict_enum_fixup_s {
        char                    *filename;              //!< where the "enum" was defined
        int                     line;                   //!< ditto
        char                    *attribute;             //!< we couldn't find (and will need to resolve later).
-       char                    *alias;                 //!< Raw enum name.
+       char                    *name;                  //!< Raw enum name.
        char                    *value;                 //!< Raw enum value.  We can't do anything with this until
                                                        //!< we know the attribute type, which we only find out later.
 
@@ -855,8 +855,8 @@ static int dict_read_process_value(dict_tokenize_ctx_t *ctx, char **argv, int ar
 
                fixup->attribute = talloc_strdup(fixup, argv[0]);
                if (!fixup->attribute) goto oom;
-               fixup->alias = talloc_strdup(fixup, argv[1]);
-               if (!fixup->alias) goto oom;
+               fixup->name = talloc_strdup(fixup, argv[1]);
+               if (!fixup->name) goto oom;
                fixup->value = talloc_strdup(fixup, argv[2]);
                if (!fixup->value) goto oom;
 
@@ -895,7 +895,7 @@ static int dict_read_process_value(dict_tokenize_ctx_t *ctx, char **argv, int ar
                }
        }
 
-       if (fr_dict_enum_add_alias(da, argv[1], &value, false, true) < 0) {
+       if (fr_dict_enum_add_name(da, argv[1], &value, false, true) < 0) {
                fr_value_box_clear(&value);
                return -1;
        }
@@ -1347,7 +1347,7 @@ static int fr_dict_finalise(dict_tokenize_ctx_t *ctx)
                        da = fr_dict_attr_by_name(ctx->dict, this->attribute);
                        if (!da) {
                                fr_strerror_printf("No ATTRIBUTE '%s' defined for VALUE '%s' at %s[%d]",
-                                                  this->attribute, this->alias, this->filename, this->line);
+                                                  this->attribute, this->name, this->filename, this->line);
                                return -1;
                        }
                        type = da->type;
@@ -1359,7 +1359,7 @@ static int fr_dict_finalise(dict_tokenize_ctx_t *ctx)
                                return -1;
                        }
 
-                       ret = fr_dict_enum_add_alias(da, this->alias, &value, false, false);
+                       ret = fr_dict_enum_add_name(da, this->name, &value, false, false);
                        fr_value_box_clear(&value);
 
                        if (ret < 0) return -1;
@@ -1508,7 +1508,7 @@ static int fr_dict_finalise(dict_tokenize_ctx_t *ctx)
        fr_hash_table_walk(ctx->dict->vendors_by_num, hash_null_callback, NULL);
 
        fr_hash_table_walk(ctx->dict->values_by_da, hash_null_callback, NULL);
-       fr_hash_table_walk(ctx->dict->values_by_alias, hash_null_callback, NULL);
+       fr_hash_table_walk(ctx->dict->values_by_name, hash_null_callback, NULL);
 
        ctx->value_attr = NULL;
        ctx->relative_attr = NULL;
index aef61f35eda8b534fb8b837b587a91cd52e14fd5..7a17e745331d49cb496379b35d8ea33359852baf 100644 (file)
@@ -337,12 +337,12 @@ static int dict_vendor_pen_cmp(void const *one, void const *two)
 /** Hash a dictionary name
  *
  */
-static uint32_t dict_enum_alias_hash(void const *data)
+static uint32_t dict_enum_name_hash(void const *data)
 {
        uint32_t hash;
        fr_dict_enum_t const *enumv = data;
 
-       hash = dict_hash_name((void const *)enumv->alias, enumv->alias_len);
+       hash = dict_hash_name((void const *)enumv->name, enumv->name_len);
 
        return fr_hash_update(&enumv->da, sizeof(enumv->da), hash);             //-V568
 }
@@ -350,7 +350,7 @@ static uint32_t dict_enum_alias_hash(void const *data)
 /** Compare two dictionary attribute enum values
  *
  */
-static int dict_enum_alias_cmp(void const *one, void const *two)
+static int dict_enum_name_cmp(void const *one, void const *two)
 {
        int rcode;
        fr_dict_enum_t const *a = one;
@@ -359,7 +359,7 @@ static int dict_enum_alias_cmp(void const *one, void const *two)
        rcode = a->da - b->da;
        if (rcode != 0) return rcode;
 
-       return strcasecmp(a->alias, b->alias);
+       return strcasecmp(a->name, b->name);
 }
 
 /** Hash a dictionary enum value
@@ -934,30 +934,30 @@ int fr_dict_attr_add(fr_dict_t *dict, fr_dict_attr_t const *parent,
        return 0;
 }
 
-/** Add a value alias
+/** Add a value name
  *
- * Aliases are textual (string) aliases for a given value.
+ * Aliases are textual (string) names for a given value.
  *
- * Value aliases are not limited to integers, and may be added for any non-structural
+ * Value names are not limited to integers, and may be added for any non-structural
  * attribute type.
  *
  * @param[in] da               to add enumeration value to.
- * @param[in] alias            Name of value alias.
- * @param[in] value            to associate with alias.
+ * @param[in] name             Name of value name.
+ * @param[in] value            to associate with name.
  * @param[in] coerce           if the type of the value does not match the
  *                             type of the da, attempt to cast it to match
  *                             the type of the da.  If this is false and there's
  *                             a type mismatch, we fail.
  *                             We also fail if the value cannot be coerced to
  *                             the attribute type.
- * @param[in] takes_precedence This alias should take precedence over previous
- *                             aliases for the same value, when resolving value
- *                             to alias.
+ * @param[in] takes_precedence This name should take precedence over previous
+ *                             names for the same value, when resolving value
+ *                             to name.
  * @return
  *     - 0 on success.
  *     - -1 on failure.
  */
-int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
+int fr_dict_enum_add_name(fr_dict_attr_t const *da, char const *name,
                           fr_value_box_t const *value,
                           bool coerce, bool takes_precedence)
 {
@@ -971,12 +971,12 @@ int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
                return -1;
        }
 
-       if (!*alias) {
+       if (!*name) {
                fr_strerror_printf("%s: Empty names are not permitted", __FUNCTION__);
                return -1;
        }
 
-       len = strlen(alias);
+       len = strlen(name);
        if (len >= FR_DICT_ENUM_MAX_NAME_LEN) {
                fr_strerror_printf("%s: Value name too long", __FUNCTION__);
                return -1;
@@ -990,8 +990,8 @@ int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
                fr_strerror_printf("%s: Out of memory", __FUNCTION__);
                return -1;
        }
-       enumv->alias = talloc_typed_strdup(enumv, alias);
-       enumv->alias_len = strlen(alias);
+       enumv->name = talloc_typed_strdup(enumv, name);
+       enumv->name_len = strlen(name);
        enum_value = fr_value_box_alloc(enumv, da->type, NULL, false);
        if (!enum_value) goto oom;
 
@@ -1029,7 +1029,7 @@ int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
                fr_dict_attr_t *tmp;
                memcpy(&tmp, &enumv, sizeof(tmp));
 
-               if (!fr_hash_table_insert(dict->values_by_alias, tmp)) {
+               if (!fr_hash_table_insert(dict->values_by_name, tmp)) {
                        fr_dict_enum_t *old;
 
                        /*
@@ -1037,7 +1037,7 @@ int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
                         *      name and value.  There are lots in
                         *      dictionary.ascend.
                         */
-                       old = fr_dict_enum_by_alias(da, alias, -1);
+                       old = fr_dict_enum_by_name(da, name, -1);
                        if (!fr_cond_assert(old)) return -1;
 
                        if (fr_value_box_cmp(old->value, enumv->value) == 0) {
@@ -1045,8 +1045,8 @@ int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
                                return 0;
                        }
 
-                       fr_strerror_printf("Duplicate VALUE alias \"%s\" for attribute \"%s\". "
-                                          "Old value was \"%pV\", new value was \"%pV\"", alias, da->name,
+                       fr_strerror_printf("Duplicate VALUE name \"%s\" for attribute \"%s\". "
+                                          "Old value was \"%pV\", new value was \"%pV\"", name, da->name,
                                           old->value, enumv->value);
                        talloc_free(enumv);
                        return -1;
@@ -1059,7 +1059,7 @@ int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
         */
        if (takes_precedence) {
                if (!fr_hash_table_replace(dict->values_by_da, enumv)) {
-                       fr_strerror_printf("%s: Failed inserting value %s", __FUNCTION__, alias);
+                       fr_strerror_printf("%s: Failed inserting value %s", __FUNCTION__, name);
                        return -1;
                }
        } else {
@@ -1080,10 +1080,10 @@ int fr_dict_enum_add_alias(fr_dict_attr_t const *da, char const *alias,
        return 0;
 }
 
-/** Add an alias to an integer attribute hashing the alias for the integer value
+/** Add an name to an integer attribute hashing the name for the integer value
  *
  */
-int fr_dict_enum_add_alias_next(fr_dict_attr_t const *da, char const *alias)
+int fr_dict_enum_add_name_next(fr_dict_attr_t const *da, char const *name)
 {
        fr_value_box_t  v = {
                                .type = da->type
@@ -1092,39 +1092,39 @@ int fr_dict_enum_add_alias_next(fr_dict_attr_t const *da, char const *alias)
                                .type = da->type
                        };
 
-       if (fr_dict_enum_by_alias(da, alias, -1)) return 0;
+       if (fr_dict_enum_by_name(da, name, -1)) return 0;
 
        switch (da->type) {
        case FR_TYPE_INT8:
-               v.vb_int8 = s.vb_int8 = fr_hash_string(alias) & INT8_MAX;
+               v.vb_int8 = s.vb_int8 = fr_hash_string(name) & INT8_MAX;
                break;
 
        case FR_TYPE_INT16:
-               v.vb_int16 = s.vb_int16 = fr_hash_string(alias) & INT16_MAX;
+               v.vb_int16 = s.vb_int16 = fr_hash_string(name) & INT16_MAX;
                break;
 
        case FR_TYPE_INT32:
-               v.vb_int32 = s.vb_int32 = fr_hash_string(alias) & INT32_MAX;
+               v.vb_int32 = s.vb_int32 = fr_hash_string(name) & INT32_MAX;
                break;
 
        case FR_TYPE_INT64:
-               v.vb_int64 = s.vb_int64 = fr_hash_string(alias) & INT64_MAX;
+               v.vb_int64 = s.vb_int64 = fr_hash_string(name) & INT64_MAX;
                break;
 
        case FR_TYPE_UINT8:
-               v.vb_uint8 = s.vb_uint8 = fr_hash_string(alias) & UINT8_MAX;
+               v.vb_uint8 = s.vb_uint8 = fr_hash_string(name) & UINT8_MAX;
                break;
 
        case FR_TYPE_UINT16:
-               v.vb_uint16 = s.vb_uint16 = fr_hash_string(alias) & UINT16_MAX;
+               v.vb_uint16 = s.vb_uint16 = fr_hash_string(name) & UINT16_MAX;
                break;
 
        case FR_TYPE_UINT32:
-               v.vb_uint32 = s.vb_uint32 = fr_hash_string(alias) & UINT32_MAX;
+               v.vb_uint32 = s.vb_uint32 = fr_hash_string(name) & UINT32_MAX;
                break;
 
        case FR_TYPE_UINT64:
-               v.vb_uint64 = s.vb_uint64 = fr_hash_string(alias) & UINT64_MAX;
+               v.vb_uint64 = s.vb_uint64 = fr_hash_string(name) & UINT64_MAX;
                break;
 
        default:
@@ -1135,14 +1135,14 @@ int fr_dict_enum_add_alias_next(fr_dict_attr_t const *da, char const *alias)
 
        /*
         *      If there's no existing value, add an enum
-        *      with the hash value of the alias.
+        *      with the hash value of the name.
         *
         *      This helps with debugging as the values
         *      are consistent.
         */
        if (!fr_dict_enum_by_value(da, &v)) {
        add:
-               return fr_dict_enum_add_alias(da, alias, &v, false, false);
+               return fr_dict_enum_add_name(da, name, &v, false, false);
        }
 
        for (;;) {
@@ -2050,17 +2050,17 @@ fr_dict_enum_t *fr_dict_enum_by_value(fr_dict_attr_t const *da, fr_value_box_t c
        if (value->type != da->type) return NULL;
 
        /*
-        *      First, look up aliases.
+        *      First, look up names.
         */
        enumv.da = da;
-       enumv.alias = "";
-       enumv.alias_len = 0;
+       enumv.name = "";
+       enumv.name_len = 0;
 
        /*
-        *      Look up the attribute alias target, and use
+        *      Look up the attribute name target, and use
         *      the correct attribute number if found.
         */
-       dv = fr_hash_table_finddata(dict->values_by_alias, &enumv);
+       dv = fr_hash_table_finddata(dict->values_by_name, &enumv);
        if (dv) enumv.da = dv->da;
 
        enumv.value = value;
@@ -2076,7 +2076,7 @@ fr_dict_enum_t *fr_dict_enum_by_value(fr_dict_attr_t const *da, fr_value_box_t c
  *     - Name of value.
  *     - NULL if no matching value could be found.
  */
-char const *fr_dict_enum_alias_by_value(fr_dict_attr_t const *da, fr_value_box_t const *value)
+char const *fr_dict_enum_name_by_value(fr_dict_attr_t const *da, fr_value_box_t const *value)
 {
        fr_dict_enum_t  *dv;
        fr_dict_t       *dict;
@@ -2092,22 +2092,22 @@ char const *fr_dict_enum_alias_by_value(fr_dict_attr_t const *da, fr_value_box_t
        dv = fr_dict_enum_by_value(da, value);
        if (!dv) return "";
 
-       return dv->alias;
+       return dv->name;
 }
 
 /*
  *     Get a value by its name, keyed off of an attribute.
  */
-fr_dict_enum_t *fr_dict_enum_by_alias(fr_dict_attr_t const *da, char const *alias, ssize_t len)
+fr_dict_enum_t *fr_dict_enum_by_name(fr_dict_attr_t const *da, char const *name, ssize_t len)
 {
        fr_dict_enum_t  *found;
        fr_dict_enum_t  find = {
                                .da = da,
-                               .alias = alias
+                               .name = name
                        };
        fr_dict_t       *dict;
 
-       if (!alias) return NULL;
+       if (!name) return NULL;
 
        dict = fr_dict_by_da(da);
        if (!dict) {
@@ -2115,17 +2115,17 @@ fr_dict_enum_t *fr_dict_enum_by_alias(fr_dict_attr_t const *da, char const *alia
                return NULL;
        }
 
-       if (len < 0) len = strlen(alias);
-       find.alias_len = (size_t)len;
+       if (len < 0) len = strlen(name);
+       find.name_len = (size_t)len;
 
        /*
-        *      Look up the attribute alias target, and use
+        *      Look up the attribute name target, and use
         *      the correct attribute number if found.
         */
-       found = fr_hash_table_finddata(dict->values_by_alias, &find);
+       found = fr_hash_table_finddata(dict->values_by_name, &find);
        if (found) find.da = found->da;
 
-       return fr_hash_table_finddata(dict->values_by_alias, &find);
+       return fr_hash_table_finddata(dict->values_by_name, &find);
 }
 
 int dict_dlopen(fr_dict_t *dict, char const *name)
@@ -2241,8 +2241,8 @@ fr_dict_t *dict_alloc(TALLOC_CTX *ctx)
        dict->attributes_combo = fr_hash_table_create(dict, dict_attr_combo_hash, dict_attr_combo_cmp, hash_pool_free);
        if (!dict->attributes_combo) goto error;
 
-       dict->values_by_alias = fr_hash_table_create(dict, dict_enum_alias_hash, dict_enum_alias_cmp, hash_pool_free);
-       if (!dict->values_by_alias) goto error;
+       dict->values_by_name = fr_hash_table_create(dict, dict_enum_name_hash, dict_enum_name_cmp, hash_pool_free);
+       if (!dict->values_by_name) goto error;
 
        dict->values_by_da = fr_hash_table_create(dict, dict_enum_value_hash, dict_enum_value_cmp, hash_pool_free);
        if (!dict->values_by_da) goto error;
index 492108cc969fcb67d08e7058151069bab4b3cbd5..cfb775a3e9354ad19c7515fb13ba0f2c155ee43c 100644 (file)
@@ -2374,7 +2374,7 @@ char const *fr_pair_value_enum(VALUE_PAIR const *vp, char buff[20])
                fr_pair_value_snprint(buff, 20, vp, '\0');
                str = buff;
        } else {
-               str = enumv->alias;
+               str = enumv->name;
        }
 
        return str;
index 60dbe03946a45e876e231b86ff60db9ec3ed328b..36099788e32adbeaac5af83e832f0275e36e4dce 100644 (file)
@@ -2651,7 +2651,7 @@ static inline int fr_value_box_cast_to_uint64(TALLOC_CTX *ctx, fr_value_box_t *d
  * @param dst_type     to cast to.
  * @param dst_enumv    Aliases for values contained within this fr_value_box_t.
  *                     If #fr_value_box_t is passed to #fr_value_box_asprint
- *                     aliases will be printed instead of actual value.
+ *                     names will be printed instead of actual value.
  * @param src          Input data.
  * @return
  *     - 0 on success.
@@ -2678,7 +2678,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
         *
         *      The theory here is that the attribute value isn't
         *      being converted into its presentation format and
-        *      re-parsed, and the enumv aliases only get applied
+        *      re-parsed, and the enumv names only get applied
         *      when converting internal values to/from strings,
         *      so it's OK just to swap out the enumv.
         *
@@ -2947,7 +2947,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
  * @param dst_type     to cast to.
  * @param dst_enumv    Aliases for values contained within this fr_value_box_t.
  *                     If #fr_value_box_t is passed to #fr_value_box_asprint
- *                     aliases will be printed instead of actual value.
+ *                     names will be printed instead of actual value.
  * @return
  *     - 0 on success.
  *     - -1 on failure.
@@ -3926,7 +3926,7 @@ static int fr_value_box_from_integer_str(fr_value_box_t *dst, fr_type_t dst_type
  * @param[in] ctx              to alloc strings in.
  * @param[out] dst             where to write parsed value.
  * @param[in,out] dst_type     of value data to create/dst_type of value created.
- * @param[in] dst_enumv                fr_dict_attr_t with string aliases for uint32 values.
+ * @param[in] dst_enumv                fr_dict_attr_t with string names for uint32 values.
  * @param[in] in               String to convert. Binary safe for variable length values
  *                             if len is provided.
  * @param[in] inlen            may be < 0 in which case strlen(len) is used to determine
@@ -3958,39 +3958,39 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
        ret = dict_attr_sizes[*dst_type][1];    /* Max length */
 
        /*
-        *      Lookup any aliases before continuing
+        *      Lookup any names before continuing
         */
        if (dst_enumv) {
                char            *tmp = NULL;
-               char            *alias;
-               size_t          alias_len;
+               char            *name;
+               size_t          name_len;
                fr_dict_enum_t  *enumv;
 
                if (len > (sizeof(buffer) - 1)) {
                        tmp = talloc_array(NULL, char, len + 1);
                        if (!tmp) return -1;
 
-                       alias_len = fr_value_str_unescape((uint8_t *)tmp, in, len, quote);
-                       alias = tmp;
+                       name_len = fr_value_str_unescape((uint8_t *)tmp, in, len, quote);
+                       name = tmp;
                } else {
-                       alias_len = fr_value_str_unescape((uint8_t *)buffer, in, len, quote);
-                       alias = buffer;
+                       name_len = fr_value_str_unescape((uint8_t *)buffer, in, len, quote);
+                       name = buffer;
                }
-               alias[alias_len] = '\0';
+               name[name_len] = '\0';
 
                /*
-                *      Check the alias name is valid first before bothering
+                *      Check the name name is valid first before bothering
                 *      to look it up.
                 *
                 *      Catches any embedded \0 bytes that might cause
                 *      incorrect results.
                 */
-               if (fr_dict_valid_name(alias, alias_len) <= 0) {
+               if (fr_dict_valid_name(name, name_len) <= 0) {
                        if (tmp) talloc_free(tmp);
                        goto parse;
                }
 
-               enumv = fr_dict_enum_by_alias(dst_enumv, alias, alias_len);
+               enumv = fr_dict_enum_by_name(dst_enumv, name, name_len);
                if (tmp) talloc_free(tmp);
                if (!enumv) goto parse;
 
@@ -4385,7 +4385,7 @@ char *fr_value_box_asprint(TALLOC_CTX *ctx, fr_value_box_t const *data, char quo
                fr_dict_enum_t const    *dv;
 
                dv = fr_dict_enum_by_value(data->enumv, data);
-               if (dv) return talloc_typed_strdup(ctx, dv->alias);
+               if (dv) return talloc_typed_strdup(ctx, dv->name);
        }
 
        switch (data->type) {
@@ -4894,7 +4894,7 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
                fr_dict_enum_t const    *dv;
 
                dv = fr_dict_enum_by_value(data->enumv, data);
-               if (dv) return strlcpy(out, dv->alias, outlen);
+               if (dv) return strlcpy(out, dv->name, outlen);
        }
 
        switch (data->type) {
index 246d7937f7af5ad0cd8e19cd84e0d472b5f9743f..53ff84daf3e0f2dad3114b386418e6dc8efe1a60 100644 (file)
@@ -170,7 +170,7 @@ static int type_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, U
         *      Allow the process module to be specified by
         *      packet type.
         */
-       type_enum = fr_dict_enum_by_alias(attr_packet_type, type_str, -1);
+       type_enum = fr_dict_enum_by_name(attr_packet_type, type_str, -1);
        if (!type_enum) {
                cf_log_err(ci, "Invalid type \"%s\"", type_str);
                return -1;
index ac00984cae9c38432d8703ac57324fd86fc56504..7c9ccb7af39ca6263609594c638ab31fe77a6ad5 100644 (file)
@@ -59,7 +59,7 @@ static rlm_rcode_t mod_process(void const *instance, REQUEST *request)
        switch (request->request_state) {
        case REQUEST_INIT:
                RDEBUG("Received %s ID %i",
-                      fr_dict_enum_alias_by_value(inst->attr_packet_type, fr_box_uint32(request->packet->code)),
+                      fr_dict_enum_name_by_value(inst->attr_packet_type, fr_box_uint32(request->packet->code)),
                       request->packet->id);
                log_request_pair_list(L_DBG_LVL_1, request, request->packet->vps, "");
 
@@ -180,7 +180,7 @@ static rlm_rcode_t mod_process(void const *instance, REQUEST *request)
                        REDEBUG("Failed ID %i", request->reply->id);
                } else {
                        RDEBUG("Sent %s ID %i",
-                              fr_dict_enum_alias_by_value(inst->attr_packet_type, fr_box_uint32(request->reply->code)),
+                              fr_dict_enum_name_by_value(inst->attr_packet_type, fr_box_uint32(request->reply->code)),
                               request->reply->id);
                }
 
index 4d7026232854463977b1bb981d925cd68c44438e..93cdf5ec6f39310b3ce67304550c3cd27761fdad 100644 (file)
@@ -142,7 +142,7 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
         *      Allow the process module to be specified by
         *      packet type.
         */
-       type_enum = fr_dict_enum_by_alias(attr_message_type, type_str, -1);
+       type_enum = fr_dict_enum_by_name(attr_message_type, type_str, -1);
        if (!type_enum) {
                cf_log_err(ci, "Invalid type \"%s\"", type_str);
                return -1;
@@ -166,9 +166,9 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
         *      Setting 'type = foo' means you MUST have at least a
         *      'recv foo' section.
         */
-       if (!cf_section_find(server, "recv", type_enum->alias)) {
+       if (!cf_section_find(server, "recv", type_enum->name)) {
                cf_log_err(ci, "Failed finding 'recv %s {...} section of virtual server %s",
-                          type_enum->alias, cf_section_name2(server));
+                          type_enum->name, cf_section_name2(server));
                return -1;
        }
 
@@ -182,14 +182,14 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
        inst = talloc_get_type_abort(parent_inst->data, proto_dhcpv4_t);
        inst->code_allowed[code] = true;
 
-       process_app_cs = cf_section_find(listen_cs, type_enum->alias, NULL);
+       process_app_cs = cf_section_find(listen_cs, type_enum->name, NULL);
 
        /*
         *      Allocate an empty section if one doesn't exist
         *      this is so defaults get parsed.
         */
        if (!process_app_cs) {
-               MEM(process_app_cs = cf_section_alloc(listen_cs, listen_cs, type_enum->alias, NULL));
+               MEM(process_app_cs = cf_section_alloc(listen_cs, listen_cs, type_enum->name, NULL));
        }
 
        /*
index 52c6782c44e2fb07809ecd1424d475f82c1db5e0..05a90467cc85fccf7567946561c0860089b9a3c9 100644 (file)
@@ -144,9 +144,9 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                        return RLM_MODULE_FAIL;
                }
 
-               unlang = cf_section_find(request->server_cs, "recv", dv->alias);
+               unlang = cf_section_find(request->server_cs, "recv", dv->name);
                if (!unlang) {
-                       RWDEBUG("Failed to find 'recv %s' section", dv->alias);
+                       RWDEBUG("Failed to find 'recv %s' section", dv->name);
                        request->reply->code = FR_DHCP_MESSAGE_TYPE_VALUE_DHCP_DO_NOT_RESPOND;
                        goto send_reply;
                }
@@ -211,7 +211,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
 
                dv = fr_dict_enum_by_value(da, fr_box_uint8(request->reply->code));
                unlang = NULL;
-               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->alias);
+               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->name);
 
                if (!unlang) goto send_reply;
 
@@ -246,7 +246,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                         */
                        if (request->reply->code != FR_DHCP_MESSAGE_TYPE_VALUE_DHCP_DO_NOT_RESPOND) {
                                dv = fr_dict_enum_by_value(attr_message_type, fr_box_uint8(request->reply->code));
-                               RWDEBUG("Failed running 'send %s', trying 'send Do-Not-Respond'", dv->alias);
+                               RWDEBUG("Failed running 'send %s', trying 'send Do-Not-Respond'", dv->name);
 
                                request->reply->code = FR_DHCP_MESSAGE_TYPE_VALUE_DHCP_DO_NOT_RESPOND;
 
@@ -254,10 +254,10 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                                unlang = NULL;
                                if (!dv) goto send_reply;
 
-                               unlang = cf_section_find(request->server_cs, "send", dv->alias);
+                               unlang = cf_section_find(request->server_cs, "send", dv->name);
                                if (unlang) goto rerun_nak;
 
-                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->alias);
+                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->name);
                        }
                        break;
                }
index e333da0a47d23832dde6096fb8df221fdc22277c..fe497d47ed1c13c62019ed7d60191e5f70aea185 100644 (file)
@@ -250,7 +250,7 @@ static int fr_dict_enum_from_name_number(fr_dict_attr_t const *da, fr_table_num_
 
        for (p = table; p->name; p++) {
                value.vb_int32 = p->value;
-               if (fr_dict_enum_add_alias(da, p->name, &value, true, false) < 0) return -1;
+               if (fr_dict_enum_add_name(da, p->name, &value, true, false) < 0) return -1;
        }
 
        return 0;
index 0135ac1c2b9a9cb2b3f8dc49fa6f4fd84873d1d9..cf5eb2388697cc955836097f27448d250c2e5125 100644 (file)
@@ -147,7 +147,7 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM
         *      Allow the process module to be specified by
         *      packet type.
         */
-       type_enum = fr_dict_enum_by_alias(attr_packet_type, type_str, -1);
+       type_enum = fr_dict_enum_by_name(attr_packet_type, type_str, -1);
        if (!type_enum) {
                size_t i;
 
@@ -183,9 +183,9 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM
         *      Setting 'type = foo' means you MUST have at least a
         *      'recv foo' section.
         */
-       if (!cf_section_find(server, "recv", type_enum->alias)) {
+       if (!cf_section_find(server, "recv", type_enum->name)) {
                cf_log_err(ci, "Failed finding 'recv %s {...} section of virtual server %s",
-                          type_enum->alias, cf_section_name2(server));
+                          type_enum->name, cf_section_name2(server));
                return -1;
        }
 
@@ -210,14 +210,14 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM
                inst->code_allowed[FR_CODE_DISCONNECT_REQUEST] = true;
        }
 
-       process_app_cs = cf_section_find(listen_cs, type_enum->alias, NULL);
+       process_app_cs = cf_section_find(listen_cs, type_enum->name, NULL);
 
        /*
         *      Allocate an empty section if one doesn't exist
         *      this is so defaults get parsed.
         */
        if (!process_app_cs) {
-               MEM(process_app_cs = cf_section_alloc(listen_cs, listen_cs, type_enum->alias, NULL));
+               MEM(process_app_cs = cf_section_alloc(listen_cs, listen_cs, type_enum->name, NULL));
        }
 
        /*
index 96bde953eeb5a902d2e222f90d68d500fb4e5711..a046b7a2150e66e2d48a81829cd133fe1217926c 100644 (file)
@@ -125,9 +125,9 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                dv = fr_dict_enum_by_value(vp->da, &vp->data);
                if (!dv) goto setup_send;
 
-               unlang = cf_section_find(request->server_cs, "accounting", dv->alias);
+               unlang = cf_section_find(request->server_cs, "accounting", dv->name);
                if (!unlang) {
-                       REDEBUG2("No 'accounting %s' section found: Ignoring it.", dv->alias);
+                       REDEBUG2("No 'accounting %s' section found: Ignoring it.", dv->name);
                        goto setup_send;
                }
 
@@ -181,7 +181,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
 
                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
                unlang = NULL;
-               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->alias);
+               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->name);
 
                if (!unlang) goto send_reply;
 
index 701b1efdd806142f7277341c9161b78d1c53184e..f33e2adfccc3aa439e4a04ca60b390a842b20f96 100644 (file)
@@ -214,7 +214,7 @@ static void CC_HINT(format (printf, 4, 5)) auth_message(proto_radius_auth_t cons
                        auth_type = fr_pair_find_by_da(request->control, attr_auth_type, TAG_ANY);
                        if (auth_type) {
                                snprintf(password_buff, sizeof(password_buff), "<via Auth-Type = %s>",
-                                        fr_dict_enum_alias_by_value(auth_type->da, &auth_type->data));
+                                        fr_dict_enum_name_by_value(auth_type->da, &auth_type->data));
                                password_str = password_buff;
                        } else {
                                password_str = "<no User-Password attribute>";
@@ -407,9 +407,9 @@ static rlm_rcode_t mod_process(void const *instance, REQUEST *request)
                        goto setup_send;
                }
 
-               unlang = cf_section_find(request->server_cs, "authenticate", dv->alias);
+               unlang = cf_section_find(request->server_cs, "authenticate", dv->name);
                if (!unlang) {
-                       REDEBUG2("No 'authenticate %s' section found: rejecting the user", dv->alias);
+                       REDEBUG2("No 'authenticate %s' section found: rejecting the user", dv->name);
                        request->reply->code = FR_CODE_ACCESS_REJECT;
                        goto setup_send;
                }
@@ -515,7 +515,7 @@ static rlm_rcode_t mod_process(void const *instance, REQUEST *request)
 
                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
                unlang = NULL;
-               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->alias);
+               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->name);
 
                if (!unlang) goto send_reply;
 
@@ -564,7 +564,7 @@ static rlm_rcode_t mod_process(void const *instance, REQUEST *request)
                        if (request->reply->code != FR_CODE_ACCESS_REJECT) {
                                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
 
-                               RWDEBUG("Failed running 'send %s', trying 'send Access-Reject'", dv ? dv->alias : "???" );
+                               RWDEBUG("Failed running 'send %s', trying 'send Access-Reject'", dv ? dv->name : "???" );
 
                                request->reply->code = FR_CODE_ACCESS_REJECT;
 
@@ -572,10 +572,10 @@ static rlm_rcode_t mod_process(void const *instance, REQUEST *request)
                                unlang = NULL;
                                if (!dv) goto send_reply;
 
-                               unlang = cf_section_find(request->server_cs, "send", dv->alias);
+                               unlang = cf_section_find(request->server_cs, "send", dv->name);
                                if (unlang) goto rerun_nak;
 
-                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->alias);
+                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->name);
                        }
 
                        /*
index f57ee83d404d1a046ef18defd728c57ca9322142..192118b35c8e045681325f05a3330e98c17cd33a 100644 (file)
@@ -90,13 +90,13 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                        }
                }
 
-               unlang = cf_section_find(request->server_cs, "recv", dv->alias);
+               unlang = cf_section_find(request->server_cs, "recv", dv->name);
                if (!unlang) {
-                       REDEBUG("Failed to find 'recv %s' section", dv->alias);
+                       REDEBUG("Failed to find 'recv %s' section", dv->name);
                        return RLM_MODULE_FAIL;
                }
 
-               RDEBUG("Running 'recv %s' from file %s", dv->alias, cf_filename(unlang));
+               RDEBUG("Running 'recv %s' from file %s", dv->name, cf_filename(unlang));
                unlang_interpret_push_section(request, unlang, RLM_MODULE_NOOP, UNLANG_TOP_FRAME);
 
                request->request_state = REQUEST_RECV;
@@ -141,7 +141,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
        nak:
                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
                unlang = NULL;
-               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->alias);
+               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->name);
 
                if (!unlang) goto send_reply;
 
@@ -186,7 +186,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                         */
                        if (request->reply->code == request->packet->code + 1) {
                                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
-                               RWDEBUG("Failed running 'send %s', trying corresponding NAK section.", dv->alias);
+                               RWDEBUG("Failed running 'send %s', trying corresponding NAK section.", dv->name);
 
                                request->reply->code = request->packet->code + 2;
 
@@ -194,10 +194,10 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                                unlang = NULL;
                                if (!dv) goto send_reply;
 
-                               unlang = cf_section_find(request->server_cs, "send", dv->alias);
+                               unlang = cf_section_find(request->server_cs, "send", dv->name);
                                if (unlang) goto rerun_nak;
 
-                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->alias);
+                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->name);
                        }
                        /*
                         *      Else it was already a NAK or something else.
index 21ccbc3cea41a95f8b5439be1124be5e0a4f3cca..12653c682814d2d06de935fb486c19deff2db0ab 100644 (file)
@@ -111,7 +111,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
 
                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
                unlang = NULL;
-               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->alias);
+               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->name);
 
                if (!unlang) goto send_reply;
 
@@ -146,7 +146,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                         */
                        if (request->reply->code != FR_CODE_ACCESS_REJECT) {
                                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
-                               if (dv) RWDEBUG("Failed running 'send %s', trying 'send Access-Reject'", dv->alias);
+                               if (dv) RWDEBUG("Failed running 'send %s', trying 'send Access-Reject'", dv->name);
 
                                request->reply->code = FR_CODE_ACCESS_REJECT;
 
@@ -154,10 +154,10 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                                unlang = NULL;
                                if (!dv) goto send_reply;
 
-                               unlang = cf_section_find(request->server_cs, "send", dv->alias);
+                               unlang = cf_section_find(request->server_cs, "send", dv->name);
                                if (unlang) goto rerun_nak;
 
-                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->alias);
+                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->name);
                        }
                        break;
                }
index bb2c68174578ac4f52f0595b48515dabd0ce4011..ab1fa8162eebc0a1dce1ab4cc6f718336bbaa80b 100644 (file)
@@ -323,7 +323,7 @@ stop_processing:
                        }
 
                        RWDEBUG("Ignoring extra Auth-Type = %s",
-                               fr_dict_enum_alias_by_value(auth_type->da, &vp->data));
+                               fr_dict_enum_name_by_value(auth_type->da, &vp->data));
                }
 
                /*
@@ -361,9 +361,9 @@ stop_processing:
                        goto setup_send;
                }
 
-               unlang = cf_section_find(request->server_cs, "process", dv->alias);
+               unlang = cf_section_find(request->server_cs, "process", dv->name);
                if (!unlang) {
-                       REDEBUG2("No 'process %s' section found: rejecting the user.", dv->alias);
+                       REDEBUG2("No 'process %s' section found: rejecting the user.", dv->name);
                        tacacs_status(request, RLM_MODULE_FAIL);
                        goto setup_send;
                }
index 8d60d21753a53eb3b8c582f4079d92c00b7d425c..7995c3d78efd2cd78772dd95754346eecab7d4ef 100644 (file)
@@ -124,7 +124,7 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
         *      Allow the process module to be specified by
         *      packet type.
         */
-       type_enum = fr_dict_enum_by_alias(attr_packet_type, type_str, -1);
+       type_enum = fr_dict_enum_by_name(attr_packet_type, type_str, -1);
        if (!type_enum) {
                cf_log_err(ci, "Invalid type \"%s\"", type_str);
                return -1;
@@ -144,9 +144,9 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
         *      Setting 'type = foo' means you MUST have at least a
         *      'recv foo' section.
         */
-       if (!cf_section_find(server, "recv", type_enum->alias)) {
+       if (!cf_section_find(server, "recv", type_enum->name)) {
                cf_log_err(ci, "Failed finding 'recv %s {...} section of virtual server %s",
-                          type_enum->alias, cf_section_name2(server));
+                          type_enum->name, cf_section_name2(server));
                return -1;
        }
 
@@ -161,14 +161,14 @@ static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent,
 
        inst->code_allowed[code] = true;
 
-       process_app_cs = cf_section_find(listen_cs, type_enum->alias, NULL);
+       process_app_cs = cf_section_find(listen_cs, type_enum->name, NULL);
 
        /*
         *      Allocate an empty section if one doesn't exist
         *      this is so defaults get parsed.
         */
        if (!process_app_cs) {
-               MEM(process_app_cs = cf_section_alloc(listen_cs, listen_cs, type_enum->alias, NULL));
+               MEM(process_app_cs = cf_section_alloc(listen_cs, listen_cs, type_enum->name, NULL));
        }
 
        /*
index 1329cc2d6a43b4737ca8dadf6590823ca3b01a88..a48b5604bdaf721b2ca6c1a1b389673fe35a2b07 100644 (file)
@@ -69,9 +69,9 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                        return RLM_MODULE_FAIL;
                }
 
-               unlang = cf_section_find(request->server_cs, "recv", dv->alias);
+               unlang = cf_section_find(request->server_cs, "recv", dv->name);
                if (!unlang) {
-                       RWDEBUG("Failed to find 'recv %s' section", dv->alias);
+                       RWDEBUG("Failed to find 'recv %s' section", dv->name);
                        request->reply->code = FR_PACKET_TYPE_VALUE_DO_NOT_RESPOND;
                        goto send_reply;
                }
@@ -116,7 +116,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
 
                dv = fr_dict_enum_by_value(attr_packet_type, fr_box_uint32(request->reply->code));
                unlang = NULL;
-               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->alias);
+               if (dv) unlang = cf_section_find(request->server_cs, "send", dv->name);
 
                if (!unlang) goto send_reply;
 
@@ -152,7 +152,7 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                        if (request->reply->code != FR_PACKET_TYPE_VALUE_DO_NOT_RESPOND) {
                                dv = fr_dict_enum_by_value(attr_packet_type,
                                                           fr_box_uint32(request->reply->code));
-                               RWDEBUG("Failed running 'send %s', trying 'send Do-Not-Respond'.", dv->alias);
+                               RWDEBUG("Failed running 'send %s', trying 'send Do-Not-Respond'.", dv->name);
 
                                request->reply->code = FR_PACKET_TYPE_VALUE_DO_NOT_RESPOND;
 
@@ -161,10 +161,10 @@ static rlm_rcode_t mod_process(UNUSED void const *instance, REQUEST *request)
                                unlang = NULL;
                                if (!dv) goto send_reply;
 
-                               unlang = cf_section_find(request->server_cs, "send", dv->alias);
+                               unlang = cf_section_find(request->server_cs, "send", dv->name);
                                if (unlang) goto rerun_nak;
 
-                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->alias);
+                               RWDEBUG("Not running 'send %s' section as it does not exist", dv->name);
                        }
                        break;
                }
index 1914aae9b81db11ffb53a993ab8095c28cf55c84..89ae47b95e4edb7b6dd8f701c0b54b91c82b6338 100644 (file)
@@ -201,11 +201,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        inst->name = cf_section_name2(conf);
        if (!inst->name) inst->name = cf_section_name1(conf);
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", attr_auth_type->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
        rad_assert(inst->auth_type);
 
        return 0;
index 92c2fb5d6d132c898cbd39b3b67903f1bca8d204..3ab6307e1eb053c7ca30e86500e3b242cb3e7069 100644 (file)
@@ -278,7 +278,7 @@ static int detail_write(FILE *out, rlm_detail_t const *inst, REQUEST *request, R
                 */
                if (is_radius_code(packet->code)) {
                        WRITE("\tPacket-Type = %s\n",
-                             fr_dict_enum_alias_by_value(attr_packet_type, fr_box_uint32(packet->code)));
+                             fr_dict_enum_name_by_value(attr_packet_type, fr_box_uint32(packet->code)));
                } else {
                        WRITE("\tPacket-Type = %u\n", packet->code);
                }
index 15fbf54d8eea0c32f667d9717f3f1cb7a114ba70..f6db40f84e6f3551f89b564c5cc7408e3e3b33fa 100644 (file)
@@ -585,11 +585,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        if (!name) name = cf_section_name1(conf);
        inst->name = name;
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", attr_auth_type->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
        rad_assert(inst->auth_type);
 
        return 0;
index 1cdf9bdfdbc5edff137149c86656ed8156c56f4b..7fe9602f1f57b6ede6b5375735d61202a8f87bf3 100644 (file)
@@ -996,11 +996,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *cs)
        inst->name = cf_section_name2(cs);
        if (!inst->name) inst->name = "eap";
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", inst->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
        rad_assert(inst->name);
 
        /*
index 79c120faed53b08b47504ef4e32e27e198ee7b7f..ba49bfd60f53c522c65df174841c9713ddce62f4 100644 (file)
@@ -86,11 +86,11 @@ static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *paren
 {
        char const      *auth_type = cf_pair_value(cf_item_to_pair(ci));
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, auth_type) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, auth_type) < 0) {
                cf_log_err(ci, "Failed adding %s alias", attr_auth_type->name);
                return -1;
        }
-       *((fr_dict_enum_t **)out) = fr_dict_enum_by_alias(attr_auth_type, auth_type, -1);
+       *((fr_dict_enum_t **)out) = fr_dict_enum_by_name(attr_auth_type, auth_type, -1);
 
        return 0;
 }
@@ -166,7 +166,7 @@ static rlm_rcode_t mod_process(void *instance, void *thread, REQUEST *request)
        fr_pair_value_bstrncpy(vp, eap_round->response->type.data, eap_round->response->type.length);
        vp->vp_tainted = true;
 
-       unlang = cf_section_find(request->server_cs, "authenticate", inst->auth_type->alias);
+       unlang = cf_section_find(request->server_cs, "authenticate", inst->auth_type->name);
        if (!unlang) {
                /*
                 *      Call the authenticate section of the *current* virtual server.
index 0c193f21d27e39c11b3787dea38501918a9969dc..a76ab5bc453867843ca008d771ae06b1a4a88142 100644 (file)
@@ -134,11 +134,11 @@ static int auth_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *paren
 {
        char const      *auth_type = cf_pair_value(cf_item_to_pair(ci));
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, auth_type) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, auth_type) < 0) {
                cf_log_err(ci, "Failed adding %s alias", attr_auth_type->name);
                return -1;
        }
-       *((fr_dict_enum_t **)out) = fr_dict_enum_by_alias(attr_auth_type, auth_type, -1);
+       *((fr_dict_enum_t **)out) = fr_dict_enum_by_name(attr_auth_type, auth_type, -1);
 
        return 0;
 }
@@ -749,7 +749,7 @@ packet_ready:
        /*
         *      This is a wild & crazy hack.
         */
-       unlang = cf_section_find(request->server_cs, "authenticate", inst->auth_type->alias);
+       unlang = cf_section_find(request->server_cs, "authenticate", inst->auth_type->name);
        if (!unlang) {
                rcode = process_authenticate(inst->auth_type->value->vb_uint32, request);
        } else {
index afb11bdb9236fd4fec852998a13fc7fa0c24cae3..2456f5a30eec9fce1eaf85643f2a0d463ae983be 100644 (file)
@@ -2188,11 +2188,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        if (!name) name = cf_section_name1(conf);
        inst->name = name;
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", attr_auth_type->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
        rad_assert(inst->auth_type);
 
        xlat_register(inst, inst->name, mschap_xlat, NULL, NULL, 0, XLAT_DEFAULT_BUF_LEN, true);
index 30c4a18c01e9a1e831194acf46ec7842dff081df..f8e727d5aaa0ddbb5ff9b484fcc5283394a82898 100644 (file)
@@ -517,11 +517,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        inst->name = cf_section_name2(conf);
        if (!inst->name) inst->name = cf_section_name1(conf);
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", attr_auth_type->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
        rad_assert(inst->auth_type);
 
        return 0;
index 581800283d0b6da4858107e4d4f6e938ab30d7d1..1a7857692380cc17aa52df1c719d4a986327765d 100644 (file)
@@ -922,11 +922,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        if (!name) name = cf_section_name1(conf);
        inst->name = name;
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", attr_auth_type->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
        rad_assert(inst->auth_type);
 
        return 0;
index 3bfd7a45e8b095d2abeb94fd37a0795d9e0d0156..6a3c990f943ff41b36df79d7ad182cf54714dcf6 100644 (file)
@@ -198,7 +198,7 @@ static int type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
         *      Allow the process module to be specified by
         *      packet type.
         */
-       type_enum = fr_dict_enum_by_alias(attr_packet_type, type_str, -1);
+       type_enum = fr_dict_enum_by_name(attr_packet_type, type_str, -1);
        if (!type_enum) {
        invalid_code:
                cf_log_err(ci, "Unknown or invalid RADIUS packet type '%s'", type_str);
@@ -287,7 +287,7 @@ static int status_check_type_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED voi
         *      Allow the process module to be specified by
         *      packet type.
         */
-       type_enum = fr_dict_enum_by_alias(attr_packet_type, type_str, -1);
+       type_enum = fr_dict_enum_by_name(attr_packet_type, type_str, -1);
        if (!type_enum) {
        invalid_code:
                cf_log_err(ci, "Unknown or invalid RADIUS packet type '%s'", type_str);
index 391e3eb9350d1f98d92497a22739dc3ee24799e1..88b504355423fc3c6dd6a04b248e6f72a6174433 100644 (file)
@@ -217,9 +217,9 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                return RLM_MODULE_NOOP;
        }
 
-       cs = cf_section_find(inst->cs, dv->alias, NULL);
+       cs = cf_section_find(inst->cs, dv->name, NULL);
        if (!cs) {
-               RDEBUG2("No subsection %s", dv->alias);
+               RDEBUG2("No subsection %s", dv->name);
                return RLM_MODULE_NOOP;
        }
 
index 115a3a9ecf7187e616ae417297e29fd64d5b4943..117c449503c7455776e5fba97bd340d6f9247bb4 100644 (file)
@@ -335,11 +335,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        inst->name = cf_section_name2(conf);
        if (!inst->name) inst->name = cf_section_name1(conf);
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", inst->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
 
        if (inst->group_attribute) {
                group_attribute = inst->group_attribute;
index a67779fc8b38fca709dd2e1879d2372be4496381..9c78ee989d9809f50092241ab5f75bc984cf3f46 100644 (file)
@@ -165,11 +165,11 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
        }
 #endif
 
-       if (fr_dict_enum_add_alias_next(attr_auth_type, inst->name) < 0) {
+       if (fr_dict_enum_add_name_next(attr_auth_type, inst->name) < 0) {
                PERROR("Failed adding %s alias", inst->name);
                return -1;
        }
-       inst->auth_type = fr_dict_enum_by_alias(attr_auth_type, inst->name, -1);
+       inst->auth_type = fr_dict_enum_by_name(attr_auth_type, inst->name, -1);
 
        if (!cf_section_name2(conf)) return 0;
 
index 856efdb9c1e2006ded7293a85a9e61b4c74eeb92..170f7e0b5afb9d00845ca0b78c21e1e106738705 100644 (file)
@@ -556,7 +556,7 @@ int fr_dhcpv4_global_init(void)
                }
                value.vb_uint8 = i;
 
-               if (fr_dict_enum_add_alias(attr_dhcp_parameter_request_list, attr->name, &value, true, false) < 0) {
+               if (fr_dict_enum_add_name(attr_dhcp_parameter_request_list, attr->name, &value, true, false) < 0) {
                        return -1;
                }
        }
index e71014aec5cb3741746003ffcabebd5658482666..6a86875444ac0afde266616e62c7ba2308610c07 100644 (file)
@@ -466,7 +466,7 @@ int fr_dhcpv6_global_init(void)
 
                value.vb_uint16 = child->attr;
 
-               if (fr_dict_enum_add_alias(attr_option_request, child->name, &value, true, false) < 0) {
+               if (fr_dict_enum_add_name(attr_option_request, child->name, &value, true, false) < 0) {
                        fr_dict_autofree(libfreeradius_dhcpv6_dict);
                        return -1;
                }
index c69eb96391a4d3a738488d6b69e9e56d687283eb..4271f9c791d61bb1c714179173c67a1f15645705 100644 (file)
@@ -109,7 +109,7 @@ char const *tacacs_packet_code(RADIUS_PACKET const * const packet)
        dv = fr_dict_enum_by_value(attr_tacacs_packet_type, fr_box_uint32(type));
        if (!dv) return NULL;
 
-       return dv->alias;
+       return dv->name;
 }
 
 uint32_t tacacs_session_id(RADIUS_PACKET const * const packet)