]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
s/vp_map_t/map_t/g
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 1 Nov 2020 00:03:31 +0000 (19:03 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 1 Nov 2020 00:03:31 +0000 (19:03 -0500)
41 files changed:
src/bin/unit_test_map.c
src/bin/unit_test_module.c
src/lib/ldap/base.h
src/lib/ldap/map.c
src/lib/redis/base.h
src/lib/redis/redis.c
src/lib/server/cond.h
src/lib/server/cond_eval.c
src/lib/server/cond_tokenize.c
src/lib/server/map.c
src/lib/server/map.h
src/lib/server/map_async.c
src/lib/server/map_proc.c
src/lib/server/map_proc.h
src/lib/server/map_proc_priv.h
src/lib/server/modpriv.h
src/lib/server/tmpl.h
src/lib/unlang/compile.c
src/lib/unlang/map.c
src/lib/unlang/map_priv.h
src/lib/unlang/switch.c
src/lib/unlang/xlat_builtin.c
src/lib/util/pair_print.c
src/modules/proto_ldap_sync/sync.h
src/modules/rlm_cache/drivers/rlm_cache_redis/rlm_cache_redis.c
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_cache/rlm_cache.h
src/modules/rlm_cache/serialize.c
src/modules/rlm_client/rlm_client.c
src/modules/rlm_couchbase/mod.c
src/modules/rlm_couchbase/rlm_couchbase.c
src/modules/rlm_csv/rlm_csv.c
src/modules/rlm_json/rlm_json.c
src/modules/rlm_ldap/rlm_ldap.c
src/modules/rlm_ldap/rlm_ldap.h
src/modules/rlm_radius/rlm_radius.c
src/modules/rlm_radius/rlm_radius.h
src/modules/rlm_radius/rlm_radius_udp.c
src/modules/rlm_redis_ippool/rlm_redis_ippool.c
src/modules/rlm_smtp/rlm_smtp.c
src/modules/rlm_sql/rlm_sql.c

index ab93dfed8ffbd89af3085abfd076a7571cc4f0ea..78f654afe111a74feac9445174bc270ff3f2b08b 100644 (file)
@@ -75,7 +75,7 @@ static int process_file(char const *filename)
        int             rcode;
        char const      *name1, *name2;
        CONF_SECTION    *cs;
-       vp_map_t        *head, *map;
+       map_t   *head, *map;
        char            buffer[8192];
 
        main_config_t   *config;
index 006adb07ca50cdf6442929b83f68b91c2075c623..b40526876c3912b255a8f5dfaf7a2f136d3a8f8c 100644 (file)
@@ -444,7 +444,7 @@ static bool do_xlats(char const *filename, FILE *fp)
  *     Verify the result of the map.
  */
 static int map_proc_verify(CONF_SECTION *cs, UNUSED void *mod_inst, UNUSED void *proc_inst,
-                          tmpl_t const *src, UNUSED vp_map_t const *maps)
+                          tmpl_t const *src, UNUSED map_t const *maps)
 {
        if (!src) {
                cf_log_err(cs, "Missing source");
@@ -456,7 +456,7 @@ static int map_proc_verify(CONF_SECTION *cs, UNUSED void *mod_inst, UNUSED void
 }
 
 static rlm_rcode_t mod_map_proc(UNUSED void *mod_inst, UNUSED void *proc_inst, UNUSED request_t *request,
-                               UNUSED fr_value_box_t **src, UNUSED vp_map_t const *maps)
+                               UNUSED fr_value_box_t **src, UNUSED map_t const *maps)
 {
        return RLM_MODULE_FAIL;
 }
index c01215665bdd79c1b0be8718f0ea87d40b943877..f0454e1a6ad437b026eef5c19586d5f700ad6050 100644 (file)
@@ -317,7 +317,7 @@ typedef struct {
  * Used to store the array of attributes we'll be querying for.
  */
 typedef struct {
-       vp_map_t const *maps;                           //!< Head of list of maps we expanded the RHS of.
+       map_t const *maps;                              //!< Head of list of maps we expanded the RHS of.
        char const      *attrs[LDAP_MAX_ATTRMAP + LDAP_MAP_RESERVED + 1]; //!< Reserve some space for access attributes
                                                        //!< and NULL termination.
        TALLOC_CTX      *ctx;                           //!< Context to allocate new attributes in.
@@ -469,11 +469,11 @@ char const        *fr_ldap_edir_errstr(int code);
  *     map.c - Attribute mapping code.
  */
 int            fr_ldap_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request,
-                                    vp_map_t const *map, void *uctx);
+                                    map_t const *map, void *uctx);
 
-int            fr_ldap_map_verify(vp_map_t *map, void *instance);
+int            fr_ldap_map_verify(map_t *map, void *instance);
 
-int            fr_ldap_map_expand(fr_ldap_map_exp_t *expanded, request_t *request, vp_map_t const *maps);
+int            fr_ldap_map_expand(fr_ldap_map_exp_t *expanded, request_t *request, map_t const *maps);
 
 int            fr_ldap_map_do(request_t *request, fr_ldap_connection_t *conn,
                               char const *valuepair_attr, fr_ldap_map_exp_t const *expanded, LDAPMessage *entry);
index 7d77aef168eb3c6d19bf59544c73e22bdebb7ae6..b14549867c34223b03ca84aa9d3a938c14e5ef97 100644 (file)
@@ -36,7 +36,7 @@ USES_APPLE_DEPRECATED_API
  *
  * @see map_to_vp
  */
-int fr_ldap_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, vp_map_t const *map, void *uctx)
+int fr_ldap_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, map_t const *map, void *uctx)
 {
        fr_ldap_result_t        *self = uctx;
        fr_pair_t               *head = NULL, *vp;
@@ -59,7 +59,7 @@ int fr_ldap_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, v
         */
        case TMPL_TYPE_LIST:
                for (i = 0; i < self->count; i++) {
-                       vp_map_t        *attr = NULL;
+                       map_t   *attr = NULL;
                        char            *attr_str;
 
                        tmpl_rules_t    lhs_rules = {
@@ -180,7 +180,7 @@ int fr_ldap_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, v
        return 0;
 }
 
-int fr_ldap_map_verify(vp_map_t *map, UNUSED void *instance)
+int fr_ldap_map_verify(map_t *map, UNUSED void *instance)
 {
        /*
         *      Destinations where we can put the fr_pair_ts we
@@ -250,9 +250,9 @@ int fr_ldap_map_verify(vp_map_t *map, UNUSED void *instance)
  *     - 0 on success.
  *     - -1 on failure.
  */
-int fr_ldap_map_expand(fr_ldap_map_exp_t *expanded, request_t *request, vp_map_t const *maps)
+int fr_ldap_map_expand(fr_ldap_map_exp_t *expanded, request_t *request, map_t const *maps)
 {
-       vp_map_t const  *map;
+       map_t const     *map;
        unsigned int    total = 0;
 
        TALLOC_CTX      *ctx = NULL;
@@ -304,7 +304,7 @@ int fr_ldap_map_expand(fr_ldap_map_exp_t *expanded, request_t *request, vp_map_t
 int fr_ldap_map_do(request_t *request, fr_ldap_connection_t *conn,
                   char const *valuepair_attr, fr_ldap_map_exp_t const *expanded, LDAPMessage *entry)
 {
-       vp_map_t const          *map;
+       map_t const             *map;
        unsigned int            total = 0;
        int                     applied = 0;    /* How many maps have been applied to the current request */
 
@@ -362,7 +362,7 @@ int fr_ldap_map_do(request_t *request, fr_ldap_connection_t *conn,
                count = ldap_count_values_len(values);
 
                for (i = 0; i < count; i++) {
-                       vp_map_t        *attr;
+                       map_t   *attr;
                        char            *value;
 
                        tmpl_rules_t parse_rules = {
index c484c188cd7c917f2917e462dbeb9aaee2a65753..5e0286d4a78ae92d8eb4679092d484a1466a4340 100644 (file)
@@ -143,10 +143,10 @@ void                      fr_redis_reply_print(fr_log_lvl_t lvl, redisReply *reply, request_t *requ
 int                    fr_redis_reply_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, redisReply *reply,
                                                    fr_type_t dst_type, fr_dict_attr_t const *dst_enumv);
 
-int                    fr_redis_reply_to_map(TALLOC_CTX *ctx, vp_map_t **out,
+int                    fr_redis_reply_to_map(TALLOC_CTX *ctx, map_t **out,
                                              request_t *request, redisReply *key, redisReply *op, redisReply *value);
 
-int                    fr_redis_tuple_from_map(TALLOC_CTX *pool, char const *out[], size_t out_len[], vp_map_t *map);
+int                    fr_redis_tuple_from_map(TALLOC_CTX *pool, char const *out[], size_t out_len[], map_t *map);
 
 fr_redis_rcode_t       fr_redis_get_version(char *out, size_t out_len, fr_redis_conn_t *conn);
 
index 731478e1fb45948d936b4e24c95813effb606e56..4d39565e8dee244fd4467de30cad5e3d2c1a34f3 100644 (file)
@@ -262,10 +262,10 @@ int fr_redis_reply_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, redisReply
  *     - 0 on success.
  *     - -1 on failure.
  */
-int fr_redis_reply_to_map(TALLOC_CTX *ctx, vp_map_t **out, request_t *request,
+int fr_redis_reply_to_map(TALLOC_CTX *ctx, map_t **out, request_t *request,
                          redisReply *key, redisReply *op, redisReply *value)
 {
-       vp_map_t        *map = NULL;
+       map_t   *map = NULL;
        ssize_t         slen;
 
        *out = NULL;
@@ -288,7 +288,7 @@ int fr_redis_reply_to_map(TALLOC_CTX *ctx, vp_map_t **out, request_t *request,
        RDEBUG3("Got op    : %s", op->str);
        RDEBUG3("Got value : %pV", fr_box_strvalue_len(value->str, value->len));
 
-       MEM(map = talloc_zero(ctx, vp_map_t));
+       MEM(map = talloc_zero(ctx, map_t));
        slen = tmpl_afrom_attr_str(map, NULL, &map->lhs, key->str, &(tmpl_rules_t){ .dict_def = request->dict });
        if (slen < 0) {
                REMARKER(key->str, -slen, "%s", fr_strerror());
@@ -351,7 +351,7 @@ int fr_redis_reply_to_map(TALLOC_CTX *ctx, vp_map_t **out, request_t *request,
  *     0 on success.
  *     -1 on failure.
  */
-int fr_redis_tuple_from_map(TALLOC_CTX *pool, char const *out[], size_t out_len[], vp_map_t *map)
+int fr_redis_tuple_from_map(TALLOC_CTX *pool, char const *out[], size_t out_len[], map_t *map)
 {
        char            *new;
 
index 1a70e3d87adc6dc973b8fc994a5b4c1ac66d83b7..90fcc7ab5a0a13c67b03c7245ea3355e17ddb6c6 100644 (file)
@@ -84,7 +84,7 @@ struct fr_cond_s {
                                                ///< is derived from.
 
        union {
-               vp_map_t                *map;           //!< Binary expression.
+               map_t           *map;           //!< Binary expression.
                tmpl_t                  *vpt;           //!< Unary expression.
                fr_cond_t               *child;         //!< Nested condition.
                rlm_rcode_t             rcode;          //!< Rcode check.   We handle this outside of
index 88b07a576416f9b7765b6dd53995ac407e7563fb..9f2a0c8fbcf1b3aeeabc597b7f984c1b8b28e18c 100644 (file)
@@ -205,7 +205,7 @@ static int cond_do_regex(request_t *request, fr_cond_t const *c,
                         fr_value_box_t const *lhs,
                         fr_value_box_t const *rhs)
 {
-       vp_map_t const *map = c->data.map;
+       map_t const *map = c->data.map;
 
        ssize_t         slen;
        uint32_t        subcaptures;
@@ -311,7 +311,7 @@ static void cond_print_operands(fr_value_box_t const *lhs, fr_value_box_t const
  */
 static int cond_cmp_values(request_t *request, fr_cond_t const *c, fr_value_box_t const *lhs, fr_value_box_t const *rhs)
 {
-       vp_map_t const *map = c->data.map;
+       map_t const *map = c->data.map;
        int rcode;
 
 #ifdef WITH_EVAL_DEBUG
@@ -415,7 +415,7 @@ done:
  */
 static int cond_normalise_and_cmp(request_t *request, fr_cond_t const *c, fr_value_box_t const *lhs)
 {
-       vp_map_t const          *map = c->data.map;
+       map_t const             *map = c->data.map;
 
        int                     rcode;
 
@@ -632,7 +632,7 @@ int cond_eval_map(request_t *request, UNUSED int depth, fr_cond_t const *c)
 {
        int rcode = 0;
 
-       vp_map_t const *map = c->data.map;
+       map_t const *map = c->data.map;
 
        EVAL_DEBUG(">>> MAP TYPES LHS: %s, RHS: %s",
                   fr_table_str_by_value(tmpl_type_table, map->lhs->type, "???"),
index 4558aa49bd3cb8aa11486951fe24bb1321fb0a62..01a1b6f266c9a9d3b936df4c9e2d54adb2aae29c 100644 (file)
@@ -1453,7 +1453,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **out,
        fr_sbuff_adv_past_whitespace(&our_in, SIZE_MAX);
 
        {
-               vp_map_t        *map;
+               map_t   *map;
                tmpl_t  *rhs;
 
                /*
@@ -1487,7 +1487,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **out,
                        goto error;
                }
 
-               MEM(c->data.map = map = talloc(c, vp_map_t));
+               MEM(c->data.map = map = talloc(c, map_t));
 
                /*
                 *      Grab the RHS
@@ -1505,7 +1505,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **out,
                 */
                if (cond_forbid_groups(rhs, &our_in, &m_rhs) < 0) goto error;
 
-               *map = (vp_map_t) {
+               *map = (map_t) {
                        .ci = cf_section_to_item(cs),
                        .lhs = lhs,
                        .op = op,
index a161c827e4b2f55aa9894e88866b8a1b36486d6f..fadd3ca3dfdfec850e933d4897f313148ce2900a 100644 (file)
@@ -44,7 +44,7 @@ RCSID("$Id$")
 #include <ctype.h>
 
 #ifdef DEBUG_MAP
-static void map_dump(request_t *request, vp_map_t const *map)
+static void map_dump(request_t *request, map_t const *map)
 {
        RDEBUG2(">>> MAP TYPES LHS: %s, RHS: %s",
                fr_table_str_by_value(tmpl_type_table, map->lhs->type, "???"),
@@ -56,9 +56,9 @@ static void map_dump(request_t *request, vp_map_t const *map)
 }
 #endif
 
-static inline vp_map_t *map_alloc(TALLOC_CTX *ctx)
+static inline map_t *map_alloc(TALLOC_CTX *ctx)
 {
-       return talloc_zero(ctx, vp_map_t);
+       return talloc_zero(ctx, map_t);
 }
 
 /** re-parse a map where the lhs is an unknown attribute.
@@ -68,7 +68,7 @@ static inline vp_map_t *map_alloc(TALLOC_CTX *ctx)
  * @param rhs_quote quotation type around rhs.
  * @param rhs string to re-parse.
  */
-bool map_cast_from_hex(vp_map_t *map, fr_token_t rhs_quote, char const *rhs)
+bool map_cast_from_hex(map_t *map, fr_token_t rhs_quote, char const *rhs)
 {
        size_t                  len;
        uint8_t                 *ptr;
@@ -171,7 +171,7 @@ bool map_cast_from_hex(vp_map_t *map, fr_token_t rhs_quote, char const *rhs)
        return true;
 }
 
-/** Convert CONFIG_PAIR (which may contain refs) to vp_map_t.
+/** Convert CONFIG_PAIR (which may contain refs) to map_t.
  *
  * Treats the left operand as an attribute reference
  * @verbatim<request>.<list>.<attribute>@endverbatim
@@ -183,18 +183,18 @@ bool map_cast_from_hex(vp_map_t *map, fr_token_t rhs_quote, char const *rhs)
  * Return must be freed with talloc_free
  *
  * @param[in] ctx              for talloc.
- * @param[in] out              Where to write the pointer to the new #vp_map_t.
+ * @param[in] out              Where to write the pointer to the new #map_t.
  * @param[in] cp               to convert to map.
  * @param[in] lhs_rules                rules for parsing LHS attribute references.
  * @param[in] rhs_rules                rules for parsing RHS attribute references.
  * @return
- *     - #vp_map_t if successful.
+ *     - #map_t if successful.
  *     - NULL on error.
  */
-int map_afrom_cp(TALLOC_CTX *ctx, vp_map_t **out, CONF_PAIR *cp,
+int map_afrom_cp(TALLOC_CTX *ctx, map_t **out, CONF_PAIR *cp,
                 tmpl_rules_t const *lhs_rules, tmpl_rules_t const *rhs_rules)
 {
-       vp_map_t        *map;
+       map_t   *map;
        char const      *attr, *value, *marker_subject;
        ssize_t         slen;
        fr_token_t      type;
@@ -203,7 +203,7 @@ int map_afrom_cp(TALLOC_CTX *ctx, vp_map_t **out, CONF_PAIR *cp,
 
        if (!cp) return -1;
 
-       MEM(map = talloc_zero(ctx, vp_map_t));
+       MEM(map = talloc_zero(ctx, map_t));
        map->op = cf_pair_operator(cp);
        map->ci = cf_pair_to_item(cp);
 
@@ -319,7 +319,7 @@ error:
  *     - 0 on success.
  *     - -1 on failure.
  */
-int map_afrom_cs(TALLOC_CTX *ctx, vp_map_t **out, CONF_SECTION *cs,
+int map_afrom_cs(TALLOC_CTX *ctx, map_t **out, CONF_SECTION *cs,
                 tmpl_rules_t const *lhs_rules, tmpl_rules_t const *rhs_rules,
                 map_validate_t validate, void *uctx,
                 unsigned int max)
@@ -330,7 +330,7 @@ int map_afrom_cs(TALLOC_CTX *ctx, vp_map_t **out, CONF_SECTION *cs,
        CONF_PAIR       *cp;
 
        unsigned int    total = 0;
-       vp_map_t        **tail, *map;
+       map_t   **tail, *map;
        TALLOC_CTX      *parent;
 
        tmpl_rules_t    our_lhs_rules = *lhs_rules;     /* Mutable copy of the destination */
@@ -490,7 +490,7 @@ int map_afrom_cs(TALLOC_CTX *ctx, vp_map_t **out, CONF_SECTION *cs,
 
 }
 
-/** Convert strings to #vp_map_t
+/** Convert strings to #map_t
  *
  * Treatment of operands depends on quotation, barewords are treated
  * as attribute references, double quoted values are treated as
@@ -509,18 +509,18 @@ int map_afrom_cs(TALLOC_CTX *ctx, vp_map_t **out, CONF_SECTION *cs,
  * @param[in] rhs_quote                type of quoting aounrd the RHS string.
  * @param[in] rhs_rules                rules that control parsing of the RHS string.
  * @return
- *     - #vp_map_t if successful.
+ *     - #map_t if successful.
  *     - NULL on error.
  */
-int map_afrom_fields(TALLOC_CTX *ctx, vp_map_t **out,
+int map_afrom_fields(TALLOC_CTX *ctx, map_t **out,
                     char const *lhs, fr_token_t lhs_quote, tmpl_rules_t const *lhs_rules,
                     fr_token_t op,
                     char const *rhs, fr_token_t rhs_quote, tmpl_rules_t const *rhs_rules)
 {
        ssize_t slen;
-       vp_map_t *map;
+       map_t *map;
 
-       map = talloc_zero(ctx, vp_map_t);
+       map = talloc_zero(ctx, map_t);
        slen = tmpl_afrom_substr(map, &map->lhs,
                                 &FR_SBUFF_IN(lhs, strlen(lhs)),
                                 lhs_quote,
@@ -570,18 +570,18 @@ int map_afrom_fields(TALLOC_CTX *ctx, vp_map_t **out,
  * @param[in] steal_rhs_buffs  Whether we attempt to save allocs by stealing the buffers
  *                             from the rhs #fr_value_box_t.
  * @return
- *     - #vp_map_t if successful.
+ *     - #map_t if successful.
  *     - NULL on error.
  */
-int map_afrom_value_box(TALLOC_CTX *ctx, vp_map_t **out,
+int map_afrom_value_box(TALLOC_CTX *ctx, map_t **out,
                        char const *lhs, fr_token_t lhs_quote, tmpl_rules_t const *lhs_rules,
                        fr_token_t op,
                        fr_value_box_t *rhs, bool steal_rhs_buffs)
 {
        ssize_t slen;
-       vp_map_t *map;
+       map_t *map;
 
-       map = talloc_zero(ctx, vp_map_t);
+       map = talloc_zero(ctx, map_t);
 
        slen = tmpl_afrom_substr(map, &map->lhs,
                                 &FR_SBUFF_IN(lhs, strlen(lhs)),
@@ -607,7 +607,7 @@ int map_afrom_value_box(TALLOC_CTX *ctx, vp_map_t **out,
 /** Convert a value pair string to valuepair map
  *
  * Takes a valuepair string with list and request qualifiers and converts it into a
- * #vp_map_t.
+ * #map_t.
  *
  * Attribute string is in the format (where @verbatim <qu> @endverbatim is a quotation char ['"]):
  @verbatim
@@ -623,14 +623,14 @@ int map_afrom_value_box(TALLOC_CTX *ctx, vp_map_t **out,
  *     - 0 on success.
  *     - < 0 on error.
  */
-int map_afrom_attr_str(TALLOC_CTX *ctx, vp_map_t **out, char const *vp_str,
+int map_afrom_attr_str(TALLOC_CTX *ctx, map_t **out, char const *vp_str,
                       tmpl_rules_t const *lhs_rules, tmpl_rules_t const *rhs_rules)
 {
        char const *p = vp_str;
        fr_token_t quote;
 
        fr_pair_t_RAW raw;
-       vp_map_t *map = NULL;
+       map_t *map = NULL;
 
        quote = gettoken(&p, raw.l_opand, sizeof(raw.l_opand), false);
        switch (quote) {
@@ -680,11 +680,11 @@ int map_afrom_attr_str(TALLOC_CTX *ctx, vp_map_t **out, char const *vp_str,
  *     - 0 on success.
  *     - -1 on failure.
  */
-int map_afrom_vp(TALLOC_CTX *ctx, vp_map_t **out, fr_pair_t *vp, tmpl_rules_t const *rules)
+int map_afrom_vp(TALLOC_CTX *ctx, map_t **out, fr_pair_t *vp, tmpl_rules_t const *rules)
 {
        char buffer[256];
 
-       vp_map_t *map;
+       map_t *map;
 
        map = map_alloc(ctx);
        if (!map) {
@@ -731,10 +731,10 @@ int map_afrom_vp(TALLOC_CTX *ctx, vp_map_t **out, fr_pair_t *vp, tmpl_rules_t co
        return 0;
 }
 
-static void map_sort_split(vp_map_t *source, vp_map_t **front, vp_map_t **back)
+static void map_sort_split(map_t *source, map_t **front, map_t **back)
 {
-       vp_map_t *fast;
-       vp_map_t *slow;
+       map_t *fast;
+       map_t *slow;
 
        /*
         *      Stopping condition - no more elements left to split
@@ -766,9 +766,9 @@ static void map_sort_split(vp_map_t *source, vp_map_t **front, vp_map_t **back)
        slow->next = NULL;
 }
 
-static vp_map_t *map_sort_merge(vp_map_t *a, vp_map_t *b, fr_cmp_t cmp)
+static map_t *map_sort_merge(map_t *a, map_t *b, fr_cmp_t cmp)
 {
-       vp_map_t *result = NULL;
+       map_t *result = NULL;
 
        if (!a) return b;
        if (!b) return a;
@@ -787,16 +787,16 @@ static vp_map_t *map_sort_merge(vp_map_t *a, vp_map_t *b, fr_cmp_t cmp)
        return result;
 }
 
-/** Sort a linked list of #vp_map_t using merge sort
+/** Sort a linked list of #map_t using merge sort
  *
- * @param[in,out] maps List of #vp_map_t to sort.
+ * @param[in,out] maps List of #map_t to sort.
  * @param[in] cmp to sort with
  */
-void map_sort(vp_map_t **maps, fr_cmp_t cmp)
+void map_sort(map_t **maps, fr_cmp_t cmp)
 {
-       vp_map_t *head = *maps;
-       vp_map_t *a;
-       vp_map_t *b;
+       map_t *head = *maps;
+       map_t *a;
+       map_t *b;
 
        /*
         *      If there's 0-1 elements it must already be sorted.
@@ -829,7 +829,7 @@ void map_sort(vp_map_t **maps, fr_cmp_t cmp)
  *     - 0 on success.
  *     - -1 on failure.
  */
-static int map_exec_to_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, vp_map_t const *map)
+static int map_exec_to_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, map_t const *map)
 {
        int result;
        char *expanded = NULL;
@@ -909,7 +909,7 @@ static int map_exec_to_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request,
  *     - 0 on success.
  *     - -1 on failure.
  */
-int map_to_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, vp_map_t const *map, UNUSED void *uctx)
+int map_to_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, map_t const *map, UNUSED void *uctx)
 {
        int             rcode = 0;
        fr_pair_t       *vp = NULL, *found = NULL, *n;
@@ -1136,9 +1136,9 @@ do {\
        } \
 } while (0)
 
-/** Convert #vp_map_t to #fr_pair_t (s) and add them to a #request_t.
+/** Convert #map_t to #fr_pair_t (s) and add them to a #request_t.
  *
- * Takes a single #vp_map_t, resolves request and list identifiers
+ * Takes a single #map_t, resolves request and list identifiers
  * to pointers in the current request, then attempts to retrieve module
  * specific value(s) using callback, and adds the resulting values to the
  * correct request/list.
@@ -1153,7 +1153,7 @@ do {\
  *     - -2 in the source attribute wasn't valid.
  *     - 0 on success.
  */
-int map_to_request(request_t *request, vp_map_t const *map, radius_map_getvalue_t func, void *ctx)
+int map_to_request(request_t *request, map_t const *map, radius_map_getvalue_t func, void *ctx)
 {
        int                     rcode = 0;
        int                     num;
@@ -1164,7 +1164,7 @@ int map_to_request(request_t *request, vp_map_t const *map, radius_map_getvalue_
 
        bool                    found = false;
 
-       vp_map_t                exp_map;
+       map_t           exp_map;
        tmpl_t                  *exp_lhs;
        request_ref_t           request_ref;
        pair_list_t             list_ref;
@@ -1564,7 +1564,7 @@ finish:
  *     - The number of bytes written to the out buffer.
  *     - A number >= outlen if truncation has occurred.
  */
-ssize_t map_print(fr_sbuff_t *out, vp_map_t const *map)
+ssize_t map_print(fr_sbuff_t *out, map_t const *map)
 {
        fr_sbuff_t      our_out = FR_SBUFF_NO_ADVANCE(out);
 
@@ -1610,7 +1610,7 @@ ssize_t map_print(fr_sbuff_t *out, vp_map_t const *map)
 /*
  *     Debug print a map / VP
  */
-void map_debug_log(request_t *request, vp_map_t const *map, fr_pair_t const *vp)
+void map_debug_log(request_t *request, map_t const *map, fr_pair_t const *vp)
 {
        char *rhs = NULL, *value = NULL;
        char buffer[256];
index 812e6e599fd38357f2167f1752fb48634faf3267..007eabbb7d3c2567d279c137ef510050ef0aa950 100644 (file)
@@ -30,7 +30,7 @@ RCSIDH(map_h, "$Id$")
 extern "C" {
 #endif
 
-typedef struct vp_map_s vp_map_t;
+typedef struct vp_map_s map_t;
 typedef struct vp_list_mod_s vp_list_mod_t;
 
 #ifdef __cplusplus
@@ -77,17 +77,17 @@ struct vp_map_s {
        CONF_ITEM               *ci;            //!< Config item that the map was created from. Mainly used for
                                                //!< logging validation errors.
 
-       vp_map_t                *child;         //!< a child map.  If it exists, `rhs` MUST be NULL
-       vp_map_t                *next;          //!< The next valuepair map.
+       map_t           *child;         //!< a child map.  If it exists, `rhs` MUST be NULL
+       map_t           *next;          //!< The next valuepair map.
 };
 
 /** A list modification
  *
  */
 struct vp_list_mod_s {
-       vp_map_t const          *map;           //!< Original map describing the change to be made.
+       map_t const             *map;           //!< Original map describing the change to be made.
 
-       vp_map_t                *mod;           //!< New map containing the destination (LHS) and
+       map_t           *mod;           //!< New map containing the destination (LHS) and
                                                ///< values (RHS).
        vp_list_mod_t           *next;
 };
@@ -101,53 +101,53 @@ struct vp_list_mod_s {
 } while (0)
 #endif
 
-typedef int (*map_validate_t)(vp_map_t *map, void *ctx);
+typedef int (*map_validate_t)(map_t *map, void *ctx);
 typedef int (*radius_map_getvalue_t)(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request,
-                                    vp_map_t const *map, void *uctx);
+                                    map_t const *map, void *uctx);
 
-int            map_afrom_cp(TALLOC_CTX *ctx, vp_map_t **out, CONF_PAIR *cp,
+int            map_afrom_cp(TALLOC_CTX *ctx, map_t **out, CONF_PAIR *cp,
                             tmpl_rules_t const *lhs_rules, tmpl_rules_t const *rhs_rules);
 
-int            map_afrom_cs(TALLOC_CTX *ctx, vp_map_t **out, CONF_SECTION *cs,
+int            map_afrom_cs(TALLOC_CTX *ctx, map_t **out, CONF_SECTION *cs,
                             tmpl_rules_t const *lhs_rules, tmpl_rules_t const *rhs_rules,
                             map_validate_t validate, void *uctx, unsigned int max) CC_HINT(nonnull(2, 3));
 
-int            map_afrom_fields(TALLOC_CTX *ctx, vp_map_t **out,
+int            map_afrom_fields(TALLOC_CTX *ctx, map_t **out,
                                 char const *lhs, fr_token_t lhs_type, tmpl_rules_t const *lhs_rules,
                                 fr_token_t op,
                                 char const *rhs, fr_token_t rhs_type, tmpl_rules_t const *rhs_rules);
 
-int            map_afrom_value_box(TALLOC_CTX *ctx, vp_map_t **out,
+int            map_afrom_value_box(TALLOC_CTX *ctx, map_t **out,
                                    char const *lhs, fr_token_t lhs_type, tmpl_rules_t const *lhs_rules,
                                    fr_token_t op,
                                    fr_value_box_t *rhs, bool steal_rhs_buffs);
 
-int            map_afrom_attr_str(TALLOC_CTX *ctx, vp_map_t **out, char const *raw,
+int            map_afrom_attr_str(TALLOC_CTX *ctx, map_t **out, char const *raw,
                                   tmpl_rules_t const *lhs_rules, tmpl_rules_t const *rhs_rules);
 
-int            map_afrom_vp(TALLOC_CTX *ctx, vp_map_t **out, fr_pair_t *vp,
+int            map_afrom_vp(TALLOC_CTX *ctx, map_t **out, fr_pair_t *vp,
                             tmpl_rules_t const *rules);
 
-void           map_sort(vp_map_t **maps, fr_cmp_t cmp);
+void           map_sort(map_t **maps, fr_cmp_t cmp);
 
 int            map_to_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request,
-                         vp_map_t const *map, void *uctx) CC_HINT(nonnull (2,3,4));
+                         map_t const *map, void *uctx) CC_HINT(nonnull (2,3,4));
 
 int            map_list_mod_apply(request_t *request, vp_list_mod_t const *vlm);
 
 int            map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
-                               request_t *request, vp_map_t const *map,
+                               request_t *request, map_t const *map,
                                fr_value_box_t **lhs_result, fr_value_box_t **rhs_result);
 
-int            map_to_request(request_t *request, vp_map_t const *map,
+int            map_to_request(request_t *request, map_t const *map,
                               radius_map_getvalue_t func, void *ctx);
 
-ssize_t                map_print(fr_sbuff_t *out, vp_map_t const *map);
+ssize_t                map_print(fr_sbuff_t *out, map_t const *map);
 
-void           map_debug_log(request_t *request, vp_map_t const *map,
+void           map_debug_log(request_t *request, map_t const *map,
                              fr_pair_t const *vp) CC_HINT(nonnull(1, 2));
 
-bool           map_cast_from_hex(vp_map_t *map, fr_token_t rhs_type, char const *rhs);
+bool           map_cast_from_hex(map_t *map, fr_token_t rhs_type, char const *rhs);
 #ifdef __cplusplus
 }
 #endif
index cc2f7e107429ff62b61d6fa6906e931505784687..74d735ca7ed7b8a948103566d3f15d66155fd711 100644 (file)
@@ -47,9 +47,9 @@ static inline vp_list_mod_t *list_mod_alloc(TALLOC_CTX *ctx)
        return talloc_zero(ctx, vp_list_mod_t);
 }
 
-static inline vp_map_t *map_alloc(TALLOC_CTX *ctx)
+static inline map_t *map_alloc(TALLOC_CTX *ctx)
 {
-       return talloc_zero(ctx, vp_map_t);
+       return talloc_zero(ctx, map_t);
 }
 
 /** Allocate a 'generic' #vp_list_mod_t
@@ -67,7 +67,7 @@ static inline vp_map_t *map_alloc(TALLOC_CTX *ctx)
  *     - NULL on failure.
  */
 static inline vp_list_mod_t *list_mod_generic_afrom_map(TALLOC_CTX *ctx,
-                                                       vp_map_t const *original, vp_map_t const *mutated)
+                                                       map_t const *original, map_t const *mutated)
 {
        vp_list_mod_t *n;
 
@@ -106,7 +106,7 @@ static inline vp_list_mod_t *list_mod_generic_afrom_map(TALLOC_CTX *ctx,
  *     - NULL on failure.
  */
 static inline vp_list_mod_t *list_mod_delete_afrom_map(TALLOC_CTX *ctx,
-                                                      vp_map_t const *original, vp_map_t const *mutated)
+                                                      map_t const *original, map_t const *mutated)
 {
        vp_list_mod_t *n;
 
@@ -144,7 +144,7 @@ static inline vp_list_mod_t *list_mod_delete_afrom_map(TALLOC_CTX *ctx,
  *     - NULL on failure.
  */
 static inline vp_list_mod_t *list_mod_empty_string_afrom_map(TALLOC_CTX *ctx,
-                                                            vp_map_t const *original, vp_map_t const *mutated)
+                                                            map_t const *original, map_t const *mutated)
 {
        vp_list_mod_t           *n;
        fr_value_box_t          empty_string = {
@@ -196,7 +196,7 @@ static inline vp_list_mod_t *list_mod_empty_string_afrom_map(TALLOC_CTX *ctx,
  *     - true if destination list is OK.
  *     - false if destination list is invalid.
  */
-static inline fr_pair_t **map_check_src_or_dst(request_t *request, vp_map_t const *map, tmpl_t const *src_dst)
+static inline fr_pair_t **map_check_src_or_dst(request_t *request, map_t const *map, tmpl_t const *src_dst)
 {
        request_t               *context = request;
        fr_pair_t       **list;
@@ -246,12 +246,12 @@ static inline fr_pair_t **map_check_src_or_dst(request_t *request, vp_map_t cons
  *     - -1 on failure.
  */
 int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
-                   request_t *request, vp_map_t const *original,
+                   request_t *request, map_t const *original,
                    fr_value_box_t **lhs_result, fr_value_box_t **rhs_result)
 {
        vp_list_mod_t   *n = NULL;
-       vp_map_t        map_tmp;
-       vp_map_t const  *mutated = original;
+       map_t   map_tmp;
+       map_t const     *mutated = original;
 
        fr_cursor_t     values;
        fr_value_box_t  *head = NULL;
@@ -383,7 +383,7 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
                 *      Iterate over all attributes in that list
                 */
                do {
-                       vp_map_t        *n_mod;
+                       map_t   *n_mod;
 
                        n_mod = map_alloc(n);
                        if (!n_mod) goto error;
@@ -710,7 +710,7 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
 
                (void)fr_cursor_init(&from, &vp_head);
                while ((vp = fr_cursor_remove(&from))) {
-                       vp_map_t *mod;
+                       map_t *mod;
                        tmpl_rules_t rules;
 
                        memset(&rules, 0, sizeof(rules));
@@ -804,7 +804,7 @@ static inline fr_pair_t *map_list_mod_to_vp(TALLOC_CTX *ctx, tmpl_t const *attr,
  */
 static fr_pair_t *map_list_mod_to_vps(TALLOC_CTX *ctx, vp_list_mod_t const *vlm)
 {
-       vp_map_t        *mod;
+       map_t   *mod;
        fr_pair_t       *head = NULL;
        fr_cursor_t     cursor;
 
@@ -851,7 +851,7 @@ static fr_pair_t *map_list_mod_to_vps(TALLOC_CTX *ctx, vp_list_mod_t const *vlm)
  * @param[in] vb       The value in the ephemeral map.
  */
 static inline void map_list_mod_debug(request_t *request,
-                                     vp_map_t const *map, vp_map_t const *mod, fr_value_box_t const *vb)
+                                     map_t const *map, map_t const *mod, fr_value_box_t const *vb)
 {
        char *rhs = NULL;
        char const *quote = "";
@@ -931,7 +931,7 @@ int map_list_mod_apply(request_t *request, vp_list_mod_t const *vlm)
 {
        int                     rcode = 0;
 
-       vp_map_t const          *map = vlm->map, *mod;
+       map_t const             *map = vlm->map, *mod;
        fr_pair_t               **vp_list, *found;
        request_t                       *context;
        TALLOC_CTX              *parent;
index bc81f4d00c193f4b170427228d4d14ffdea11ff1..66e378f4dafbecac3e5bcd818682e8db51602aac 100644 (file)
@@ -167,7 +167,7 @@ int map_proc_register(void *mod_inst, char const *name,
  *     - NULL on error.
  */
 map_proc_inst_t *map_proc_instantiate(TALLOC_CTX *ctx, map_proc_t const *proc,
-                                     CONF_SECTION *cs, tmpl_t const *src, vp_map_t const *maps)
+                                     CONF_SECTION *cs, tmpl_t const *src, map_t const *maps)
 {
        map_proc_inst_t *inst;
 
index e4345ced3976ce8397b97572378dd5f0fb95a378..1bacc9696cbcd2e92cef780c8537187e6a8f642f 100644 (file)
@@ -59,7 +59,7 @@ extern "C" {
  *     - #RLM_MODULE_FAIL - If an error occurred performing the mapping.
  */
 typedef rlm_rcode_t (*map_proc_func_t)(void *mod_inst, void *proc_inst, request_t *request,
-                                      fr_value_box_t **result, vp_map_t const *maps);
+                                      fr_value_box_t **result, map_t const *maps);
 
 /** Allocate new instance data for a map processor
  *
@@ -73,7 +73,7 @@ typedef rlm_rcode_t (*map_proc_func_t)(void *mod_inst, void *proc_inst, request_
  *     - -1 on failure.
  */
 typedef int (*map_proc_instantiate_t)(CONF_SECTION *cs, void *mod_inst, void *proc_inst,
-                                     tmpl_t const *src, vp_map_t const *maps);
+                                     tmpl_t const *src, map_t const *maps);
 
 map_proc_t     *map_proc_find(char const *name);
 
@@ -83,7 +83,7 @@ int           map_proc_register(void *mod_inst, char const *name,
                                  map_proc_instantiate_t instantiate, size_t inst_size);
 
 map_proc_inst_t *map_proc_instantiate(TALLOC_CTX *ctx, map_proc_t const *proc,
-                                     CONF_SECTION *cs, tmpl_t const *src, vp_map_t const *maps);
+                                     CONF_SECTION *cs, tmpl_t const *src, map_t const *maps);
 
 rlm_rcode_t    map_proc(request_t *request, map_proc_inst_t const *inst, fr_value_box_t **src);
 
index 198c2f3fc11604d382a31b20e590c6bf4a6c4dc4..2049e3035a20c875200eeb1c331a3e495e2e6018 100644 (file)
@@ -50,7 +50,7 @@ struct map_proc {
 struct map_proc_inst {
        map_proc_t const        *proc;                  //!< Map processor.
        tmpl_t const            *src;                   //!< Evaluated to provide source value for map processor.
-       vp_map_t const          *maps;                  //!< Head of the map list.
+       map_t const             *maps;                  //!< Head of the map list.
        void                    *data;                  //!< Instance data created by #map_proc_instantiate
 };
 
index 1ac8c43e86924dee6d450404d1cde457dcab217d..4b1bef1509155a92c0479cf2d536775494079b67 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
 #endif
 int                    module_sibling_section_find(CONF_SECTION **out, CONF_SECTION *module, char const *name);
 
-int                    unlang_fixup_update(vp_map_t *map, void *ctx);
+int                    unlang_fixup_update(map_t *map, void *ctx);
 
 #ifdef __cplusplus
 }
index c905135428dd0a80d0ac7857805e35479c6a5bdb..2429af048ec6f84ce3b277a03bc56137f3542986 100644 (file)
@@ -403,7 +403,7 @@ typedef struct {
  *
  * Is used as both the RHS and LHS of a map (both update, and conditional types)
  *
- * @section update_maps Use in update vp_map_t
+ * @section update_maps Use in update map_t
  * When used on the LHS it describes an attribute to create and should be one of these types:
  * - #TMPL_TYPE_ATTR
  * - #TMPL_TYPE_LIST
@@ -418,11 +418,11 @@ typedef struct {
  * - #TMPL_TYPE_DATA
  * - #TMPL_TYPE_XLAT (pre-parsed xlat)
  *
- * @section conditional_maps Use in conditional vp_map_t
+ * @section conditional_maps Use in conditional map_t
  * When used as part of a condition it may be any of the RHS side types, as well as:
  * - #TMPL_TYPE_REGEX (pre-parsed regex)
  *
- * @see vp_map_t
+ * @see map_t
  */
 struct tmpl_s {
        tmpl_type_t     _CONST type;            //!< What type of value tmpl refers to.
index 65eb08170e8555caee704d0f969486b79ed2ae1b..f1d476ea30d4e498ac3211167a1b0b3e6598a7fd 100644 (file)
@@ -196,7 +196,7 @@ static bool pass2_fixup_tmpl(TALLOC_CTX *ctx, CONF_ITEM const *ci, tmpl_t **vpt_
 static bool pass2_fixup_map(fr_cond_t *c)
 {
        tmpl_t          *vpt;
-       vp_map_t        *map;
+       map_t   *map;
 
        map = c->data.map;      /* shorter */
 
@@ -540,7 +540,7 @@ static bool pass2_cond_callback(fr_cond_t *c, UNUSED void *uctx)
        }
 }
 
-static bool pass2_fixup_update_map(vp_map_t *map, tmpl_rules_t const *rules, fr_dict_attr_t const *parent)
+static bool pass2_fixup_update_map(map_t *map, tmpl_rules_t const *rules, fr_dict_attr_t const *parent)
 {
        if (tmpl_is_xlat_unresolved(map->lhs)) {
                fr_assert(tmpl_xlat(map->lhs) == NULL);
@@ -632,7 +632,7 @@ static bool pass2_fixup_update_map(vp_map_t *map, tmpl_rules_t const *rules, fr_
 static bool pass2_fixup_update(unlang_group_t *g, tmpl_rules_t const *rules)
 {
        unlang_map_t    *gext = unlang_group_to_map(g);
-       vp_map_t                *map;
+       map_t           *map;
 
        for (map = gext->map; map != NULL; map = map->next) {
                if (!pass2_fixup_update_map(map, rules, NULL)) return false;
@@ -665,7 +665,7 @@ static void unlang_dump(unlang_t *instruction, int depth)
 {
        unlang_t *c;
        unlang_group_t *g;
-       vp_map_t *map;
+       map_t *map;
        char buffer[1024];
 
        for (c = instruction; c != NULL; c = c->next) {
@@ -744,7 +744,7 @@ static void unlang_dump(unlang_t *instruction, int depth)
  * @param ctx data to pass to fixup function (currently unused).
  * @return 0 if valid else -1.
  */
-static int unlang_fixup_map(vp_map_t *map, UNUSED void *ctx)
+static int unlang_fixup_map(map_t *map, UNUSED void *ctx)
 {
        CONF_PAIR *cp = cf_item_to_pair(map->ci);
 
@@ -808,7 +808,7 @@ static int unlang_fixup_map(vp_map_t *map, UNUSED void *ctx)
  *     - 0 if valid.
  *     - -1 not valid.
  */
-int unlang_fixup_update(vp_map_t *map, UNUSED void *ctx)
+int unlang_fixup_update(map_t *map, UNUSED void *ctx)
 {
        CONF_PAIR *cp = cf_item_to_pair(map->ci);
 
@@ -1005,7 +1005,7 @@ int unlang_fixup_update(vp_map_t *map, UNUSED void *ctx)
  *     - 0 if valid.
  *     - -1 not valid.
  */
-static int unlang_fixup_filter(vp_map_t *map, UNUSED void *ctx)
+static int unlang_fixup_filter(map_t *map, UNUSED void *ctx)
 {
        CONF_PAIR *cp = cf_item_to_pair(map->ci);
 
@@ -1240,7 +1240,7 @@ static unlang_t *compile_map(unlang_t *parent, unlang_compile_t *unlang_ctx, CON
        ssize_t                 slen;
        char const              *tmpl_str;
 
-       vp_map_t                *head;
+       map_t           *head;
        tmpl_t                  *vpt = NULL;
 
        map_proc_t              *proc;
@@ -1378,7 +1378,7 @@ static unlang_t *compile_update(unlang_t *parent, unlang_compile_t *unlang_ctx,
        unlang_t                *c;
        char const              *name2 = cf_section_name2(cs);
 
-       vp_map_t                *head;
+       map_t           *head;
 
        tmpl_rules_t            parse_rules;
 
@@ -1439,7 +1439,7 @@ static unlang_t *compile_filter(unlang_t *parent, unlang_compile_t *unlang_ctx,
        unlang_t                *c;
        char const              *name2 = cf_section_name2(cs);
 
-       vp_map_t                *head;
+       map_t           *head;
 
        tmpl_rules_t            parse_rules;
 
@@ -2492,7 +2492,7 @@ static unlang_t *compile_if(unlang_t *parent, unlang_compile_t *unlang_ctx, CONF
                .len = sizeof(unlang_cond_t),
                .type_name = "unlang_cond_t",
                .pool_headers = 1 + 1 + (TMPL_POOL_DEF_HEADERS * 2),
-               .pool_len = sizeof(fr_cond_t) + sizeof(vp_map_t) + (TMPL_POOL_DEF_LEN * 2)
+               .pool_len = sizeof(fr_cond_t) + sizeof(map_t) + (TMPL_POOL_DEF_LEN * 2)
        };
 
        return compile_if_subsection(parent, unlang_ctx, cs, &if_ext);
@@ -2505,7 +2505,7 @@ static unlang_t *compile_elsif(unlang_t *parent, unlang_compile_t *unlang_ctx, C
                .len = sizeof(unlang_cond_t),
                .type_name = "unlang_cond_t",
                .pool_headers = 1 + 1 + (TMPL_POOL_DEF_HEADERS * 2),
-               .pool_len = sizeof(fr_cond_t) + sizeof(vp_map_t) + (TMPL_POOL_DEF_LEN * 2)
+               .pool_len = sizeof(fr_cond_t) + sizeof(map_t) + (TMPL_POOL_DEF_LEN * 2)
        };
 
        return compile_if_subsection(parent, unlang_ctx, cs, &elsif_ext);
index b2cfbb10f9f7e30fd79c1621b08f66c31e02e11b..e6615175677372cf5210623a2f50de166efed9f3 100644 (file)
@@ -127,7 +127,7 @@ static unlang_action_t list_mod_create(request_t *request, rlm_rcode_t *presult)
        unlang_stack_t                  *stack = request->stack;
        unlang_stack_frame_t            *frame = &stack->frame[stack->depth];
        unlang_frame_state_update_t     *update_state = frame->state;
-       vp_map_t                        *map;
+       map_t                   *map;
 
        /*
         *      Iterate over the maps producing a set of modifications to apply.
@@ -262,7 +262,7 @@ static unlang_action_t unlang_update_state_init(request_t *request, rlm_rcode_t
         *      Initialise the frame state
         */
        MEM(frame->state = update_state = talloc_zero_pooled_object(stack, unlang_frame_state_update_t,
-                                                                   (sizeof(vp_map_t) +
+                                                                   (sizeof(map_t) +
                                                                    (sizeof(tmpl_t) * 2) + 128),
                                                                    g->num_children));  /* 128 is for string buffers */
 
index 1dc01d857ac2981b4474b518eaaa02f279f10eaa..ca1d8570abf7af23d614f9d49bd70f35b7130568 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 typedef struct {
        unlang_group_t          group;
        tmpl_t                  *vpt;
-       vp_map_t                *map;           //!< Head of the map list
+       map_t           *map;           //!< Head of the map list
        map_proc_inst_t         *proc_inst;
 } unlang_map_t;
 
index 31778a60f139bb8b6e298f4132d6661e5ec206cf..fddb4ad9ced8b9e9590704dea0a6519e15e38b4f 100644 (file)
@@ -41,7 +41,7 @@ static unlang_action_t unlang_switch(request_t *request, UNUSED rlm_rcode_t *pre
        unlang_switch_t *switch_gext;
 
        fr_cond_t               cond;
-       vp_map_t                map;
+       map_t           map;
        tmpl_t                  vpt;
 
        switch_g = unlang_generic_to_group(instruction);
index 135da36788cc278b32c38977113c7e00d1ab6e87..503f45f6ebc5bc069edc88ae322f7ac1d44964f0 100644 (file)
@@ -1370,7 +1370,7 @@ static ssize_t xlat_func_map(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen,
                             UNUSED void const *mod_inst, UNUSED void const *xlat_inst,
                             request_t *request, char const *fmt)
 {
-       vp_map_t        *map = NULL;
+       map_t   *map = NULL;
        int             ret;
 
        tmpl_rules_t    attr_rules = {
index 659cc28756a36292279cc638463a599872e9a06e..664d87126772c64d22295d9564594b77af4031cf 100644 (file)
@@ -167,3 +167,5 @@ void _fr_pair_list_log(fr_log_t const *log, fr_pair_t const *vp, char const *fil
                fr_log(log, L_DBG, file, line, "\t%pP", vp);
        }
 }
+
+
index 534a22697c9362fa5e2c028b8209f9dcc416eef8..62350af5ba3c81a58ad16c589b395497579baa9f 100644 (file)
@@ -149,7 +149,7 @@ struct sync_config_s {
        /*
         *      LDAP attribute to RADIUS map
         */
-       vp_map_t                        *entry_map;             //!< How to convert attributes in entries
+       map_t                   *entry_map;             //!< How to convert attributes in entries
                                                                //!< to FreeRADIUS attributes.
 
        /*
index 7a1f014392a64cbf7d26c918822a531a1c7c9b96..61b68e435e2d816491f34fef6427d7003a483658 100644 (file)
@@ -138,7 +138,7 @@ static cache_status_t cache_entry_find(rlm_cache_entry_t **out,
        redisReply                      *reply = NULL;
        int                             s_ret;
 
-       vp_map_t                        *head = NULL, **last = &head;
+       map_t                   *head = NULL, **last = &head;
 #ifdef HAVE_TALLOC_ZERO_POOLED_OBJECT
        size_t                          pool_size = 0;
 #endif
@@ -190,7 +190,7 @@ static cache_status_t cache_entry_find(rlm_cache_entry_t **out,
         *      We can get a pretty good idea of the required size of the pool
         */
        for (i = 0; i < reply->elements; i += 3) {
-               pool_size += sizeof(vp_map_t) + (sizeof(tmpl_t) * 2);
+               pool_size += sizeof(map_t) + (sizeof(tmpl_t) * 2);
                if (reply->element[i]->type == REDIS_REPLY_STRING) pool_size += reply->element[i]->len + 1;
        }
 
@@ -221,7 +221,7 @@ static cache_status_t cache_entry_find(rlm_cache_entry_t **out,
         *      Pull out the cache created date
         */
        if (tmpl_da(head->lhs) == attr_cache_created) {
-               vp_map_t *map;
+               map_t *map;
 
                c->created = tmpl_value(head->rhs)->vb_date;
 
@@ -234,7 +234,7 @@ static cache_status_t cache_entry_find(rlm_cache_entry_t **out,
         *      Pull out the cache expires date
         */
        if (tmpl_da(head->lhs) == attr_cache_expires) {
-               vp_map_t *map;
+               map_t *map;
 
                c->expires = tmpl_value(head->rhs)->vb_date;
 
@@ -262,7 +262,7 @@ static cache_status_t cache_entry_insert(UNUSED rlm_cache_config_t const *config
        rlm_cache_redis_t       *driver = instance;
        TALLOC_CTX              *pool;
 
-       vp_map_t                *map;
+       map_t           *map;
 
        fr_redis_conn_t         *conn;
        fr_redis_cluster_state_t        state;
@@ -283,14 +283,14 @@ static cache_status_t cache_entry_insert(UNUSED rlm_cache_config_t const *config
        int                     cnt;
 
        tmpl_t          expires_value;
-       vp_map_t                expires = {
+       map_t           expires = {
                                        .op     = T_OP_SET,
                                        .lhs    = driver->expires_attr,
                                        .rhs    = &expires_value,
                                };
 
        tmpl_t          created_value;
-       vp_map_t                created = {
+       map_t           created = {
                                        .op     = T_OP_SET,
                                        .lhs    = driver->created_attr,
                                        .rhs    = &created_value,
index 2bbfe2710b4036311befcb11c48f3dd956662a8b..d53d519ef95625493ec3812bccb1e666aed11c33 100644 (file)
@@ -156,7 +156,7 @@ static rlm_rcode_t cache_merge(rlm_cache_t const *inst, request_t *request, rlm_
 static rlm_rcode_t cache_merge(rlm_cache_t const *inst, request_t *request, rlm_cache_entry_t *c)
 {
        fr_pair_t       *vp;
-       vp_map_t        *map;
+       map_t   *map;
        int             merged = 0;
 
        RDEBUG2("Merging cache entry into request");
@@ -293,8 +293,8 @@ static rlm_rcode_t cache_expire(rlm_cache_t const *inst, request_t *request,
 static rlm_rcode_t cache_insert(rlm_cache_t const *inst, request_t *request, rlm_cache_handle_t **handle,
                                uint8_t const *key, size_t key_len, int ttl)
 {
-       vp_map_t                const *map;
-       vp_map_t                **last, *c_map;
+       map_t           const *map;
+       map_t           **last, *c_map;
 
        fr_pair_t               *vp;
        bool                    merge = false;
@@ -367,7 +367,7 @@ static rlm_rcode_t cache_insert(rlm_cache_t const *inst, request_t *request, rlm
                        if (RDEBUG_ENABLED2) map_debug_log(request, map, vp);
                        REXDENT();
 
-                       MEM(c_map = talloc_zero(c, vp_map_t));
+                       MEM(c_map = talloc_zero(c, map_t));
                        c_map->op = map->op;
 
                        /*
@@ -510,7 +510,7 @@ static rlm_rcode_t cache_set_ttl(rlm_cache_t const *inst, request_t *request,
 /** Verify that a map in the cache section makes sense
  *
  */
-static int cache_verify(vp_map_t *map, void *ctx)
+static int cache_verify(map_t *map, void *ctx)
 {
        if (unlang_fixup_update(map, ctx) < 0) return -1;
 
@@ -802,7 +802,7 @@ static ssize_t cache_xlat(TALLOC_CTX *ctx, char **out, UNUSED size_t freespace,
        ssize_t                 key_len;
 
        tmpl_t          *target = NULL;
-       vp_map_t                *map = NULL;
+       map_t           *map = NULL;
 
        key_len = tmpl_expand((char const **)&key, (char *)buffer, sizeof(buffer),
                              request, inst->config.key, NULL, NULL);
index 87eeffb3c555eb7407d6069dbe066e4230116837..bd15d67c183dac43900b1b1ca0a58efbcafc26c9 100644 (file)
@@ -70,7 +70,7 @@ typedef struct {
        module_instance_t       *driver_inst;           //!< Driver's instance data.
        rlm_cache_driver_t const        *driver;                //!< Driver's exported interface.
 
-       vp_map_t                *maps;                  //!< Attribute map applied to users.
+       map_t           *maps;                  //!< Attribute map applied to users.
                                                        //!< and profiles.
        CONF_SECTION            *cs;
 } rlm_cache_t;
@@ -82,7 +82,7 @@ typedef struct {
        fr_unix_time_t          created;                //!< When the entry was created.
        fr_unix_time_t          expires;                //!< When the entry expires.
 
-       vp_map_t                *maps;                  //!< Head of the maps list.
+       map_t           *maps;                  //!< Head of the maps list.
 } rlm_cache_entry_t;
 
 /** Allocate a new cache entry
index 5acefb54eaf2808293378986a9a304e5d7f1036b..bdc3983def374407dd76693f3ce966bd34da9c89 100644 (file)
@@ -42,7 +42,7 @@ int cache_serialize(TALLOC_CTX *ctx, char **out, rlm_cache_entry_t const *c)
 {
        TALLOC_CTX      *value_pool = NULL;
        char            attr[256];      /* Attr name buffer */
-       vp_map_t        *map;
+       map_t   *map;
 
        char            *to_store = NULL;
 
@@ -102,7 +102,7 @@ finish:
  */
 int cache_deserialize(rlm_cache_entry_t *c, fr_dict_t const *dict, char *in, ssize_t inlen)
 {
-       vp_map_t        **last = &c->maps;
+       map_t   **last = &c->maps;
        char            *p, *q;
 
        if (inlen < 0) inlen = strlen(in);
@@ -110,7 +110,7 @@ int cache_deserialize(rlm_cache_entry_t *c, fr_dict_t const *dict, char *in, ssi
        p = in;
 
        while (((size_t)(p - in)) < (size_t)inlen) {
-               vp_map_t        *map = NULL;
+               map_t   *map = NULL;
                tmpl_rules_t parse_rules = {
                                        .dict_def = dict,
                                        .prefix = TMPL_ATTR_REF_PREFIX_NO
index c10a5cf5530f81614099784e093a7cb3bd188447..0bf76c731e6a71e62d81c195a355c0c578571fdf 100644 (file)
@@ -40,7 +40,7 @@ typedef struct {
 } client_get_vp_ctx_t;
 
 static int _map_proc_client_get_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request,
-                                  vp_map_t const *map, void *uctx)
+                                  map_t const *map, void *uctx)
 {
        client_get_vp_ctx_t     *client = uctx;
        fr_pair_t               *head = NULL, *vp;
@@ -115,10 +115,10 @@ static int _map_proc_client_get_vp(TALLOC_CTX *ctx, fr_pair_t **out, request_t *
  *     - #RLM_MODULE_FAIL if an error occurred.
  */
 static rlm_rcode_t map_proc_client(UNUSED void *mod_inst, UNUSED void *proc_inst, request_t *request,
-                                  fr_value_box_t **client_override, vp_map_t const *maps)
+                                  fr_value_box_t **client_override, map_t const *maps)
 {
        rlm_rcode_t             rcode = RLM_MODULE_OK;
-       vp_map_t const          *map;
+       map_t const             *map;
        RADCLIENT               *client;
        client_get_vp_ctx_t     uctx;
 
index d4a1b9576b27cd53cec0ecfeb0f44fdc58c3c630..13dc72644ca64cd26bfe6e746b7cdbee472157b8 100644 (file)
@@ -468,7 +468,7 @@ int mod_json_object_to_map(TALLOC_CTX *ctx, fr_cursor_t *out, request_t *request
                 */
                {
                        fr_value_box_t  tmp = { .type = FR_TYPE_INVALID };
-                       vp_map_t        *map;
+                       map_t   *map;
 
                        if (fr_json_object_to_value_box(ctx, &tmp, value_obj, da, true) < 0) {
                        bad_value:
index a387fd7f788ab105876df8a5a3195fea5e98f8a0..815968ff0e2dde87ab4e7d63d96a9db9e34af57a 100644 (file)
@@ -149,7 +149,7 @@ static rlm_rcode_t mod_authorize(module_ctx_t const *mctx, request_t *request)
        {
                TALLOC_CTX      *pool = talloc_pool(request, 1024);     /* We need to do lots of allocs */
                fr_cursor_t     maps, vlms;
-               vp_map_t        *map_head = NULL, *map;
+               map_t   *map_head = NULL, *map;
                vp_list_mod_t   *vlm_head = NULL, *vlm;
 
                fr_cursor_init(&maps, &map_head);
index 8030dd6c94b6039ff09773667a6ebdd4b4514583..0b452a77b851f28f3098d3cd1dc252a007b51881 100644 (file)
@@ -31,7 +31,7 @@ RCSID("$Id$")
 #include <freeradius-devel/server/map_proc.h>
 
 static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_t *request,
-                               fr_value_box_t **key, vp_map_t const *maps);
+                               fr_value_box_t **key, map_t const *maps);
 
 /*
  *     Define a structure for our module configuration.
@@ -64,7 +64,7 @@ typedef struct {
        tmpl_t          *key;
        fr_type_t       key_data_type;
 
-       vp_map_t        *map;           //!< if there is an "update" section in the configuration.
+       map_t   *map;           //!< if there is an "update" section in the configuration.
 } rlm_csv_t;
 
 typedef struct rlm_csv_entry_s rlm_csv_entry_t;
@@ -393,7 +393,7 @@ static int fieldname2offset(rlm_csv_t const *inst, char const *field_name, int *
 /*
  *     Verify one map entry.
  */
-static int csv_map_verify(vp_map_t *map, void *instance)
+static int csv_map_verify(map_t *map, void *instance)
 {
        rlm_csv_t *inst = instance;
        int offset;
@@ -489,9 +489,9 @@ static int csv_map_verify(vp_map_t *map, void *instance)
  *     Verify the result of the map.
  */
 static int csv_maps_verify(CONF_SECTION *cs, void *mod_inst, UNUSED void *proc_inst,
-                         tmpl_t const *src, vp_map_t const *maps)
+                         tmpl_t const *src, map_t const *maps)
 {
-       vp_map_t const *map;
+       map_t const *map;
 
        if (!src) {
                cf_log_err(cs, "Missing key expansion");
@@ -502,7 +502,7 @@ static int csv_maps_verify(CONF_SECTION *cs, void *mod_inst, UNUSED void *proc_i
        for (map = maps;
             map != NULL;
             map = map->next) {
-               vp_map_t *unconst_map;
+               map_t *unconst_map;
 
                memcpy(&unconst_map, &map, sizeof(map));
 
@@ -839,7 +839,7 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
 /*
  *     Convert field X to a VP.
  */
-static int csv_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, vp_map_t const *map, void *uctx)
+static int csv_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request, map_t const *map, void *uctx)
 {
        char const              *str = uctx;
        fr_pair_t               *head = NULL, *vp;
@@ -901,11 +901,11 @@ static int csv_map_getvalue(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request
  *     - #RLM_MODULE_FAIL if an error occurred.
  */
 static rlm_rcode_t mod_map_apply(rlm_csv_t const *inst, request_t *request,
-                               fr_value_box_t const *key, vp_map_t const *maps)
+                               fr_value_box_t const *key, map_t const *maps)
 {
        rlm_rcode_t             rcode = RLM_MODULE_UPDATED;
        rlm_csv_entry_t         *e;
-       vp_map_t const          *map;
+       map_t const             *map;
 
        e = find_entry(inst, key);
        if (!e) {
@@ -982,7 +982,7 @@ finish:
  *     - #RLM_MODULE_FAIL if an error occurred.
  */
 static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_t *request,
-                               fr_value_box_t **key, vp_map_t const *maps)
+                               fr_value_box_t **key, map_t const *maps)
 {
        rlm_csv_t               *inst = talloc_get_type_abort(mod_inst, rlm_csv_t);
 
index 94f803add03ac8fc2d8a2edc6dfc82ab2595e9bd..8dafbfe66d2245e907eec92109f7526470e9b86a 100644 (file)
@@ -311,10 +311,10 @@ static xlat_action_t json_encode_xlat(TALLOC_CTX *ctx, fr_cursor_t *out, request
  *     - -1 on failure.
  */
 static int mod_map_proc_instantiate(CONF_SECTION *cs, UNUSED void *mod_inst, void *proc_inst,
-                                   tmpl_t const *src, vp_map_t const *maps)
+                                   tmpl_t const *src, map_t const *maps)
 {
        rlm_json_jpath_cache_t  *cache_inst = proc_inst;
-       vp_map_t const          *map;
+       map_t const             *map;
        ssize_t                 slen;
        rlm_json_jpath_cache_t  *cache = cache_inst, **tail = &cache->next;
 
@@ -396,7 +396,7 @@ static int mod_map_proc_instantiate(CONF_SECTION *cs, UNUSED void *mod_inst, voi
  *     - -1 on failure.
  */
 static int _json_map_proc_get_value(TALLOC_CTX *ctx, fr_pair_t **out, request_t *request,
-                                   vp_map_t const *map, void *uctx)
+                                   map_t const *map, void *uctx)
 {
        fr_pair_t                       *vp;
        fr_cursor_t                     cursor;
@@ -444,13 +444,13 @@ static int _json_map_proc_get_value(TALLOC_CTX *ctx, fr_pair_t **out, request_t
  *     - #RLM_MODULE_FAIL if a fault occurred.
  */
 static rlm_rcode_t mod_map_proc(UNUSED void *mod_inst, void *proc_inst, request_t *request,
-                               fr_value_box_t **json, vp_map_t const *maps)
+                               fr_value_box_t **json, map_t const *maps)
 {
        rlm_rcode_t                     rcode = RLM_MODULE_UPDATED;
        struct json_tokener             *tok;
 
        rlm_json_jpath_cache_t          *cache = proc_inst;
-       vp_map_t const                  *map;
+       map_t const                     *map;
 
        rlm_json_jpath_to_eval_t        to_eval;
 
index 8970c475406e656a15a5581ad7fd12433bf6aaae..d94c87e638a6f6307b95a2a9d82e3432614d6e05 100644 (file)
@@ -392,7 +392,7 @@ free_urldesc:
  *     Verify the result of the map.
  */
 static int ldap_map_verify(CONF_SECTION *cs, UNUSED void *mod_inst, UNUSED void *proc_inst,
-                          tmpl_t const *src, UNUSED vp_map_t const *maps)
+                          tmpl_t const *src, UNUSED map_t const *maps)
 {
        if (!src) {
                cf_log_err(cs, "Missing LDAP URI");
@@ -421,7 +421,7 @@ static int ldap_map_verify(CONF_SECTION *cs, UNUSED void *mod_inst, UNUSED void
  *     - #RLM_MODULE_FAIL if an error occurred.
  */
 static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_t *request,
-                               fr_value_box_t **url, vp_map_t const *maps)
+                               fr_value_box_t **url, map_t const *maps)
 {
        rlm_rcode_t             rcode = RLM_MODULE_UPDATED;
        rlm_ldap_t              *inst = talloc_get_type_abort(mod_inst, rlm_ldap_t);
@@ -431,7 +431,7 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_
 
        LDAPMessage             *result = NULL;
        LDAPMessage             *entry = NULL;
-       vp_map_t const          *map;
+       map_t const             *map;
        char const              *url_str;
 
        fr_ldap_connection_t            *conn;
index 29a834af3a1121a40151bcb72ff15d6a6e79e904..d754e4371830fe53959ad05440f8d6464a9ea76b 100644 (file)
@@ -42,7 +42,7 @@ struct ldap_inst_s {
        /*
         *      RADIUS attribute to LDAP attribute maps
         */
-       vp_map_t        *user_map;                      //!< Attribute map applied to users and profiles.
+       map_t   *user_map;                      //!< Attribute map applied to users and profiles.
 
        /*
         *      Options
index 76be693818603e86d605e4c97326bf0c3ad7d496..8489f2186dbb6b4a8526ccd82ba49c3e4796098e 100644 (file)
@@ -326,7 +326,7 @@ static int status_check_update_parse(TALLOC_CTX *ctx, void *out, UNUSED void *pa
        int                     rcode;
        CONF_SECTION            *cs;
        char const              *name2;
-       vp_map_t                *head = NULL;
+       map_t           *head = NULL;
 
        fr_assert(cf_item_is_section(ci));
 
index 0f22ccaa7ad0abb2057113a7b68e7fc5b8c0a450..f8fa1475c4fc4cd53086ba3c6522deb9e65dd560 100644 (file)
@@ -69,7 +69,7 @@ struct rlm_radius_s {
        uint32_t                proxy_state;            //!< Unique ID (mostly) of this module.
        uint32_t                *types;                 //!< array of allowed packet types
        uint32_t                status_check;           //!< code of status-check type
-       vp_map_t                *status_check_map;      //!< attributes for the status-server checks
+       map_t           *status_check_map;      //!< attributes for the status-server checks
        uint32_t                num_answers_to_alive;           //!< How many status check responses we need to
                                                        ///< mark the connection as alive.
 
index 1558b205330ea1d14cec8032cb9f2e5116198e2c..c045c5fcfc51195137a0f5540e6e709fc8ed7f76 100644 (file)
@@ -338,7 +338,7 @@ static void CC_HINT(nonnull) status_check_alloc(fr_event_list_t *el, udp_handle_
        udp_request_t           *u;
        request_t                       *request;
        rlm_radius_udp_t const  *inst = h->inst;
-       vp_map_t                *map;
+       map_t           *map;
 
        fr_assert(!h->status_u && !h->status_r && !h->status_request);
 
index e4282ceba675f1824d3af6bbae8da467d03e2556..4c3eba5d9f287ae0e22b186a51d94005d2ee8045 100644 (file)
@@ -662,7 +662,7 @@ static ippool_rcode_t redis_ippool_allocate(rlm_redis_ippool_t const *inst, requ
         */
        if (reply->elements > 1) {
                tmpl_t ip_rhs;
-               vp_map_t ip_map = {
+               map_t ip_map = {
                        .lhs = inst->allocated_address_attr,
                        .op = T_OP_SET,
                        .rhs = &ip_rhs
@@ -725,7 +725,7 @@ static ippool_rcode_t redis_ippool_allocate(rlm_redis_ippool_t const *inst, requ
                case REDIS_REPLY_STRING:
                {
                        tmpl_t range_rhs;
-                       vp_map_t range_map = {
+                       map_t range_map = {
                                .lhs = inst->range_attr,
                                .op = T_OP_SET,
                                .rhs = &range_rhs
@@ -757,7 +757,7 @@ static ippool_rcode_t redis_ippool_allocate(rlm_redis_ippool_t const *inst, requ
         */
        if (inst->expiry_attr && (reply->elements > 3)) {
                tmpl_t expiry_rhs;
-               vp_map_t expiry_map = {
+               map_t expiry_map = {
                        .lhs = inst->expiry_attr,
                        .op = T_OP_SET,
                        .rhs = &expiry_rhs
@@ -799,7 +799,7 @@ static ippool_rcode_t redis_ippool_update(rlm_redis_ippool_t const *inst, reques
        ippool_rcode_t          ret = IPPOOL_RCODE_SUCCESS;
 
        tmpl_t          range_rhs;
-       vp_map_t                range_map = { .lhs = inst->range_attr, .op = T_OP_SET, .rhs = &range_rhs };
+       map_t           range_map = { .lhs = inst->range_attr, .op = T_OP_SET, .rhs = &range_rhs };
 
        tmpl_init_shallow(&range_rhs, TMPL_TYPE_DATA, T_DOUBLE_QUOTED_STRING, "", 0);
 
@@ -902,7 +902,7 @@ static ippool_rcode_t redis_ippool_update(rlm_redis_ippool_t const *inst, reques
         */
        if (inst->expiry_attr) {
                tmpl_t expiry_rhs;
-               vp_map_t expiry_map = {
+               map_t expiry_map = {
                        .lhs = inst->expiry_attr,
                        .op = T_OP_SET,
                        .rhs = &expiry_rhs
@@ -1161,7 +1161,7 @@ static rlm_rcode_t mod_action(rlm_redis_ippool_t const *inst, request_t *request
                                        .type = TMPL_TYPE_DATA,
                                        .quote = T_BARE_WORD,
                                };
-                               vp_map_t ip_map = {
+                               map_t ip_map = {
                                        .lhs = inst->allocated_address_attr,
                                        .op = T_OP_SET,
                                        .rhs = &ip_rhs
index 9f3e84e67e510696bbb1e4dc92a5dad43e3fda5c..e6c85936284902916a422f5d6ed6311a49bc1a8b 100644 (file)
@@ -72,7 +72,7 @@ typedef struct {
        fr_curl_tls_t           tls;                    //!< Used for handled all tls specific curl components
        char const              *name;                  //!< Auth-Type value for this module instance.
        fr_dict_enum_t          *auth_type;
-       vp_map_t                *header_maps;           //!< Attribute map used to process header elements
+       map_t           *header_maps;           //!< Attribute map used to process header elements
        CONF_SECTION            *cs;
        bool                    set_date;
 } rlm_smtp_t;
@@ -509,7 +509,7 @@ static int header_source(rlm_smtp_thread_t *t, fr_mail_ctx *uctx, UNUSED rlm_smt
        request_t                               *request = uctx->request;
        fr_sbuff_t                      conf_buffer;
        fr_sbuff_uctx_talloc_t          conf_ctx;
-       vp_map_t                        *conf_map;
+       map_t                   *conf_map;
 
        char                            *expanded_rhs;
 
@@ -958,7 +958,7 @@ static void mod_unload(void)
 /** Verify that a map in the header section makes sense
  *
  */
-static int smtp_verify(vp_map_t *map, void *ctx)
+static int smtp_verify(map_t *map, void *ctx)
 {
        if (unlang_fixup_update(map, ctx) < 0) return -1;
 
index ac6dd86879d2c08e9946d46ad44ac851302ba0c8..0cfb0b28554f3a729ff3e4a28d00eba1d1f30f9c 100644 (file)
@@ -276,7 +276,7 @@ finish:
  *     - -1 on failure.
  */
 static int _sql_map_proc_get_value(TALLOC_CTX *ctx, fr_pair_t **out,
-                                  request_t *request, vp_map_t const *map, void *uctx)
+                                  request_t *request, map_t const *map, void *uctx)
 {
        fr_pair_t       *vp;
        char const      *value = uctx;
@@ -306,7 +306,7 @@ static int _sql_map_proc_get_value(TALLOC_CTX *ctx, fr_pair_t **out,
  *     Verify the result of the map.
  */
 static int sql_map_verify(CONF_SECTION *cs, UNUSED void *mod_inst, UNUSED void *proc_inst,
-                         tmpl_t const *src, UNUSED vp_map_t const *maps)
+                         tmpl_t const *src, UNUSED map_t const *maps)
 {
        if (!src) {
                cf_log_err(cs, "Missing SQL query");
@@ -330,7 +330,7 @@ static int sql_map_verify(CONF_SECTION *cs, UNUSED void *mod_inst, UNUSED void *
  *     - #RLM_MODULE_FAIL if a fault occurred.
  */
 static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_t *request,
-                               fr_value_box_t **query, vp_map_t const *maps)
+                               fr_value_box_t **query, map_t const *maps)
 {
        rlm_sql_t               *inst = talloc_get_type_abort(mod_inst, rlm_sql_t);
        rlm_sql_handle_t        *handle = NULL;
@@ -340,7 +340,7 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, request_
        rlm_rcode_t             rcode = RLM_MODULE_UPDATED;
        sql_rcode_t             ret;
 
-       vp_map_t const          *map;
+       map_t const             *map;
 
        rlm_sql_row_t           row;