/[pdpsoft]/trunk/grid-mw-security/ees/include/library/eef_polytypes.h
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/include/library/eef_polytypes.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1146 - (show annotations) (download) (as text)
Thu Nov 19 16:35:31 2009 UTC (12 years, 2 months ago) by aramv
File MIME type: text/x-csrc
File size: 4009 byte(s)
Cleaned up tree building/printing code
1 /*!
2
3 \file eef_polytypes.h
4 \brief API of the EEF internal types
5 \author Aram Verstegen
6
7 */
8 #ifndef POLYTYPES_H
9 #define POLYTYPES_H
10 #if HAVE_CONFIG_H
11 #include "config.h"
12 #endif
13 #if HAVE_STDDEF_H
14 #include <stddef.h>
15 #endif
16 #if HAVE_WCHAR_H
17 #include <wchar.h>
18 #endif
19 #if HAVE_STDIO_H
20 #include <stdio.h>
21 #endif
22 #if HAVE_LINUX_LIMITS_H
23 #include <linux/limits.h>
24 #else
25 #if HAVE_SYS_PARAM_H
26 /* most bsd's */
27 #include <sys/param.h>
28 #endif
29 #endif
30
31 #define MAXPROCS 5
32 #define LCMAPS_MAXARGSTRING 2000
33
34 typedef void *eef_proc_t;
35
36 /*! Identifiers for linked process symbols */
37 typedef enum eef_proctype_e
38 {
39 INITPROC, /*!< this value corresponds to the plugin initialization function */
40 RUNPROC, /*!< this value corresponds to the plugin run function (get credentials) */
41 TERMPROC, /*!< this value corresponds to the plugin termination function */
42 INTROPROC, /*!< this value corresponds to the plugin introspect function */
43 VERIFYPROC, /*!< this value corresponds to the plugin verification function */
44 ENDOFPROCS /*< this is the last enumeration value */
45 } eef_proctype_t;
46
47
48 /*! Argument types */
49 typedef enum
50 {
51 TYPE_NONE,
52 TYPE_SCHAR,
53 TYPE_UCHAR,
54 TYPE_SHORT,
55 TYPE_USHORT,
56 TYPE_INT,
57 TYPE_UINT,
58 TYPE_LONGINT,
59 TYPE_ULONGINT,
60 #ifdef HAVE_LONG_LONG_INT
61 TYPE_LONGLONGINT,
62 TYPE_ULONGLONGINT,
63 #endif
64 TYPE_FLOAT,
65 TYPE_DOUBLE,
66 #ifdef HAVE_LONG_DOUBLE
67 TYPE_LONGDOUBLE,
68 #endif
69 TYPE_CHAR,
70 #ifdef HAVE_WINT_T
71 TYPE_WIDE_CHAR,
72 #endif
73 TYPE_STRING,
74 #ifdef HAVE_WCHAR_T
75 TYPE_WIDE_STRING,
76 #endif
77 TYPE_POINTER,
78 TYPE_COUNT_SCHAR_POINTER,
79 TYPE_COUNT_SHORT_POINTER,
80 TYPE_COUNT_INT_POINTER,
81 TYPE_COUNT_LONGINT_POINTER,
82 #ifdef HAVE_LONG_LONG_INT
83 TYPE_COUNT_LONGLONGINT_POINTER,
84 #endif
85 TYPE_PEM,
86 TYPE_X509,
87 TYPE_STACK_OF_X509,
88 TYPE_EVP_PKEY
89 } eef_arg_type;
90
91
92 /*!
93 * \brief Node structure to hold plugin nodes
94 */
95 typedef struct eef_plugindl_s
96 {
97 void * handle; /*!< dlopen handle to plugin module */
98 eef_proc_t procs[MAXPROCS]; /*!< list of handles to interface functions of plugin */
99 char pluginname[FILENAME_MAX]; /*!< name of plugin */
100 char pluginargs[LCMAPS_MAXARGSTRING]; /*!< argument string */
101 int init_argc; /*!< number of arguments for the initialization function */
102 char * init_argv[ARG_MAX]; /*!< list of arguments for the initialization function */
103 struct eef_plugindl_s * next; /*!< pointer to the next plugin in the plugin list */
104 struct eef_plugindl_s * next_policy; /*!< pointer to the next plugin tree */
105 struct eef_plugindl_s * true_branch; /*!< pointer to the next plugin in case execution succeeds */
106 struct eef_plugindl_s * false_branch; /*!< pointer to the next plugin in case execution fails */
107 } eef_plugindl_t;
108
109
110 /*!
111 * \brief Node structure to store AOS arguments
112 */
113 typedef struct aos_argument_s
114 {
115 void* data; /*! a pointer to store the data */
116 int needs_free; /*! a flag that determines wheter the data should be free'd */
117 const char * label; /*! a label to identify the data */
118 eef_arg_type type; /*! a type identifier */
119 struct aos_argument_s * parent; /*! a pointer to the 'parent' object */
120 struct aos_argument_s * child; /*! a pointer to the 'child' object */
121 struct aos_argument_s * next; /*! a pointer to the next node */
122 eef_plugindl_t * setting_plugin; /*! a pointer to the plugin that initialized this data */
123 } aos_argument_t;
124
125 #endif

Properties

Name Value
svn:mergeinfo

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