Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

pdl_policy.h File Reference

Include file for using the pdl policies. More...

#include "pdl.h"
#include "pdl_rule.h"

Include dependency graph for pdl_policy.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  policy_s
 Keeping track of found policies. More...


Typedefs

typedef struct policy_s  policy_t
 Keeping track of found policies. More...


Functions

void add_policy (record_t *policy, rule_t *rules)
void remove_policy (record_t *name)
void show_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_tfind_policy (const char *name)
policy_tcurrent_policy (void)
policy_tget_policies (void)


Detailed Description

Include file for using the pdl policies.

Author:
G.M. Venekamp (venekamp@nikhef.nl)
Version:
Revision:
1.8
Date:
Date:
2003/07/30 14:37:08

Definition in file pdl_policy.h.


Typedef Documentation

typedef struct policy_s policy_t
 

Keeping track of found policies.


Function Documentation

void add_policy ( record_t * policy,
rule_t * rules )
 

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.

Parameters:
name   Name of the policy.
rules   List of associated rules for the policy.

Definition at line 84 of file pdl_policy.c.

void allow_rules ( BOOL allow )
 

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.

Parameters:
allow   TRUE if addition of new rules is allowd, FALSE otherwise.

Definition at line 66 of file pdl_policy.c.

Referenced by _add_policy().

BOOL check_policies_for_recursion ( void )
 

Check for recursions in the policy rules.

Returns:
TRUE if at least one recustion has been found, FALSE otherwise.

Definition at line 190 of file pdl_policy.c.

policy_t* current_policy ( void )
 

Return the current policy.

Returns:
Current policy.

Definition at line 50 of file pdl_policy.c.

policy_t* find_policy ( const char * name )
 

Find a policy based.

Parameters:
name   Name of the policy to be found. \retrun The policy if a polict with name 'name' exists, 0 otherwise.

Definition at line 171 of file pdl_policy.c.

Referenced by _add_policy(), and _add_rule().

void free_policies ( void )
 

Free all policies and their allocated resources.

Definition at line 271 of file pdl_policy.c.

policy_t* get_policies ( void )
 

Get the list of policies.

Returns:
First policy in the list.

Definition at line 244 of file pdl_policy.c.

BOOL policies_have_been_reduced ( void )
 

Tell if the reduce_policy() call has been called.

Returns:
TRUE if reduce_policy() has been called; FALSE otherwise.

Definition at line 293 of file pdl_policy.c.

void reduce_policies ( void )
 

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.

void remove_policy ( record_t * name )
 

Remove a policy from the list of policies and free all associated resources of the policy.

Parameters:
name   Policy to be removed.

Definition at line 157 of file pdl_policy.c.

void show_policies ( void )
 

Display the policies and the rules associated with the policy.

Definition at line 254 of file pdl_policy.c.


Generated at Thu Mar 4 17:39:40 2004 for edg-lcmaps by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001