1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef LIBXATTR_H
30 #define LIBXATTR_H
31
32 #include <sys/types.h>
33 #include <stdlib.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 typedef void*(*libxattr_malloc_func)(
void *pool,
size_t size);
40 typedef void(*libxattr_free_func)(
void *pool,
void *ptr);
41
42
43 char ** xattr_list(
const char *path,
ssize_t *nelm);
44
45 char * xattr_get(
const char *path,
const char *attr,
ssize_t *len);
46
47 char * xattr_get_alloc(
48 void *pool,
49 libxattr_malloc_func malloc_func,
50 libxattr_free_func free_func,
51 const char *path,
52 const char *attr,
53 ssize_t *len);
54
55 int xattr_set(
const char *path,
const char *name,
const void *value,
size_t len);
56
57 int xattr_remove(
const char *path,
const char *name);
58
59 void xattr_free_list(
char **attrnames,
ssize_t nelm);
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif
66
67