ddwaf_builder_get_config_paths

Function ddwaf_builder_get_config_paths 

Source
pub unsafe extern "C" fn ddwaf_builder_get_config_paths(
    builder: ddwaf_builder,
    paths: *mut ddwaf_object,
    filter: *const c_char,
    filter_len: u32,
) -> u32
Expand description

ddwaf_builder_get_config_paths

Provides an array of the currently loaded paths, optionally matching the regex provided in filter. In addition, the count is provided as the return value, allowing paths to be nullptr.

@param builder Builder to perform the operation on. (nonnull) @param paths The object in which paths will be returned, as an array of strings. If NULL, only the count is provided. (nullable) @param filter An optional string regex to filter the provided paths. The provided regular expression is used unanchored so matches can be found at any point within the path, any necessary anchors must be explicitly added to the regex. (nullable). @param filter_len The length of the filter string (or 0 otherwise).

@return The total number of configurations loaded or, if provided, the number of those matching the filter.

@note This function is not thread-safe and the memory of the paths object must be freed by the caller.