#include "pdl.h"
#include "pdl_rule.h"
Go to the source code of this file.
Data Structures | |
struct | policy_s |
Keeping track of found policies. More... | |
Typedefs | |
typedef policy_s | policy_t |
Keeping track of found policies. | |
Functions | |
void | add_policy (record_t *policy, rule_t *rules) |
void | remove_policy (record_t *name) |
void | show_policies (void) |
void | cleanup_policies (void) |
void | free_policies (void) |
void | allow_rules (BOOL allow) |
BOOL | check_policies_for_recursion (void) |
void | reduce_policies (void) |
BOOL | policies_have_been_reduced (void) |
policy_t * | find_policy (const char *name) |
policy_t * | get_policies (void) |
const policy_t * | get_current_policy (void) |
Definition in file pdl_policy.h.
|
Wrapper around the _add_policy(name) function. When the _add_policy() call fails, this function cleans up the data structure allocated for holding information about the policy that was found. See _add_policy() for information about the kind of reasons it can fail.
Definition at line 83 of file pdl_policy.c. References _add_policy(), free_rules(), record_t, rule_t, start_new_rules(), and record_s::string. |
|
Allow or disallow the additions of rules depending on the argument. When for example a policy is defined for the second time, an error should be generated, but the parsing should still continue. However, no rules can be added to the policy as there is currently no policy defined.
Definition at line 65 of file pdl_policy.c. References allow_new_rules(). Referenced by _add_policy(). |
|
Check for recursions in the policy rules.
Definition at line 190 of file pdl_policy.c. References check_rule_for_recursion(), get_policies(), lcmaps_log_debug(), policy_s::name, policy_s::next, policy_t, policy_s::rule, and TRUE. Referenced by startEvaluationManager(). |
|
Cleanup the policies. The tree that had been built up might contain policy rules which do not contain any rules. This function removes all policy rules with an empty rule set. Definition at line 275 of file pdl_policy.c. References policy_s::next, policy_t, policy_s::prev, and policy_s::rule. Referenced by startEvaluationManager(). |
|
Find a policy by its name
Definition at line 171 of file pdl_policy.c. References policy_s::name, policy_s::next, and policy_t. Referenced by _add_policy(), and _add_rule(). |
|
Free all policies and their allocated resources. Definition at line 306 of file pdl_policy.c. References free_rules(), policy_s::name, policy_s::next, policy_t, policy_s::rule, and set_top_rule(). Referenced by free_resources(). |
|
Return the current policy. Definition at line 79 of file pdl_main.c. References policy_t. Referenced by runEvaluationManager(). |
|
Get the list of policies.
Definition at line 244 of file pdl_policy.c. References policy_t. Referenced by check_policies_for_recursion(), get_plugins(), pdl_next_plugin(), and reduce_policies(). |
|
Tell if the reduce_policy() call has been called.
Definition at line 368 of file pdl_policy.c. References policies_reduced. Referenced by get_plugins(). |
|
Reduce_policies to its elemantry form, i.e. each policy has a list of rules which need to be reduced. Definition at line 217 of file pdl_policy.c. References get_policies(), policy_s::next, rule_s::next, policies_reduced, policy_t, reduce_rule(), policy_s::rule, rule_t, set_top_rule(), and TRUE. |
|
Remove a policy from the list of policies and free all associated resources of the policy.
Definition at line 157 of file pdl_policy.c. References record_t, and record_s::string. |
|
Display the policies and the rules associated with the policy. Definition at line 254 of file pdl_policy.c. References lcmaps_log_debug(), policy_s::name, policy_s::next, policy_t, policy_s::rule, and show_rules(). |