#include "pdl.h"
Go to the source code of this file.
| Data Structures | |
| struct | rule_s | 
| Structure keeps track of the state and the true/false braches.  More... | |
| Typedefs | |
| typedef rule_s | rule_t | 
| Structure keeps track of the state and the true/false braches. | |
| Enumerations | |
| enum | rule_type_t { STATE, TRUE_BRANCH, FALSE_BRANCH } | 
| Which type is the current rule.  More... | |
| enum | recursion_t { NO_RECURSION = 0x00, RECURSION = 0x01, RECURSION_HANDLED = 0x02 } | 
| Tell something about recursion in rules.  More... | |
| enum | side_t { left_side, right_side } | 
| Given a rule, which side of the rule are we working on.  More... | |
| Functions | |
| rule_t * | add_rule (record_t *state, record_t *true_branch, record_t *false_branch) | 
| void | free_rules (rule_t *rule) | 
| void | show_rules (const rule_t *rule) | 
| void | start_new_rules (void) | 
| const rule_t * | get_top_rule (void) | 
| void | allow_new_rules (BOOL allow) | 
| void | set_top_rule (const rule_t *rule) | 
| BOOL | check_rule_for_recursion (const rule_t *rule) | 
| void | reduce_rule (rule_t *rule) | 
Definition in file pdl_rule.h.
| 
 | 
| Tell something about recursion in rules. 
 
 Definition at line 69 of file pdl_rule.h. Referenced by check_rule_for_recursion(), and has_recursion(). | 
| 
 | 
| Which type is the current rule. 
 Definition at line 59 of file pdl_rule.h. | 
| 
 | 
| Given a rule, which side of the rule are we working on. 
 
 Definition at line 79 of file pdl_rule.h. | 
| 
 | ||||||||||||||||
| Add a new rule to the list of rules. This function acts as a wrapper function for _add_rule(). 
 
 Definition at line 93 of file pdl_rule.c. References _add_rule(), record_t, rule_t, and record_s::string. | 
| 
 | 
| Is it allowed to add new rules? 
 
 Definition at line 78 of file pdl_rule.c. Referenced by allow_rules(). | 
| 
 | 
| Check the rule for occurances of recursion. 
 
 Definition at line 228 of file pdl_rule.c. References count_rules(), get_rule_number(), has_recursion(), rule_s::lineno, lineno, PDL_WARNING, RECURSION, recursion_t, rule_t, TRUE, and warning(). Referenced by check_policies_for_recursion(). | 
| 
 | 
| Free all resources associated with the rules. 
 
 Definition at line 645 of file pdl_rule.c. References rule_s::false_branch, rule_s::next, rule_t, rule_s::state, and rule_s::true_branch. Referenced by add_policy(), and free_policies(). | 
| 
 | 
| Get the top rule. 
 
 Definition at line 666 of file pdl_rule.c. References rule_t. | 
| 
 | 
| Reduce a rule to its elementry form, i.e. all variables in the rule are substituted by their respective values. 
 
 Definition at line 566 of file pdl_rule.c. References FALSE_BRANCH, rule_s::false_branch, reduce_to_var(), rule_t, STATE, rule_s::state, TRUE_BRANCH, and rule_s::true_branch. Referenced by reduce_policies(). | 
| 
 | 
| Set the top rule to a new value. 
 
 Definition at line 678 of file pdl_rule.c. References rule_t. Referenced by free_policies(), and reduce_policies(). | 
| 
 | 
| Show a rule and its descendants. 
 
 Definition at line 623 of file pdl_rule.c. References rule_s::false_branch, lcmaps_log_debug(), rule_s::next, rule_t, rule_s::state, and rule_s::true_branch. Referenced by show_policies(). | 
| 
 | 
| Start a new list of rules. Definition at line 65 of file pdl_rule.c. Referenced by add_policy(). | 
 1.3.5
 
1.3.5