source: libabac/abac_stack.h @ d0efdec

mei_rt2
Last change on this file since d0efdec was 2e9455f, checked in by Mei <mei@…>, 11 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: 863 bytes
Line 
1#ifndef __ABAC_STACK_H__
2#define __ABAC_STACK_H__
3
4#include "utlist.h"
5
6typedef struct _abac_stack_t abac_stack_t;
7typedef struct _abac_stack_element_t abac_stack_element_t;
8
9#define abac_stack_foreach(STACK, CURRENT, BODY) do {  \
10    abac_stack_element_t *_elt;                  \
11    DL_FOREACH(STACK->elts, _elt) {              \
12        CURRENT = (typeof(CURRENT))_elt->ptr;   \
13        BODY                                    \
14    }                                           \
15} while (0)
16
17/* exported */
18extern abac_stack_t *abac_stack_new(void);
19extern void abac_stack_push(abac_stack_t *stack, void *elt);
20extern int abac_stack_unique_push(abac_stack_t *stack, void *elt);
21extern void *abac_stack_pop(abac_stack_t *stack);
22extern int abac_stack_size(abac_stack_t *stack);
23extern void abac_stack_free(abac_stack_t *stack);
24
25#endif /* __ABAC_STACK_H__ */
Note: See TracBrowser for help on using the repository browser.