/[pdpsoft]/trunk/grid-mw-security/ees/include/common/pdl.h
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/include/common/pdl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 783 - (show annotations) (download) (as text)
Mon Sep 14 15:22:35 2009 UTC (12 years, 4 months ago) by aramv
File MIME type: text/x-csrc
File size: 1726 byte(s)
Made _pdl_path and file extern
1 #ifndef PDL_H
2 #define PDL_H
3 #include "ees_config.h"
4 #if HAVE_STDIO_H
5 #include <stdio.h>
6 #endif
7 #if HAVE_STDLIB_H
8 #include <stdlib.h>
9 #endif
10 #include "ng_log.h"
11 #include "plugin_manager.h"
12 #include "ees_config.h"
13 #include "eef.h"
14
15 #undef TRUE
16 #undef FALSE
17 #undef BOOL
18 #define TRUE 1
19 #define FALSE (!TRUE)
20
21 extern char* _pdl_path;
22 extern FILE* file;
23
24 extern int yylex(void);
25 extern int yyparse(void);
26 extern FILE* yyin;
27 extern int yylex_destroy(void);
28
29 typedef struct record_s {
30 char* string; //!< Hold the symbol that lex has found.
31 int lineno; //!< Hold the line number the symbol has been found.
32 } record_t;
33
34 /*!
35 * \brief Structure keeps track of the state and the true/false
36 * braches.
37 *
38 */
39 typedef struct rule_s {
40 const char* state; //!< Name of the state.
41 unsigned int lineno; //!< Line number where rule appeared.
42 struct rule_s* true_branch; //!< Name of the true_branch, or 0 if none.
43 struct rule_s* false_branch; //!< Name of the false_branch, or 0 if none.
44 } rule_t;
45
46 typedef struct policy_s {
47 lcmaps_plugindl_t* current;
48 lcmaps_plugindl_t* next_success;
49 lcmaps_plugindl_t* next_failure;
50 struct rule_s* head_rule;
51 } policy_t;
52
53 EES_RC pdl_init(const char*);
54 EES_RC pdl_term();
55 record_t* concat_strings(record_t*, record_t*);
56 record_t* concat_strings_with_space(record_t*, record_t*);
57
58 int yyerror(const char*);
59 void set_path(record_t*);
60 void add_policy(record_t*, rule_t*);
61 rule_t* add_rule(record_t*, record_t*, record_t*);
62 const char* pdl_path(void);
63 void remove_policy(record_t* policy);
64 void add_variable(record_t* name, record_t* value);
65 char** _var_to_argv(char*, int*);
66 EES_RC allow_rules(int);
67 EES_RC allowed_policy_rule(const char* label);
68
69 #endif

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28