|
| static int | _log_dst_free (fr_log_t *log) |
| |
| static int | _xlat_global_free (UNUSED void *uctx) |
| | De-register all xlat functions we created.
|
| |
| static int | _xlat_global_init (UNUSED void *uctx) |
| | Global initialisation for xlat.
|
| |
| static int | filename_xlat_escape (UNUSED request_t *request, fr_value_box_t *vb, UNUSED void *uctx) |
| |
| static xlat_action_t | protocol_decode_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| | Decode any protocol attribute / options.
|
| |
| static xlat_action_t | protocol_encode_xlat (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Encode protocol attributes / options.
|
| |
| static int | protocol_xlat_instantiate (xlat_inst_ctx_t const *mctx) |
| |
| static int | regex_xlat_escape (UNUSED request_t *request, fr_value_box_t *vb, UNUSED void *uctx) |
| |
| static void | ungroup (fr_dcursor_t *out, fr_value_box_list_t *in) |
| |
| static int | uuid_print_vb (fr_value_box_t *vb, uint32_t vals[4]) |
| | Convert a UUID in an array of uint32_t to the conventional string representation.
|
| |
| static void | uuid_set_variant (uint32_t vals[4], uint8_t variant) |
| |
| static void | uuid_set_version (uint32_t vals[4], uint8_t version) |
| |
| static xlat_action_t | xlat_change_case (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED request_t *request, fr_value_box_list_t *args, bool upper) |
| | Change case of a string.
|
| |
| void | xlat_debug_attr_list (request_t *request, fr_pair_list_t const *list) |
| |
| void | xlat_debug_attr_vp (request_t *request, fr_pair_t *vp, tmpl_t const *vpt) |
| |
| static xlat_action_t | xlat_eval_resume (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *in) |
| | Just serves to push the result up the stack.
|
| |
| static xlat_action_t | xlat_func_base64_decode (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Decode base64 string.
|
| |
| static xlat_action_t | xlat_func_base64_encode (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Encode string or attribute as base64.
|
| |
| static xlat_action_t | xlat_func_bin (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Convert hex string to binary.
|
| |
| static xlat_action_t | xlat_func_cast (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Cast one or more output value-boxes to the given type.
|
| |
| static xlat_action_t | xlat_func_concat (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Concatenate string representation of values of given attributes using separator.
|
| |
| static xlat_action_t | xlat_func_debug (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Dynamically change the debugging level for the current request.
|
| |
| static xlat_action_t | xlat_func_eval (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Dynamically evaluate an expansion string.
|
| |
| static xlat_action_t | xlat_func_explode (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Split a string into multiple new strings based on a delimiter.
|
| |
| static xlat_action_t | xlat_func_file_cat (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_file_exists (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_file_head (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_file_rm (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_file_size (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_file_tail (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_file_touch (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_hex (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Print data as hex, not as VALUE.
|
| |
| static xlat_action_t | xlat_func_hmac_md5 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| | Generate the HMAC-MD5 of a string or attribute.
|
| |
| static xlat_action_t | xlat_func_hmac_sha1 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| | Generate the HMAC-SHA1 of a string or attribute.
|
| |
| static xlat_action_t | xlat_func_immutable_attr (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Mark one or more attributes as immutable.
|
| |
| static xlat_action_t | xlat_func_integer (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Print data as integer, not as VALUE.
|
| |
| static xlat_action_t | xlat_func_join (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| | Join a series of arguments to form a single list.
|
| |
| static xlat_action_t | xlat_func_length (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| | Return the on-the-wire size of the boxes in bytes.
|
| |
| static xlat_action_t | xlat_func_log_debug (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Log something at DEBUG level.
|
| |
| static xlat_action_t | xlat_func_log_dst (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Change the log destination to the named one.
|
| |
| static xlat_action_t | xlat_func_log_err (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Log something at DEBUG level.
|
| |
| static xlat_action_t | xlat_func_log_info (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Log something at INFO level.
|
| |
| static xlat_action_t | xlat_func_log_warn (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Log something at WARN level.
|
| |
| static xlat_action_t | xlat_func_lpad (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | lpad a string
|
| |
| static xlat_action_t | xlat_func_map (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Processes fmt as a map string and applies it to the current request.
|
| |
| static xlat_action_t | xlat_func_md4 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Calculate the MD4 hash of a string or attribute.
|
| |
| static xlat_action_t | xlat_func_md5 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Calculate the MD5 hash of a string or attribute.
|
| |
| static xlat_action_t | xlat_func_next_time (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Calculate number of seconds until the next n hour(s), day(s), week(s), year(s).
|
| |
| static xlat_action_t | xlat_func_pairs_debug (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Print out attribute info.
|
| |
| static xlat_action_t | xlat_func_pairs_print (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Encode attributes as a series of string attribute/value pairs.
|
| |
| static xlat_action_t | xlat_func_rand (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| | Generate a random integer value.
|
| |
| static xlat_action_t | xlat_func_randstr (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Generate a string of random chars.
|
| |
| static xlat_action_t | xlat_func_range (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Generate a range of uint64 numbers.
|
| |
| static xlat_action_t | xlat_func_regex (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| | Get named subcapture value from previous regex.
|
| |
| static xlat_action_t | xlat_func_rpad (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Right pad a string.
|
| |
| static xlat_action_t | xlat_func_sha1 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Calculate the SHA1 hash of a string or attribute.
|
| |
| static xlat_action_t | xlat_func_signal_raise (UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| |
| static xlat_action_t | xlat_func_str_printable (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Return whether a string has only printable chars.
|
| |
| static xlat_action_t | xlat_func_str_utf8 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Return whether a string is valid UTF-8.
|
| |
| static xlat_action_t | xlat_func_strlen (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Print length of given string.
|
| |
| static xlat_action_t | xlat_func_subnet_broadcast (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Calculate the broadcast address from a IPv4 prefix.
|
| |
| static xlat_action_t | xlat_func_subnet_netmask (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Calculate the subnet mask from a IPv4 prefix.
|
| |
| static xlat_action_t | xlat_func_subst (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Perform regex substitution.
|
| |
| static xlat_action_t | xlat_func_substr (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Extract a substring from string / octets data.
|
| |
| static xlat_action_t | xlat_func_taint (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| |
| static xlat_action_t | xlat_func_time (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | Return the time as a FR_TYPE_DATE.
|
| |
| static xlat_action_t | xlat_func_time_is_dst (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *args) |
| | Return whether we are in daylight savings or not.
|
| |
| static xlat_action_t | xlat_func_time_now (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *args) |
| | Return the current time as a FR_TYPE_DATE.
|
| |
| static xlat_action_t | xlat_func_time_offset (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *args) |
| | Return the current time offset from gmt.
|
| |
| static xlat_action_t | xlat_func_time_request (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, UNUSED fr_value_box_list_t *args) |
| | Return the request receive time as a FR_TYPE_DATE.
|
| |
| static xlat_action_t | xlat_func_tolower (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| | Convert a string to lowercase.
|
| |
| static xlat_action_t | xlat_func_toupper (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| | Convert a string to uppercase.
|
| |
| static xlat_action_t | xlat_func_ungroup (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| | Ungroups all of its arguments into one flat list.
|
| |
| static xlat_action_t | xlat_func_untaint (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *in) |
| |
| static xlat_action_t | xlat_func_urlquote (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | URLencode special characters.
|
| |
| static xlat_action_t | xlat_func_urlunquote (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *args) |
| | URLdecode special characters.
|
| |
| static xlat_action_t | xlat_func_uuid_v4 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *args) |
| | Generate a version 4 UUID.
|
| |
| static xlat_action_t | xlat_func_uuid_v7 (TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *args) |
| | Generate a version 7 UUID.
|
| |
| int | xlat_global_init (void) |
| |
| static xlat_action_t | xlat_hmac (TALLOC_CTX *ctx, fr_dcursor_t *out, fr_value_box_list_t *args, uint8_t *digest, int digest_len, hmac_type type) |
| |
| static int | xlat_protocol_register (fr_dict_t const *dict) |
| |
| static int | xlat_protocol_register_by_name (dl_t *dl, char const *name, fr_dict_t const *dict) |
| |
| static int | xlat_protocol_register_cbor (void) |
| |
| int | xlat_protocols_register (void) |
| | Register xlats for any loaded dictionaries.
|
| |
| xlat_action_t | xlat_transparent (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, UNUSED request_t *request, fr_value_box_list_t *args) |
| | Common function to move boxes from input list to output list.
|
| |