libcortex
Event loop library following a "batteries included" approach
Loading...
Searching...
No Matches
fanotify.h
1#ifndef _CRTX_FANOTIFY_H
2#define _CRTX_FANOTIFY_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*
9 * Mario Kicherer (dev@kicherer.org) 2016
10 *
11 */
12
13#include <fcntl.h>
14#include <sys/fanotify.h>
15
16// #define FANOTIFY_MSG_ETYPE "fanotify/event"
17// extern char *fanotify_msg_etype[];
18
20 struct crtx_listener_base base;
21
22 int fanotify_fd;
23 unsigned int init_flags;
24 unsigned int event_f_flags;
25 unsigned int mark_flags;
26 uint64_t mask;
27 int dirfd;
28 char *path;
29
30 char stop;
31};
32
33void crtx_fanotify_get_path(int fd, char **path, size_t *length, char *format);
34
35struct crtx_listener_base *crtx_setup_fanotify_listener(void *options);
36CRTX_DECLARE_ALLOC_FUNCTION(fanotify)
37
38void crtx_fanotify_init();
39void crtx_fanotify_finish();
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif
Definition fanotify.h:19
base structure of a listener
Definition core.h:186