source: libabac/abac_common.h @ 440ba20

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

1) wrap up refactoring to move all the code gen to abac structure
2) all original testsuite passed
3) add couple more ui calls in abac.hh ie. manage constraint's

creation, hook to dump yap db.

  • Property mode set to 100644
File size: 1.4 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
67typedef enum _itemtype_t {
68    e_ITEM_MIN = 1,
69    e_ITEM_MAX = 2,
70    e_ITEM_TARGET = 3
71} abac_itemtype_t;
72
73/* itemname[itemtype] */
74static const char *const _itemname[] =
75{
76  "baditem",
77  "min",
78  "max",
79  "target"
80};
81static int _itemname_cnt=3;
82
83#endif
Note: See TracBrowser for help on using the repository browser.