Debian Codegraph @

include/sepol/iface_record.h

raw
1 #ifndef _SEPOL_IFACE_RECORD_H_
2 #define _SEPOL_IFACE_RECORD_H_
3
4 #include <sepol/handle.h>
5 #include <sepol/context_record.h>
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 struct sepol_iface;
12 struct sepol_iface_key;
13 typedef struct sepol_iface sepol_iface_t;
14 typedef struct sepol_iface_key sepol_iface_key_t;
15
16 /* Key */
17 extern int sepol_iface_compare(const sepol_iface_t * iface,
18 const sepol_iface_key_t * key);
19
20 extern int sepol_iface_compare2(const sepol_iface_t * iface,
21 const sepol_iface_t * iface2);
22
23 extern void sepol_iface_key_unpack(const sepol_iface_key_t * key,
24 const char **name);
25
26 extern int sepol_iface_key_create(sepol_handle_t * handle,
27 const char *name,
28 sepol_iface_key_t ** key_ptr);
29
30 extern int sepol_iface_key_extract(sepol_handle_t * handle,
31 const sepol_iface_t * iface,
32 sepol_iface_key_t ** key_ptr);
33
34 extern void sepol_iface_key_free(sepol_iface_key_t * key);
35
36 /* Name */
37 extern const char *sepol_iface_get_name(const sepol_iface_t * iface);
38
39 extern int sepol_iface_set_name(sepol_handle_t * handle,
40 sepol_iface_t * iface, const char *name);
41
42 /* Context */
43 extern sepol_context_t *sepol_iface_get_ifcon(const sepol_iface_t * iface);
44
45 extern int sepol_iface_set_ifcon(sepol_handle_t * handle,
46 sepol_iface_t * iface, sepol_context_t * con);
47
48 extern sepol_context_t *sepol_iface_get_msgcon(const sepol_iface_t * iface);
49
50 extern int sepol_iface_set_msgcon(sepol_handle_t * handle,
51 sepol_iface_t * iface, sepol_context_t * con);
52
53 /* Create/Clone/Destroy */
54 extern int sepol_iface_create(sepol_handle_t * handle,
55 sepol_iface_t ** iface_ptr);
56
57 extern int sepol_iface_clone(sepol_handle_t * handle,
58 const sepol_iface_t * iface,
59 sepol_iface_t ** iface_ptr);
60
61 extern void sepol_iface_free(sepol_iface_t * iface);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif