Rename value_pair_tmpl_t for v3.0.x too, else merging with be a nightmare
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 11 Mar 2015 17:29:23 +0000 (13:29 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 11 Mar 2015 17:29:32 +0000 (13:29 -0400)
16 files changed:
src/include/conffile.h
src/include/map.h
src/include/parser.h
src/include/radiusd.h
src/include/tmpl.h
src/main/conffile.c
src/main/evaluate.c
src/main/map.c
src/main/modcall.c
src/main/pair.c
src/main/parser.c
src/main/tmpl.c
src/main/xlat.c
src/modules/rlm_expr/rlm_expr.c
src/modules/rlm_ldap/ldap.h
src/modules/rlm_rest/rest.c

index 80dde23..81004ca 100644 (file)
@@ -55,7 +55,7 @@ typedef struct timeval _timeval_t;
  */
 #  define FR_CONF_TYPE_CHECK(_t, _ct, _p) \
        __builtin_choose_expr((_t & PW_TYPE_TMPL),\
-               __builtin_choose_expr(__builtin_types_compatible_p(value_pair_tmpl_t **, _ct), _p, (conf_type_mismatch) 0),\
+               __builtin_choose_expr(__builtin_types_compatible_p(vp_tmpl_t **, _ct), _p, (conf_type_mismatch) 0),\
        __builtin_choose_expr((((_t) & 0xff) == PW_TYPE_STRING),\
                __builtin_choose_expr(__builtin_types_compatible_p(char const **, _ct), _p, (conf_type_mismatch) 0),\
        __builtin_choose_expr((((_t) & 0xff) == PW_TYPE_BOOLEAN),\
index 2ca6379..b16abf0 100644 (file)
@@ -41,12 +41,12 @@ extern "C" {
  * Neither src or dst need to be an FR attribute, and their type can be inferred
  * from whether map->da is NULL (not FR).
  *
- * @see value_pair_tmpl_t
+ * @see vp_tmpl_t
  */
 typedef struct value_pair_map {
-       value_pair_tmpl_t       *lhs;   //!< Typically describes the attribute
+       vp_tmpl_t       *lhs;   //!< Typically describes the attribute
                                        //!< to add or modify.
-       value_pair_tmpl_t       *rhs;   //!< Typically describes a value or a
+       vp_tmpl_t       *rhs;   //!< Typically describes a value or a
                                        //!< src attribute to copy.
 
        FR_TOKEN                op;     //!< The operator that controls
index c539e28..5593c40 100644 (file)
@@ -75,7 +75,7 @@ struct fr_cond_t {
        CONF_ITEM const *ci;
        union {
                value_pair_map_t *map;
-               value_pair_tmpl_t *vpt;
+               vp_tmpl_t *vpt;
                fr_cond_t       *child;
        } data;
 
index 9a5321b..9a9ff0b 100644 (file)
@@ -603,8 +603,8 @@ void                paircompare_unregister(DICT_ATTR const *attr, RAD_COMPARE_FUNC func);
 void           paircompare_unregister_instance(void *instance);
 int            paircompare(REQUEST *request, VALUE_PAIR *req_list,
                            VALUE_PAIR *check, VALUE_PAIR **rep_list);
-value_pair_tmpl_t      *xlat_to_tmpl_attr(TALLOC_CTX *ctx, xlat_exp_t *xlat);
-xlat_exp_t             *xlat_from_tmpl_attr(TALLOC_CTX *ctx, value_pair_tmpl_t *vpt);
+vp_tmpl_t      *xlat_to_tmpl_attr(TALLOC_CTX *ctx, xlat_exp_t *xlat);
+xlat_exp_t             *xlat_from_tmpl_attr(TALLOC_CTX *ctx, vp_tmpl_t *vpt);
 int            radius_xlat_do(REQUEST *request, VALUE_PAIR *vp);
 int radius_compare_vps(REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *vp);
 int radius_callback_compare(REQUEST *request, VALUE_PAIR *req,
@@ -691,7 +691,7 @@ void mark_home_server_dead(home_server_t *home, struct timeval *when);
 /* evaluate.c */
 typedef struct fr_cond_t fr_cond_t;
 int radius_evaluate_tmpl(REQUEST *request, int modreturn, int depth,
-                        value_pair_tmpl_t const *vpt);
+                        vp_tmpl_t const *vpt);
 int radius_evaluate_map(REQUEST *request, int modreturn, int depth,
                        fr_cond_t const *c);
 int radius_evaluate_cond(REQUEST *request, int modreturn, int depth,
index 1fb35c3..19ab340 100644 (file)
@@ -21,9 +21,9 @@
  * @file tmpl.h
  * @brief Structures and prototypes for templates
  *
- * These functions are used to work with #value_pair_tmpl_t structs.
+ * These functions are used to work with #vp_tmpl_t structs.
  *
- * #value_pair_tmpl_t (VPTs) specify either a data source, or a data sink.
+ * #vp_tmpl_t (VPTs) specify either a data source, or a data sink.
  *
  * Examples of sources are #TMPL_TYPE_XLAT, #TMPL_TYPE_EXEC and #TMPL_TYPE_ATTR.
  * Examples of sinks are #TMPL_TYPE_ATTR, #TMPL_TYPE_LIST.
@@ -31,7 +31,7 @@
  * VPTs are used to gather values or attributes for evaluation, or copying, and to specify
  * where values or #VALUE_PAIR should be copied to.
  *
- * To create new #value_pair_tmpl_t use one of the tmpl_*from_* functions.  These parse
+ * To create new #vp_tmpl_t use one of the tmpl_*from_* functions.  These parse
  * strings into VPTs. The main parsing function is #tmpl_afrom_str, which can produce
  * most types of VPTs. It uses the type of quoting (passed as an #FR_TOKEN) to determine
  * what type of VPT to parse the string as. For example a #T_DOUBLE_QUOTED_STRING will
@@ -45,7 +45,7 @@
  *
  * In the case of #TMPL_TYPE_ATTR and #TMPL_TYPE_LIST, there are special cursor overlay
  * functions which can be used to iterate over only the #VALUE_PAIR that match a
- * value_pair_tmpl_t in a given list.
+ * vp_tmpl_t in a given list.
  *
  * @see tmpl_cursor_init
  * @see tmpl_cursor_next
@@ -127,7 +127,7 @@ typedef struct pair_list {
        struct pair_list        *lastdefault;
 } PAIR_LIST;
 
-/** Types of #value_pair_tmpl_t
+/** Types of #vp_tmpl_t
  */
 typedef enum tmpl_type {
        TMPL_TYPE_UNKNOWN = 0,          //!< Uninitialised.
@@ -186,7 +186,7 @@ typedef struct {
  *
  * @see value_pair_map_t
  */
-typedef struct value_pair_tmpl_t {
+typedef struct vp_tmpl_t {
        tmpl_type_t     type;           //!< What type of value tmpl refers to.
        char const      *name;          //!< Original attribute ref string, or
                                        //!< where this refers to a none FR
@@ -222,7 +222,7 @@ typedef struct value_pair_tmpl_t {
                regex_t         *preg;  //!< pre-parsed regex_t
 #endif
        } data;
-} value_pair_tmpl_t;
+} vp_tmpl_t;
 
 /** @name Field accessors for #TMPL_TYPE_ATTR, #TMPL_TYPE_ATTR_UNDEFINED, #TMPL_TYPE_LIST
  *
@@ -269,7 +269,7 @@ typedef struct value_pair_tmpl_t {
 #  define VERIFY_TMPL(_x)
 #else
 #  define VERIFY_TMPL(_x) tmpl_verify(__FILE__,  __LINE__, _x)
-void tmpl_verify(char const *file, int line, value_pair_tmpl_t const *vpt);
+void tmpl_verify(char const *file, int line, vp_tmpl_t const *vpt);
 #endif
 
 VALUE_PAIR             **radius_list(REQUEST *request, pair_lists_t list);
@@ -284,56 +284,56 @@ int                       radius_request(REQUEST **request, request_refs_t name);
 
 size_t                 radius_request_name(request_refs_t *out, char const *name, request_refs_t unknown);
 
-value_pair_tmpl_t      *tmpl_init(value_pair_tmpl_t *vpt, tmpl_type_t type,
+vp_tmpl_t      *tmpl_init(vp_tmpl_t *vpt, tmpl_type_t type,
                                   char const *name, ssize_t len);
 
-value_pair_tmpl_t      *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *name,
+vp_tmpl_t      *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *name,
                                    ssize_t len);
 
-ssize_t                        tmpl_from_attr_substr(value_pair_tmpl_t *vpt, char const *name,
+ssize_t                        tmpl_from_attr_substr(vp_tmpl_t *vpt, char const *name,
                                              request_refs_t request_def, pair_lists_t list_def,
                                              bool allow_unknown, bool allow_undefined);
 
-ssize_t                        tmpl_from_attr_str(value_pair_tmpl_t *vpt, char const *name,
+ssize_t                        tmpl_from_attr_str(vp_tmpl_t *vpt, char const *name,
                                           request_refs_t request_def,
                                           pair_lists_t list_def,
                                           bool allow_unknown, bool allow_undefined);
 
-ssize_t                        tmpl_afrom_attr_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *name,
+ssize_t                        tmpl_afrom_attr_str(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *name,
                                            request_refs_t request_def,
                                            pair_lists_t list_def,
                                            bool allow_unknown, bool allow_undefined);
 
-ssize_t                        tmpl_afrom_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *name, size_t inlen,
+ssize_t                        tmpl_afrom_str(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *name, size_t inlen,
                                       FR_TOKEN type, request_refs_t request_def, pair_lists_t list_def, bool do_escape);
 
-int                    tmpl_cast_in_place(value_pair_tmpl_t *vpt, PW_TYPE type, DICT_ATTR const *enumv);
+int                    tmpl_cast_in_place(vp_tmpl_t *vpt, PW_TYPE type, DICT_ATTR const *enumv);
 
-void                   tmpl_cast_in_place_str(value_pair_tmpl_t *vpt);
+void                   tmpl_cast_in_place_str(vp_tmpl_t *vpt);
 
 int                    tmpl_cast_to_vp(VALUE_PAIR **out, REQUEST *request,
-                                       value_pair_tmpl_t const *vpt, DICT_ATTR const *cast);
+                                       vp_tmpl_t const *vpt, DICT_ATTR const *cast);
 
-size_t                 tmpl_prints(char *buffer, size_t bufsize, value_pair_tmpl_t const *vpt,
+size_t                 tmpl_prints(char *buffer, size_t bufsize, vp_tmpl_t const *vpt,
                                    DICT_ATTR const *values);
 
 ssize_t                        tmpl_expand(char const **out, char *buff, size_t outlen, REQUEST *request,
-                                   value_pair_tmpl_t const *vpt, RADIUS_ESCAPE_STRING escape, void *escape_ctx);
+                                   vp_tmpl_t const *vpt, RADIUS_ESCAPE_STRING escape, void *escape_ctx);
 
-ssize_t                        tmpl_aexpand(TALLOC_CTX *ctx, char **out, REQUEST *request, value_pair_tmpl_t const *vpt,
+ssize_t                        tmpl_aexpand(TALLOC_CTX *ctx, char **out, REQUEST *request, vp_tmpl_t const *vpt,
                                     RADIUS_ESCAPE_STRING escape, void *escape_ctx);
 
 VALUE_PAIR             *tmpl_cursor_init(int *err, vp_cursor_t *cursor, REQUEST *request,
-                                         value_pair_tmpl_t const *vpt);
+                                         vp_tmpl_t const *vpt);
 
-VALUE_PAIR             *tmpl_cursor_next(vp_cursor_t *cursor, value_pair_tmpl_t const *vpt);
+VALUE_PAIR             *tmpl_cursor_next(vp_cursor_t *cursor, vp_tmpl_t const *vpt);
 
 int                    tmpl_copy_vps(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request,
-                                     value_pair_tmpl_t const *vpt);
+                                     vp_tmpl_t const *vpt);
 
-int                    tmpl_find_vp(VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vpt);
+int                    tmpl_find_vp(VALUE_PAIR **out, REQUEST *request, vp_tmpl_t const *vpt);
 
-int                    tmpl_define_unknown_attr(value_pair_tmpl_t *vpt);
+int                    tmpl_define_unknown_attr(vp_tmpl_t *vpt);
 
 #ifdef __cplusplus
 }
index 7082554..bd7fe20 100644 (file)
@@ -1212,10 +1212,10 @@ int cf_item_parse(CONF_SECTION *cs, char const *name, unsigned int type, void *d
         */
        if (tmpl) {
                ssize_t slen;
-               value_pair_tmpl_t *vpt;
+               vp_tmpl_t *vpt;
 
                if (!value) {
-                       *(value_pair_tmpl_t **)data = NULL;
+                       *(vp_tmpl_t **)data = NULL;
                        return 0;
                }
 
@@ -1292,7 +1292,7 @@ int cf_item_parse(CONF_SECTION *cs, char const *name, unsigned int type, void *d
                        talloc_free(vpt);
                        return -1;
                }
-               *(value_pair_tmpl_t **)data = vpt;
+               *(vp_tmpl_t **)data = vpt;
 
                return 0;
        }
index 48595f5..5d0bcc8 100644 (file)
@@ -68,7 +68,7 @@ static bool all_digits(char const *string)
 
 /** Evaluate a template
  *
- * Converts a value_pair_tmpl_t to a boolean value.
+ * Converts a vp_tmpl_t to a boolean value.
  *
  * @param[in] request the REQUEST
  * @param[in] modreturn the previous module return code
@@ -76,7 +76,7 @@ static bool all_digits(char const *string)
  * @param[in] vpt the template to evaluate
  * @return -1 on error, 0 for "no match", 1 for "match".
  */
-int radius_evaluate_tmpl(REQUEST *request, int modreturn, UNUSED int depth, value_pair_tmpl_t const *vpt)
+int radius_evaluate_tmpl(REQUEST *request, int modreturn, UNUSED int depth, vp_tmpl_t const *vpt)
 {
        int rcode;
        int modcode;
index 860bcfb..fbc2340 100644 (file)
@@ -48,7 +48,7 @@ bool map_cast_from_hex(value_pair_map_t *map, FR_TOKEN rhs_type, char const *rhs
 
        DICT_ATTR const *da;
        VALUE_PAIR *vp;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        rad_assert(map != NULL);
 
@@ -827,7 +827,7 @@ int map_to_request(REQUEST *request, value_pair_map_t const *map, radius_map_get
        vp_cursor_t dst_list, src_list;
 
        value_pair_map_t        exp_map;
-       value_pair_tmpl_t       exp_lhs;
+       vp_tmpl_t       exp_lhs;
 
        VERIFY_MAP(map);
        rad_assert(map->lhs != NULL);
index b21c157..6fae3cb 100644 (file)
@@ -74,7 +74,7 @@ typedef struct {
        modcallable             *tail;          /* of the children list */
        CONF_SECTION            *cs;
        value_pair_map_t        *map;           /* update */
-       value_pair_tmpl_t       *vpt;           /* switch */
+       vp_tmpl_t       *vpt;           /* switch */
        fr_cond_t               *cond;          /* if/elsif */
        bool                    done_pass2;
 } modgroup;
@@ -789,7 +789,7 @@ redo:
                fr_cond_t cond;
                value_data_t data;
                value_pair_map_t map;
-               value_pair_tmpl_t vpt;
+               vp_tmpl_t vpt;
 
                MOD_LOG_OPEN_BRACE;
 
@@ -1736,7 +1736,7 @@ static modcallable *do_compile_modswitch (modcallable *parent, rlm_components_t
        modcallable *csingle;
        modgroup *g;
        ssize_t slen;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        name2 = cf_section_name2(cs);
        if (!name2) {
@@ -1844,7 +1844,7 @@ static modcallable *do_compile_modcase(modcallable *parent, rlm_components_t com
        char const *name2;
        modcallable *csingle;
        modgroup *g;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        if (!parent || (parent->type != MOD_SWITCH)) {
                cf_log_err_cs(cs, "\"case\" statements may only appear within a \"switch\" section");
@@ -1931,7 +1931,7 @@ static modcallable *do_compile_modforeach(modcallable *parent,
        modcallable *csingle;
        modgroup *g;
        ssize_t slen;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        name2 = cf_section_name2(cs);
        if (!name2) {
@@ -2967,14 +2967,14 @@ void add_to_modcallable(modcallable *parent, modcallable *this)
 
 
 #ifdef WITH_UNLANG
-static bool pass2_xlat_compile(CONF_ITEM const *ci, value_pair_tmpl_t **pvpt, bool convert,
+static bool pass2_xlat_compile(CONF_ITEM const *ci, vp_tmpl_t **pvpt, bool convert,
                               DICT_ATTR const *da)
 {
        ssize_t slen;
        char *fmt;
        char const *error;
        xlat_exp_t *head;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        vpt = *pvpt;
 
@@ -3001,7 +3001,7 @@ static bool pass2_xlat_compile(CONF_ITEM const *ci, value_pair_tmpl_t **pvpt, bo
         *      Convert %{Attribute-Name} to &Attribute-Name
         */
        if (convert) {
-               value_pair_tmpl_t *attr;
+               vp_tmpl_t *attr;
 
                attr = xlat_to_tmpl_attr(talloc_parent(vpt), head);
                if (attr) {
@@ -3053,7 +3053,7 @@ static bool pass2_xlat_compile(CONF_ITEM const *ci, value_pair_tmpl_t **pvpt, bo
 
 
 #ifdef HAVE_REGEX
-static bool pass2_regex_compile(CONF_ITEM const *ci, value_pair_tmpl_t *vpt)
+static bool pass2_regex_compile(CONF_ITEM const *ci, vp_tmpl_t *vpt)
 {
        ssize_t slen;
        regex_t *preg;
@@ -3100,7 +3100,7 @@ static bool pass2_regex_compile(CONF_ITEM const *ci, value_pair_tmpl_t *vpt)
 }
 #endif
 
-static bool pass2_fixup_undefined(CONF_ITEM const *ci, value_pair_tmpl_t *vpt)
+static bool pass2_fixup_undefined(CONF_ITEM const *ci, vp_tmpl_t *vpt)
 {
        DICT_ATTR const *da;
 
@@ -3244,7 +3244,7 @@ check_paircmp:
            (strncmp(map->lhs->name, "Foreach-Variable-", 17) == 0)) {
                char *fmt;
                ssize_t slen;
-               value_pair_tmpl_t *vpt;
+               vp_tmpl_t *vpt;
 
                fmt = talloc_asprintf(map->lhs, "%%{%s}", map->lhs->name);
                slen = tmpl_afrom_str(map, &vpt, fmt, talloc_array_length(fmt) - 1,
@@ -3495,7 +3495,7 @@ bool modcall_pass2(modcallable *mc)
                         *      switch to using that.
                         */
                        if (g->vpt->type == TMPL_TYPE_LITERAL) {
-                               value_pair_tmpl_t *vpt;
+                               vp_tmpl_t *vpt;
 
                                slen = tmpl_afrom_str(g->cs, &vpt, c->name, strlen(c->name), cf_section_name2_type(g->cs),
                                                      REQUEST_CURRENT, PAIR_LIST_REQUEST, true);
index 80acf57..3b5c673 100644 (file)
@@ -754,7 +754,7 @@ void rdebug_proto_pair_list(log_lvl_t level, REQUEST *request, VALUE_PAIR *vp)
 int radius_get_vp(VALUE_PAIR **out, REQUEST *request, char const *name)
 {
        int rcode;
-       value_pair_tmpl_t vpt;
+       vp_tmpl_t vpt;
 
        *out = NULL;
 
@@ -780,7 +780,7 @@ int radius_get_vp(VALUE_PAIR **out, REQUEST *request, char const *name)
 int radius_copy_vp(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, char const *name)
 {
        int rcode;
-       value_pair_tmpl_t vpt;
+       vp_tmpl_t vpt;
 
        *out = NULL;
 
index 3e19b61..aec4684 100644 (file)
@@ -1286,7 +1286,7 @@ done:
                 */
                if ((c->data.map->op == T_OP_CMP_TRUE) ||
                    (c->data.map->op == T_OP_CMP_FALSE)) {
-                       value_pair_tmpl_t *vpt;
+                       vp_tmpl_t *vpt;
 
                        vpt = talloc_steal(c, c->data.map->lhs);
                        c->data.map->lhs = NULL;
@@ -1370,7 +1370,7 @@ done:
                if (c->cast &&
                    (c->data.map->rhs->type == TMPL_TYPE_ATTR) &&
                    (c->data.map->lhs->type != TMPL_TYPE_ATTR)) {
-                       value_pair_tmpl_t *tmp;
+                       vp_tmpl_t *tmp;
 
                        tmp = c->data.map->rhs;
                        c->data.map->rhs = c->data.map->lhs;
index d4a9a8b..f6a7aa8 100644 (file)
@@ -86,7 +86,7 @@ const FR_NAME_NUMBER request_refs[] = {
  * For adding new #VALUE_PAIR to the lists, the #radius_list_ctx function can be used
  * to obtain the appropriate TALLOC_CTX pointer.
  *
- * @note These don't really have much to do with #value_pair_tmpl_t. They're in the same
+ * @note These don't really have much to do with #vp_tmpl_t. They're in the same
  *     file as they're used almost exclusively by the tmpl_* functions.
  * @{
  */
@@ -466,33 +466,33 @@ int radius_request(REQUEST **context, request_refs_t name)
 }
 /** @} */
 
-/** @name Alloc or initialise #value_pair_tmpl_t
+/** @name Alloc or initialise #vp_tmpl_t
  *
  * @note Should not usually be called outside of tmpl_* functions, use one of
  *     the tmpl_*from_* functions instead.
  * @{
  */
 
-/** Initialise stack allocated #value_pair_tmpl_t
+/** Initialise stack allocated #vp_tmpl_t
  *
  * @note Name is not strdupe'd or memcpy'd so must be available, and must not change
- *     for the lifetime of the #value_pair_tmpl_t.
+ *     for the lifetime of the #vp_tmpl_t.
  *
  * @param[out] vpt to initialise.
- * @param[in] type to set in the #value_pair_tmpl_t.
- * @param[in] name of the #value_pair_tmpl_t.
+ * @param[in] type to set in the #vp_tmpl_t.
+ * @param[in] name of the #vp_tmpl_t.
  * @param[in] len The length of the buffer (or a substring of the buffer) pointed to by name.
  *     If < 0 strlen will be used to determine the length.
- * @return a pointer to the initialised #value_pair_tmpl_t. The same value as
+ * @return a pointer to the initialised #vp_tmpl_t. The same value as
  *     vpt.
  */
-value_pair_tmpl_t *tmpl_init(value_pair_tmpl_t *vpt, tmpl_type_t type, char const *name, ssize_t len)
+vp_tmpl_t *tmpl_init(vp_tmpl_t *vpt, tmpl_type_t type, char const *name, ssize_t len)
 {
        rad_assert(vpt);
        rad_assert(type != TMPL_TYPE_UNKNOWN);
        rad_assert(type <= TMPL_TYPE_NULL);
 
-       memset(vpt, 0, sizeof(value_pair_tmpl_t));
+       memset(vpt, 0, sizeof(vp_tmpl_t));
        vpt->type = type;
 
        if (name) {
@@ -503,25 +503,25 @@ value_pair_tmpl_t *tmpl_init(value_pair_tmpl_t *vpt, tmpl_type_t type, char cons
        return vpt;
 }
 
-/** Create a new heap allocated #value_pair_tmpl_t
+/** Create a new heap allocated #vp_tmpl_t
  *
  * @param[in,out] ctx to allocate in.
- * @param[in] type to set in the #value_pair_tmpl_t.
- * @param[in] name of the #value_pair_tmpl_t (will be copied to a new talloc buffer parented
- *     by the #value_pair_tmpl_t).
+ * @param[in] type to set in the #vp_tmpl_t.
+ * @param[in] name of the #vp_tmpl_t (will be copied to a new talloc buffer parented
+ *     by the #vp_tmpl_t).
  * @param[in] len The length of the buffer (or a substring of the buffer) pointed to by name.
  *     If < 0 strlen will be used to determine the length.
- * @return the newly allocated #value_pair_tmpl_t.
+ * @return the newly allocated #vp_tmpl_t.
  */
-value_pair_tmpl_t *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *name, ssize_t len)
+vp_tmpl_t *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *name, ssize_t len)
 {
        char *p;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        rad_assert(type != TMPL_TYPE_UNKNOWN);
        rad_assert(type <= TMPL_TYPE_NULL);
 
-       vpt = talloc_zero(ctx, value_pair_tmpl_t);
+       vpt = talloc_zero(ctx, vp_tmpl_t);
        if (!vpt) return NULL;
        vpt->type = type;
        if (name) {
@@ -536,20 +536,20 @@ value_pair_tmpl_t *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *nam
 }
 /* @} **/
 
-/** @name Create new #value_pair_tmpl_t from a string
+/** @name Create new #vp_tmpl_t from a string
  *
  * @{
  */
-/** Parse a string into a TMPL_TYPE_ATTR_* or #TMPL_TYPE_LIST type #value_pair_tmpl_t
+/** Parse a string into a TMPL_TYPE_ATTR_* or #TMPL_TYPE_LIST type #vp_tmpl_t
  *
  * @note The name field is just a copy of the input pointer, if you know that string might be
- *     freed before you're done with the #value_pair_tmpl_t use #tmpl_afrom_attr_str
+ *     freed before you're done with the #vp_tmpl_t use #tmpl_afrom_attr_str
  *     instead.
  *
  * @param[out] vpt to modify.
  * @param[in] name of attribute including #request_refs and #pair_lists qualifiers.
  *     If only #request_refs and #pair_lists qualifiers are found, a #TMPL_TYPE_LIST
- *     #value_pair_tmpl_t will be produced.
+ *     #vp_tmpl_t will be produced.
  * @param[in] request_def The default #REQUEST to set if no #request_refs qualifiers are
  *     found in name.
  * @param[in] list_def The default list to set if no #pair_lists qualifiers are found in
@@ -557,21 +557,21 @@ value_pair_tmpl_t *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *nam
  * @param[in] allow_unknown If true attributes in the format accepted by
  *     #dict_unknown_from_substr will be allowed, even if they're not in the main
  *     dictionaries.
- *     If an unknown attribute is found A #TMPL_TYPE_ATTR #value_pair_tmpl_t ill be
+ *     If an unknown attribute is found A #TMPL_TYPE_ATTR #vp_tmpl_t ill be
  *     produced with the unknown #DICT_ATTR stored in the ``unknown.da`` buffer.
  *     This #DICT_ATTR will have its ``flags.is_unknown`` field set to true.
- *     If #tmpl_from_attr_substr is being called on startup, the #value_pair_tmpl_t may be
+ *     If #tmpl_from_attr_substr is being called on startup, the #vp_tmpl_t may be
  *     fed to #tmpl_define_unknown_attr to add it to the main dictionaries.
- *     If #tmpl_from_attr_substr is not called, the #value_pair_tmpl_t cannot be used to
+ *     If #tmpl_from_attr_substr is not called, the #vp_tmpl_t cannot be used to
  *     search for #VALUE_PAIR in a #REQUEST.
  * @param[in] allow_undefined If true, we don't generate a parse error on unknown attributes.
- *     If an unknown attribute is found a #TMPL_TYPE_ATTR_UNDEFINED #value_pair_tmpl_t
+ *     If an unknown attribute is found a #TMPL_TYPE_ATTR_UNDEFINED #vp_tmpl_t
  *     will be produced.
  * @return <= 0 on error (offset as negative integer), > 0 on success
  *     (number of bytes parsed).
  *     @see REMARKER to produce pretty error markers from the return value.
  */
-ssize_t tmpl_from_attr_substr(value_pair_tmpl_t *vpt, char const *name,
+ssize_t tmpl_from_attr_substr(vp_tmpl_t *vpt, char const *name,
                              request_refs_t request_def, pair_lists_t list_def,
                              bool allow_unknown, bool allow_undefined)
 {
@@ -759,14 +759,14 @@ finish:
        return vpt->len;
 }
 
-/** Parse a string into a TMPL_TYPE_ATTR_* or #TMPL_TYPE_LIST type #value_pair_tmpl_t
+/** Parse a string into a TMPL_TYPE_ATTR_* or #TMPL_TYPE_LIST type #vp_tmpl_t
  *
  * @note Unlike #tmpl_from_attr_substr this function will error out if the entire
  *     name string isn't parsed.
  *
  * @copydetails tmpl_from_attr_substr
  */
-ssize_t tmpl_from_attr_str(value_pair_tmpl_t *vpt, char const *name,
+ssize_t tmpl_from_attr_str(vp_tmpl_t *vpt, char const *name,
                           request_refs_t request_def, pair_lists_t list_def,
                           bool allow_unknown, bool allow_undefined)
 {
@@ -784,16 +784,16 @@ ssize_t tmpl_from_attr_str(value_pair_tmpl_t *vpt, char const *name,
        return slen;
 }
 
-/** Parse a string into a TMPL_TYPE_ATTR_* or #TMPL_TYPE_LIST type #value_pair_tmpl_t
+/** Parse a string into a TMPL_TYPE_ATTR_* or #TMPL_TYPE_LIST type #vp_tmpl_t
  *
  * @note Unlike #tmpl_from_attr_substr this function will error out if the entire
  *     name string isn't parsed.
  *
- * @param[in,out] ctx to allocate #value_pair_tmpl_t in.
- * @param[out] out Where to write pointer to new #value_pair_tmpl_t.
+ * @param[in,out] ctx to allocate #vp_tmpl_t in.
+ * @param[out] out Where to write pointer to new #vp_tmpl_t.
  * @param[in] name of attribute including #request_refs and #pair_lists qualifiers.
  *     If only #request_refs #pair_lists qualifiers are found, a #TMPL_TYPE_LIST
- *     #value_pair_tmpl_t will be produced.
+ *     #vp_tmpl_t will be produced.
  * @param[in] request_def The default #REQUEST to set if no #request_refs qualifiers are
  *     found in name.
  * @param[in] list_def The default list to set if no #pair_lists qualifiers are found in
@@ -801,28 +801,28 @@ ssize_t tmpl_from_attr_str(value_pair_tmpl_t *vpt, char const *name,
  * @param[in] allow_unknown If true attributes in the format accepted by
  *     #dict_unknown_from_substr will be allowed, even if they're not in the main
  *     dictionaries.
- *     If an unknown attribute is found A #TMPL_TYPE_ATTR #value_pair_tmpl_t ill be
+ *     If an unknown attribute is found A #TMPL_TYPE_ATTR #vp_tmpl_t ill be
  *     produced with the unknown #DICT_ATTR stored in the ``unknown.da`` buffer.
  *     This #DICT_ATTR will have its ``flags.is_unknown`` field set to true.
- *     If #tmpl_from_attr_substr is being called on startup, the #value_pair_tmpl_t may be
+ *     If #tmpl_from_attr_substr is being called on startup, the #vp_tmpl_t may be
  *     fed to #tmpl_define_unknown_attr to add it to the main dictionaries.
- *     If #tmpl_from_attr_substr is not called, the #value_pair_tmpl_t cannot be used to
+ *     If #tmpl_from_attr_substr is not called, the #vp_tmpl_t cannot be used to
  *     search for #VALUE_PAIR in a #REQUEST.
  * @param[in] allow_undefined If true, we don't generate a parse error on unknown attributes.
- *     If an unknown attribute is found a #TMPL_TYPE_ATTR_UNDEFINED #value_pair_tmpl_t
+ *     If an unknown attribute is found a #TMPL_TYPE_ATTR_UNDEFINED #vp_tmpl_t
  *     will be produced.
  * @return <= 0 on error (offset as negative integer), > 0 on success
  *     (number of bytes parsed).
  *     @see REMARKER to produce pretty error markers from the return value.
  */
-ssize_t tmpl_afrom_attr_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *name,
+ssize_t tmpl_afrom_attr_str(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *name,
                            request_refs_t request_def, pair_lists_t list_def,
                            bool allow_unknown, bool allow_undefined)
 {
        ssize_t slen;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
-       MEM(vpt = talloc(ctx, value_pair_tmpl_t)); /* tmpl_from_attr_substr zeros it */
+       MEM(vpt = talloc(ctx, vp_tmpl_t)); /* tmpl_from_attr_substr zeros it */
 
        slen = tmpl_from_attr_substr(vpt, name, request_def, list_def, allow_unknown, allow_undefined);
        if (slen <= 0) {
@@ -843,7 +843,7 @@ ssize_t tmpl_afrom_attr_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const
        return slen;
 }
 
-/** Convert an arbitrary string into a #value_pair_tmpl_t
+/** Convert an arbitrary string into a #vp_tmpl_t
  *
  * @note Unlike #tmpl_afrom_attr_str return code 0 doesn't necessarily indicate failure,
  *     may just mean a 0 length string was parsed.
@@ -854,9 +854,9 @@ ssize_t tmpl_afrom_attr_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const
  *
  * @note For details of attribute parsing see #tmpl_from_attr_substr.
  *
- * @param[in,out] ctx To allocate #value_pair_tmpl_t in.
- * @param[out] out Where to write the pointer to the new #value_pair_tmpl_t.
- * @param[in] in String to convert to a #value_pair_tmpl_t.
+ * @param[in,out] ctx To allocate #vp_tmpl_t in.
+ * @param[out] out Where to write the pointer to the new #vp_tmpl_t.
+ * @param[in] in String to convert to a #vp_tmpl_t.
  * @param[in] inlen length of string to convert.
  * @param[in] type of quoting around value. May be one of:
  *     - #T_BARE_WORD - If string begins with ``&`` produces #TMPL_TYPE_ATTR,
@@ -880,7 +880,7 @@ ssize_t tmpl_afrom_attr_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const
  *
  * @see tmpl_from_attr_substr
  */
-ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *in, size_t inlen, FR_TOKEN type,
+ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *in, size_t inlen, FR_TOKEN type,
                       request_refs_t request_def, pair_lists_t list_def, bool do_unescape)
 {
        bool do_xlat;
@@ -888,7 +888,7 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *in,
        char const *p;
        ssize_t slen;
        PW_TYPE data_type = PW_TYPE_STRING;
-       value_pair_tmpl_t *vpt = NULL;
+       vp_tmpl_t *vpt = NULL;
        value_data_t data;
 
        switch (type) {
@@ -1005,7 +1005,7 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *in,
 }
 /* @} **/
 
-/** @name Cast or convert #value_pair_tmpl_t
+/** @name Cast or convert #vp_tmpl_t
  *
  * #tmpl_cast_in_place can be used to convert #TMPL_TYPE_LITERAL to a #TMPL_TYPE_DATA of a
  *  specified #PW_TYPE.
@@ -1021,7 +1021,7 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *in,
  * @{
  */
 
-/** Convert a #value_pair_tmpl_t containing literal data, to the type specified
+/** Convert a #vp_tmpl_t containing literal data, to the type specified
  *
  * @note Conversion is done in place.
  *
@@ -1030,7 +1030,7 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, value_pair_tmpl_t **out, char const *in,
  * @param[in] enumv Enumerated dictionary values associated with a #DICT_ATTR.
  * @return 0 on success, -1 on failure.
  */
-int tmpl_cast_in_place(value_pair_tmpl_t *vpt, PW_TYPE type, DICT_ATTR const *enumv)
+int tmpl_cast_in_place(vp_tmpl_t *vpt, PW_TYPE type, DICT_ATTR const *enumv)
 {
        ssize_t ret;
 
@@ -1055,13 +1055,13 @@ int tmpl_cast_in_place(value_pair_tmpl_t *vpt, PW_TYPE type, DICT_ATTR const *en
        return 0;
 }
 
-/** Convert #value_pair_tmpl_t of type #TMPL_TYPE_LITERAL to #TMPL_TYPE_DATA of type #PW_TYPE_STRING
+/** Convert #vp_tmpl_t of type #TMPL_TYPE_LITERAL to #TMPL_TYPE_DATA of type #PW_TYPE_STRING
  *
  * @note Conversion is done in place.
  *
  * @param[in,out] vpt The template to modify. Must be of type #TMPL_TYPE_LITERAL.
  */
-void tmpl_cast_in_place_str(value_pair_tmpl_t *vpt)
+void tmpl_cast_in_place_str(vp_tmpl_t *vpt)
 {
        rad_assert(vpt != NULL);
        rad_assert(vpt->type == TMPL_TYPE_LITERAL);
@@ -1074,7 +1074,7 @@ void tmpl_cast_in_place_str(value_pair_tmpl_t *vpt)
        vpt->tmpl_data_length = talloc_array_length(vpt->tmpl_data.vp_strvalue) - 1;
 }
 
-/** Expand a #value_pair_tmpl_t to a string, parse it as an attribute of type cast, create a #VALUE_PAIR from the result
+/** Expand a #vp_tmpl_t to a string, parse it as an attribute of type cast, create a #VALUE_PAIR from the result
  *
  * @note Like #tmpl_expand, but produces a #VALUE_PAIR.
  *
@@ -1091,7 +1091,7 @@ void tmpl_cast_in_place_str(value_pair_tmpl_t *vpt)
  * @return 0 on success, -1 on failure.
  */
 int tmpl_cast_to_vp(VALUE_PAIR **out, REQUEST *request,
-                   value_pair_tmpl_t const *vpt, DICT_ATTR const *cast)
+                   vp_tmpl_t const *vpt, DICT_ATTR const *cast)
 {
        int rcode;
        VALUE_PAIR *vp;
@@ -1138,13 +1138,13 @@ int tmpl_cast_to_vp(VALUE_PAIR **out, REQUEST *request,
        return 0;
 }
 
-/** Add an unknown #DICT_ATTR specified by a #value_pair_tmpl_t to the main dictionary
+/** Add an unknown #DICT_ATTR specified by a #vp_tmpl_t to the main dictionary
  *
  * @param vpt to add. ``tmpl_da`` pointer will be updated to point to the
  *     #DICT_ATTR inserted into the dictionary.
  * @return 0 on success, -1 on failure.
  */
-int tmpl_define_unknown_attr(value_pair_tmpl_t *vpt)
+int tmpl_define_unknown_attr(vp_tmpl_t *vpt)
 {
        DICT_ATTR const *da;
 
@@ -1166,16 +1166,16 @@ int tmpl_define_unknown_attr(value_pair_tmpl_t *vpt)
 }
 /* @} **/
 
-/** @name Resolve a #value_pair_tmpl_t outputting the result in various formats
+/** @name Resolve a #vp_tmpl_t outputting the result in various formats
  *
  * @{
  */
 
-/** Expand a #value_pair_tmpl_t to a string, writing the result to a buffer
+/** Expand a #vp_tmpl_t to a string, writing the result to a buffer
  *
  * Depending what arguments are passed, either copies the value to buff, or writes a pointer
  * to a string buffer to out. This allows the most efficient access to the value resolved by
- * the #value_pair_tmpl_t, avoiding unecessary string copies.
+ * the #vp_tmpl_t, avoiding unecessary string copies.
  *
  * @param out Where to write a pointer to the string buffer. On return may point to buff if
  *     buff was used to store the value. Otherwise will point to a #value_data_t buffer,
@@ -1195,7 +1195,7 @@ int tmpl_define_unknown_attr(value_pair_tmpl_t *vpt)
  * @return -1 on error, else the length of data written to buff, or pointed to by out.
  */
 ssize_t tmpl_expand(char const **out, char *buff, size_t bufflen, REQUEST *request,
-                   value_pair_tmpl_t const *vpt, RADIUS_ESCAPE_STRING escape, void *escape_ctx)
+                   vp_tmpl_t const *vpt, RADIUS_ESCAPE_STRING escape, void *escape_ctx)
 {
        VALUE_PAIR *vp;
        ssize_t slen = -1;      /* quiet compiler */
@@ -1332,7 +1332,7 @@ ssize_t tmpl_expand(char const **out, char *buff, size_t bufflen, REQUEST *reque
  * @param escape_ctx xlat escape function data.
  * @return -1 on error, else the length of data written to buff, or pointed to by out.
  */
-ssize_t tmpl_aexpand(TALLOC_CTX *ctx, char **out, REQUEST *request, value_pair_tmpl_t const *vpt,
+ssize_t tmpl_aexpand(TALLOC_CTX *ctx, char **out, REQUEST *request, vp_tmpl_t const *vpt,
                     RADIUS_ESCAPE_STRING escape, void *escape_ctx)
 {
        VALUE_PAIR *vp;
@@ -1445,16 +1445,16 @@ ssize_t tmpl_aexpand(TALLOC_CTX *ctx, char **out, REQUEST *request, value_pair_t
        return slen;
 }
 
-/** Print a #value_pair_tmpl_t to a string
+/** Print a #vp_tmpl_t to a string
  *
- * @param[out] out Where to write the presentation format #value_pair_tmpl_t string.
+ * @param[out] out Where to write the presentation format #vp_tmpl_t string.
  * @param[in] outlen Size of output buffer.
  * @param[in] vpt to print
  * @param[in] values Used for integer attributes only. #DICT_ATTR to use when mapping integer
  *     values to strings.
  * @return the size of the string written to the output buffer.
  */
-size_t tmpl_prints(char *out, size_t outlen, value_pair_tmpl_t const *vpt, DICT_ATTR const *values)
+size_t tmpl_prints(char *out, size_t outlen, vp_tmpl_t const *vpt, DICT_ATTR const *values)
 {
        size_t len;
        char c;
@@ -1633,9 +1633,9 @@ size_t tmpl_prints(char *out, size_t outlen, value_pair_tmpl_t const *vpt, DICT_
        return q - out;
 }
 
-/** Initialise a #vp_cursor_t to the #VALUE_PAIR specified by a #value_pair_tmpl_t
+/** Initialise a #vp_cursor_t to the #VALUE_PAIR specified by a #vp_tmpl_t
  *
- * This makes iterating over the one or more #VALUE_PAIR specified by a #value_pair_tmpl_t
+ * This makes iterating over the one or more #VALUE_PAIR specified by a #vp_tmpl_t
  * significantly easier.
  *
  * @param err May be NULL if no error code is required. Will be set to:
@@ -1646,12 +1646,12 @@ size_t tmpl_prints(char *out, size_t outlen, value_pair_tmpl_t const *vpt, DICT_
  * @param cursor to store iterator state.
  * @param request The current #REQUEST.
  * @param vpt specifying the #VALUE_PAIR type/tag or list to iterate over.
- * @return the first #VALUE_PAIR specified by the #value_pair_tmpl_t, or NULL if no matching
+ * @return the first #VALUE_PAIR specified by the #vp_tmpl_t, or NULL if no matching
  *     #VALUE_PAIR found, and NULL on error.
  *
  * @see tmpl_cursor_next
  */
-VALUE_PAIR *tmpl_cursor_init(int *err, vp_cursor_t *cursor, REQUEST *request, value_pair_tmpl_t const *vpt)
+VALUE_PAIR *tmpl_cursor_init(int *err, vp_cursor_t *cursor, REQUEST *request, vp_tmpl_t const *vpt)
 {
        VALUE_PAIR **vps, *vp = NULL;
 
@@ -1749,7 +1749,7 @@ VALUE_PAIR *tmpl_cursor_init(int *err, vp_cursor_t *cursor, REQUEST *request, va
  *     - #TMPL_TYPE_ATTR
  * @return NULL if no more matching #VALUE_PAIR of the specified type/tag are found.
  */
-VALUE_PAIR *tmpl_cursor_next(vp_cursor_t *cursor, value_pair_tmpl_t const *vpt)
+VALUE_PAIR *tmpl_cursor_next(vp_cursor_t *cursor, vp_tmpl_t const *vpt)
 {
        rad_assert((vpt->type == TMPL_TYPE_ATTR) || (vpt->type == TMPL_TYPE_LIST));
 
@@ -1772,7 +1772,7 @@ VALUE_PAIR *tmpl_cursor_next(vp_cursor_t *cursor, value_pair_tmpl_t const *vpt)
        }
 }
 
-/** Copy pairs matching a #value_pair_tmpl_t in the current #REQUEST
+/** Copy pairs matching a #vp_tmpl_t in the current #REQUEST
  *
  * @param ctx to allocate new #VALUE_PAIR in.
  * @param out Where to write the copied #VALUE_PAIR (s).
@@ -1787,7 +1787,7 @@ VALUE_PAIR *tmpl_cursor_next(vp_cursor_t *cursor, value_pair_tmpl_t const *vpt)
  *     - -3 if context could not be found (no parent #REQUEST available).
  *     - -4 on memory allocation error.
  */
-int tmpl_copy_vps(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vpt)
+int tmpl_copy_vps(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, vp_tmpl_t const *vpt)
 {
        VALUE_PAIR *vp;
        vp_cursor_t from, to;
@@ -1816,7 +1816,7 @@ int tmpl_copy_vps(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, value_pai
        return err;
 }
 
-/** Returns the first VP matching a #value_pair_tmpl_t
+/** Returns the first VP matching a #vp_tmpl_t
  *
  * @param out where to write the retrieved vp.
  * @param request The current #REQUEST.
@@ -1829,7 +1829,7 @@ int tmpl_copy_vps(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, value_pai
  *     - -2 if list could not be found (doesn't exist in current #REQUEST).
  *     - -3 if context could not be found (no parent #REQUEST available).
  */
-int tmpl_find_vp(VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vpt)
+int tmpl_find_vp(VALUE_PAIR **out, REQUEST *request, vp_tmpl_t const *vpt)
 {
        vp_cursor_t cursor;
        VALUE_PAIR *vp;
@@ -1846,7 +1846,7 @@ int tmpl_find_vp(VALUE_PAIR **out, REQUEST *request, value_pair_tmpl_t const *vp
 /* @} **/
 
 #ifdef WITH_VERIFY_PTR
-/** Used to check whether areas of a value_pair_tmpl_t are zeroed out
+/** Used to check whether areas of a vp_tmpl_t are zeroed out
  *
  * @param ptr Offset to begin checking at.
  * @param len How many bytes to check.
@@ -1864,27 +1864,27 @@ static uint8_t const *not_zeroed(uint8_t const *ptr, size_t len)
 }
 #define CHECK_ZEROED(_x) not_zeroed((uint8_t const *)&_x + sizeof(_x), sizeof(vpt->data) - sizeof(_x))
 
-/** Verify fields of a value_pair_tmpl_t make sense
+/** Verify fields of a vp_tmpl_t make sense
  *
- * @note If the #value_pair_tmpl_t is invalid, causes the server to exit.
+ * @note If the #vp_tmpl_t is invalid, causes the server to exit.
  *
  * @param file obtained with __FILE__.
  * @param line obtained with __LINE__.
  * @param vpt to check.
  */
-void tmpl_verify(char const *file, int line, value_pair_tmpl_t const *vpt)
+void tmpl_verify(char const *file, int line, vp_tmpl_t const *vpt)
 {
        rad_assert(vpt);
 
        if (vpt->type == TMPL_TYPE_UNKNOWN) {
-               FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: value_pair_tmpl_t type was "
+               FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: vp_tmpl_t type was "
                             "TMPL_TYPE_UNKNOWN (uninitialised)", file, line);
                fr_assert(0);
                fr_exit_now(1);
        }
 
        if (vpt->type > TMPL_TYPE_NULL) {
-               FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: value_pair_tmpl_t type was %i "
+               FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: vp_tmpl_t type was %i "
                             "(outside range of tmpl_names)", file, line, vpt->type);
                fr_assert(0);
                fr_exit_now(1);
index e88ddfa..8c6846b 100644 (file)
@@ -64,7 +64,7 @@ struct xlat_exp {
        xlat_exp_t *child;      //!< Nested expansion.
        xlat_exp_t *alternate;  //!< Alternative expansion if this one expanded to a zero length string.
 
-       value_pair_tmpl_t attr; //!< An attribute template.
+       vp_tmpl_t attr; //!< An attribute template.
        xlat_t const *xlat;     //!< The xlat expansion to expand format with.
 };
 
@@ -383,7 +383,7 @@ static ssize_t xlat_debug_attr(UNUSED void *instance, REQUEST *request, char con
        VALUE_PAIR *vp;
        vp_cursor_t cursor;
 
-       value_pair_tmpl_t vpt;
+       vp_tmpl_t vpt;
 
        if (!RDEBUG_ENABLED2) {
                *out = '\0';
@@ -1774,7 +1774,7 @@ static ssize_t xlat_tokenize_request(REQUEST *request, char const *fmt, xlat_exp
 }
 
 
-static char *xlat_getvp(TALLOC_CTX *ctx, REQUEST *request, value_pair_tmpl_t const *vpt,
+static char *xlat_getvp(TALLOC_CTX *ctx, REQUEST *request, vp_tmpl_t const *vpt,
                        bool escape, bool return_null)
 {
        VALUE_PAIR *vp = NULL, *virtual = NULL;
@@ -2468,13 +2468,13 @@ static ssize_t xlat_expand(char **out, size_t outlen, REQUEST *request, char con
 
 /** Try to convert an xlat to a tmpl for efficiency
  *
- * @param ctx to allocate new value_pair_tmpl_t in.
+ * @param ctx to allocate new vp_tmpl_t in.
  * @param node to convert.
- * @return NULL if unable to convert (not necessarily error), or a new value_pair_tmpl_t.
+ * @return NULL if unable to convert (not necessarily error), or a new vp_tmpl_t.
  */
-value_pair_tmpl_t *xlat_to_tmpl_attr(TALLOC_CTX *ctx, xlat_exp_t *node)
+vp_tmpl_t *xlat_to_tmpl_attr(TALLOC_CTX *ctx, xlat_exp_t *node)
 {
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        if (node->next || (node->type != XLAT_ATTRIBUTE)) return NULL;
 
@@ -2497,9 +2497,9 @@ value_pair_tmpl_t *xlat_to_tmpl_attr(TALLOC_CTX *ctx, xlat_exp_t *node)
  *
  * @param ctx to allocate new xlat_expt_t in.
  * @param vpt to convert.
- * @return NULL if unable to convert (not necessarily error), or a new value_pair_tmpl_t.
+ * @return NULL if unable to convert (not necessarily error), or a new vp_tmpl_t.
  */
-xlat_exp_t *xlat_from_tmpl_attr(TALLOC_CTX *ctx, value_pair_tmpl_t *vpt)
+xlat_exp_t *xlat_from_tmpl_attr(TALLOC_CTX *ctx, vp_tmpl_t *vpt)
 {
        xlat_exp_t *node;
 
index d1582a8..81c0b6b 100644 (file)
@@ -226,7 +226,7 @@ static bool get_number(REQUEST *request, char const **string, int64_t *answer)
        if (*p == '&') {
                ssize_t slen;
                VALUE_PAIR *vp;
-               value_pair_tmpl_t vpt;
+               vp_tmpl_t vpt;
 
                p += 1;
 
@@ -1168,7 +1168,7 @@ static ssize_t hmac_sha1_xlat(UNUSED void *instance, REQUEST *request,
 static ssize_t pairs_xlat(UNUSED void *instance, REQUEST *request,
                          char const *fmt, char *out, size_t outlen)
 {
-       value_pair_tmpl_t vpt;
+       vp_tmpl_t vpt;
        vp_cursor_t cursor;
        size_t len, freespace = outlen;
        char *p = out;
@@ -1282,7 +1282,7 @@ static ssize_t base64_to_hex_xlat(UNUSED void *instance, REQUEST *request,
 static ssize_t explode_xlat(UNUSED void *instance, REQUEST *request,
                            char const *fmt, char *out, size_t outlen)
 {
-       value_pair_tmpl_t vpt;
+       vp_tmpl_t vpt;
        vp_cursor_t cursor, to_merge;
        VALUE_PAIR *vp, *head = NULL;
        ssize_t slen;
@@ -1481,14 +1481,14 @@ static ssize_t next_time_xlat(UNUSED void *instance, REQUEST *request,
  *     Parse the 3 arguments to lpad / rpad.
  */
 static bool parse_pad(REQUEST *request, char const *fmt,
-                      value_pair_tmpl_t **pvpt, size_t *plength,
+                      vp_tmpl_t **pvpt, size_t *plength,
                       char *fill)
 {
        ssize_t slen;
        unsigned long length;
        char const *p;
        char *end;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        *fill = ' ';            /* the default */
 
@@ -1500,7 +1500,7 @@ static bool parse_pad(REQUEST *request, char const *fmt,
                return false;
        }
 
-       vpt = talloc(request, value_pair_tmpl_t);
+       vpt = talloc(request, vp_tmpl_t);
        if (!vpt) return false;
 
        slen = tmpl_from_attr_substr(vpt, p, REQUEST_CURRENT, PAIR_LIST_REQUEST, false, false);
@@ -1564,7 +1564,7 @@ static ssize_t lpad_xlat(UNUSED void *instance, REQUEST *request,
        char fill;
        size_t pad;
        ssize_t len;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        *out = '\0';
        if (!parse_pad(request, fmt, &vpt, &pad, &fill)) {
@@ -1606,7 +1606,7 @@ static ssize_t rpad_xlat(UNUSED void *instance, REQUEST *request,
        char fill;
        size_t pad;
        ssize_t len;
-       value_pair_tmpl_t *vpt;
+       vp_tmpl_t *vpt;
 
        *out = '\0';
 
index a60451e..5d45799 100644 (file)
@@ -112,8 +112,8 @@ typedef struct ldap_instance {
         *      User object attributes and filters
         */
        char const      *user_sasl_mech;                //!< SASL mechanism to use for user binds.
-       value_pair_tmpl_t *userobj_filter;              //!< Filter to retrieve only user objects.
-       value_pair_tmpl_t *userobj_base_dn;             //!< DN to search for users under.
+       vp_tmpl_t *userobj_filter;              //!< Filter to retrieve only user objects.
+       vp_tmpl_t *userobj_base_dn;             //!< DN to search for users under.
        char const      *userobj_scope_str;             //!< Scope (sub, one, base).
        int             userobj_scope;                  //!< Search scope.
 
@@ -130,7 +130,7 @@ typedef struct ldap_instance {
         */
 
        char const      *groupobj_filter;               //!< Filter to retrieve only group objects.
-       value_pair_tmpl_t *groupobj_base_dn;            //!< DN to search for users under.
+       vp_tmpl_t *groupobj_base_dn;            //!< DN to search for users under.
        char const      *groupobj_scope_str;            //!< Scope (sub, one, base).
        int             groupobj_scope;                 //!< Search scope.
 
@@ -170,13 +170,13 @@ typedef struct ldap_instance {
        /*
         *      Profiles
         */
-       value_pair_tmpl_t *default_profile;             //!< If this is set, we will search for a profile object
+       vp_tmpl_t *default_profile;             //!< If this is set, we will search for a profile object
                                                        //!< with this name, and map any attributes it contains.
                                                        //!< No value should be set if profiles are not being used
                                                        //!< as there is an associated performance penalty.
        char const      *profile_attr;                  //!< Attribute that identifies profiles to apply. May appear
                                                        //!< in userobj or groupobj.
-       value_pair_tmpl_t *profile_filter;              //!< Filter to retrieve only retrieve group objects.
+       vp_tmpl_t *profile_filter;              //!< Filter to retrieve only retrieve group objects.
 
        /*
         *      Accounting
index 0500e2a..1cd2c33 100644 (file)
@@ -1314,7 +1314,7 @@ static int json_pairmake(rlm_rest_t *instance, rlm_rest_section_t *section,
                        .is_json = 0
                };
 
-               value_pair_tmpl_t dst;
+               vp_tmpl_t dst;
                REQUEST *current = request;
                VALUE_PAIR **vps, *vp = NULL;