mei_rt2
Last change
on this file since e10abf8 was
2e9455f,
checked in by Mei <mei@…>, 12 years ago
|
1) added namespace
2) tweak ?This,
3) allowing linking role/oset as constraining conditions
4) adding access_tests regression testing that uses GENI's access policy
5) added couple multi contexts regression tests
6) add compression/uncompression calls to abac_encode_string/abac_decode_string
(libstrongwan only allows 512 char for attribute rule storage)
7) add attribute_now option to creddy that takes a whole char string for attribute
rule
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[2e9455f] | 1 | #ifndef __ABAC_LIST_H__ |
---|
| 2 | #define __ABAC_LIST_H__ |
---|
[6d5623e] | 3 | |
---|
| 4 | #include "utlist.h" |
---|
| 5 | |
---|
| 6 | typedef struct _abac_list_t abac_list_t; |
---|
| 7 | typedef struct _abac_list_element_t abac_list_element_t; |
---|
| 8 | |
---|
| 9 | struct _abac_list_element_t { |
---|
| 10 | void *ptr; |
---|
| 11 | abac_list_element_t *prev, *next; |
---|
| 12 | }; |
---|
| 13 | |
---|
| 14 | struct _abac_list_t { |
---|
| 15 | abac_list_element_t *elts; |
---|
| 16 | int size; |
---|
| 17 | }; |
---|
| 18 | |
---|
| 19 | #define abac_list_foreach(LIST, CURRENT, BODY) do { \ |
---|
| 20 | abac_list_element_t *_elt; \ |
---|
| 21 | DL_FOREACH(LIST->elts, _elt) { \ |
---|
| 22 | CURRENT = (typeof(CURRENT))_elt->ptr; \ |
---|
| 23 | BODY \ |
---|
| 24 | } \ |
---|
| 25 | } while (0) |
---|
| 26 | |
---|
[2e9455f] | 27 | /* exported */ |
---|
| 28 | extern abac_list_t *abac_list_new(void); |
---|
| 29 | extern void abac_list_add(abac_list_t *list, void *elt); |
---|
| 30 | extern int abac_list_unique_add(abac_list_t *list, void *elt); |
---|
| 31 | extern void abac_list_prepend(abac_list_t *list, void *elt); |
---|
| 32 | extern int abac_list_remove(abac_list_t *list, void *elt); |
---|
| 33 | extern int abac_list_size(abac_list_t *list); |
---|
| 34 | extern void abac_list_free(abac_list_t *list); |
---|
| 35 | |
---|
| 36 | #endif /* __ABAC_LIST_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.