source: libabac/abac_common.h @ d037f54

mei_rt2mei_rt2_fix_1
Last change on this file since d037f54 was d037f54, checked in by Mei <mei@…>, 12 years ago

1) able to programmatially build structure, bake attribute credential

write it out to a .der file and use prover to bring it back and
process just like other .der files.
-- tested with rt1 like policy without constraint.

2) changed abac_term structure alittle to ready it for 2 pass code

gen.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1#ifndef __ABAC_COMMON_H__
2#define __ABAC_COMMON_H__
3
4typedef struct _abac_chunk_t {
5    unsigned char *ptr;
6    int len;
7} abac_chunk_t;
8
9typedef enum _idtype_t {
10    e_KEYID = 1,
11} abac_idtype_t;
12/* idtypename[idtype] */
13static const char * const _idtypename[] =
14{
15  "badidtype", "keyid"
16};
17static int _idtypename_cnt=1;
18
19typedef enum _termtype {
20    e_TERM_INTEGER = 1,
21    e_TERM_URN = 2,
22    e_TERM_FLOAT = 3,
23    e_TERM_BOOLEAN = 4,
24    e_TERM_STRING = 5,
25    e_TERM_TIME = 6,
26    e_TERM_PRINCIPAL = 7,
27    e_TERM_ANONYMOUS = 8
28} abac_termtype_t;
29/* termname[dtermtype] */
30static const char *const _termname[] =
31{
32  "badterm",
33  "integer",
34  "urn",
35  "float",
36  "boolean",
37  "string",
38  "time" ,
39  "principal",
40  "anonymous"
41};
42static int _termname_cnt=8;
43
44typedef enum _condtype_t {
45    e_COND_ROLE = 1,
46    e_COND_OSET = 2,
47    e_COND_RANGE = 3
48} abac_condtype_t;
49
50/* condname[condtype] */
51static const char *const _condname[] =
52{
53  "badcondition",
54  "role",
55  "oset",
56  "range"
57};
58static int _condname_cnt=3;
59
60typedef enum _aspecttype_t {
61    e_ASPECTTYPE_NULL = 0,
62    e_ASPECTTYPE_ROLE = 1,
63    e_ASPECTTYPE_OSET = 2,
64    e_ASPECTTYPE_INTERSECTING = 3
65} abac_aspecttype_t;
66
67#endif
Note: See TracBrowser for help on using the repository browser.