RLM_MODULE_UNKNOWN //!< Error resolving rcode (should not be
//!< returned by modules).
} rlm_rcode_t;
-extern const FR_NAME_NUMBER template_names[];
extern const FR_NAME_NUMBER modreturn_table[];
/*
TMPL_TYPE_NULL //!< VPT has no value
} tmpl_type_t;
-extern const FR_NAME_NUMBER template_names[];
+extern const FR_NAME_NUMBER tmpl_names[];
typedef struct xlat_exp xlat_exp_t;
# define EVAL_DEBUG(...)
#endif
-FR_NAME_NUMBER const template_names[] = {
- { "literal", TMPL_TYPE_LITERAL },
- { "xlat", TMPL_TYPE_XLAT },
- { "attr", TMPL_TYPE_ATTR },
- { "unknown attr", TMPL_TYPE_ATTR_UNDEFINED },
- { "list", TMPL_TYPE_LIST },
- { "regex", TMPL_TYPE_REGEX },
- { "exec", TMPL_TYPE_EXEC },
- { "data", TMPL_TYPE_DATA },
- { "parsed xlat", TMPL_TYPE_XLAT_STRUCT },
- { "parsed regex", TMPL_TYPE_REGEX_STRUCT },
- { "null", TMPL_TYPE_NULL },
- { NULL, 0 }
-};
-
FR_NAME_NUMBER const modreturn_table[] = {
{ "reject", RLM_MODULE_REJECT },
{ "fail", RLM_MODULE_FAIL },
value_pair_map_t const *map = c->data.map;
EVAL_DEBUG(">>> MAP TYPES LHS: %s, RHS: %s",
- fr_int2str(template_names, map->lhs->type, "???"),
- fr_int2str(template_names, map->rhs->type, "???"));
+ fr_int2str(tmpl_names, map->lhs->type, "???"),
+ fr_int2str(tmpl_names, map->rhs->type, "???"));
switch (map->lhs->type) {
/*
if ((map->lhs->type != TMPL_TYPE_LIST) &&
(map->lhs->type != TMPL_TYPE_ATTR)) {
REDEBUG("Mapping LHS should be an attr or list but is an %s",
- fr_int2str(template_names, map->lhs->type, "<INVALID>"));
+ fr_int2str(tmpl_names, map->lhs->type, "<INVALID>"));
return -2;
}
#include <ctype.h>
+FR_NAME_NUMBER const tmpl_names[] = {
+ { "literal", TMPL_TYPE_LITERAL },
+ { "xlat", TMPL_TYPE_XLAT },
+ { "attr", TMPL_TYPE_ATTR },
+ { "unknown attr", TMPL_TYPE_ATTR_UNDEFINED },
+ { "list", TMPL_TYPE_LIST },
+ { "regex", TMPL_TYPE_REGEX },
+ { "exec", TMPL_TYPE_EXEC },
+ { "data", TMPL_TYPE_DATA },
+ { "parsed xlat", TMPL_TYPE_XLAT_STRUCT },
+ { "parsed regex", TMPL_TYPE_REGEX_STRUCT },
+ { "null", TMPL_TYPE_NULL },
+ { NULL, 0 }
+};
+
const FR_NAME_NUMBER pair_lists[] = {
{ "request", PAIR_LIST_REQUEST },
{ "reply", PAIR_LIST_REPLY },
if (vpt->type > TMPL_TYPE_NULL) {
FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: value_pair_tmpl_t type was %i "
- "(outside range of template_names)", file, line, vpt->type);
+ "(outside range of tmpl_names)", file, line, vpt->type);
fr_assert(0);
fr_exit_now(1);
}
default:
cf_log_err(map->ci, "Operator \"%s\" not allowed for %s values",
fr_int2str(fr_tokens, map->op, "<INVALID>"),
- fr_int2str(template_names, map->rhs->type, "<INVALID>"));
+ fr_int2str(tmpl_names, map->rhs->type, "<INVALID>"));
return -1;
}
default:
default:
cf_log_err(map->ci, "Left hand side of map must be an attribute or list, not a %s",
- fr_int2str(template_names, map->lhs->type, "<INVALID>"));
+ fr_int2str(tmpl_names, map->lhs->type, "<INVALID>"));
return -1;
}
default:
cf_log_err(map->ci, "Right hand side of map must be an xlat, attribute, exec, or literal, not a %s",
- fr_int2str(template_names, map->rhs->type, "<INVALID>"));
+ fr_int2str(tmpl_names, map->rhs->type, "<INVALID>"));
return -1;
}