fanotify.h revision c0a0872d5c5a0e948c3ace0fb1578a64840ebc8e
#ifndef _LINUX_FANOTIFY_H
#define _LINUX_FANOTIFY_H
/* the following events that user-space can register for */
/* FIXME currently Q's have no limit.... */
/* helper events */
/* flags used for fanotify_init() */
#define FAN_CLOEXEC 0x00000001
#define FAN_NONBLOCK 0x00000002
/* flags used for fanotify_modify_mark() */
#define FAN_MARK_ADD 0x00000001
#define FAN_MARK_REMOVE 0x00000002
#define FAN_MARK_DONT_FOLLOW 0x00000004
#define FAN_MARK_ONLYDIR 0x00000008
#define FAN_MARK_MOUNT 0x00000010
#define FAN_MARK_IGNORED_MASK 0x00000020
#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040
#define FAN_MARK_FLUSH 0x00000080
#define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\
/*
* All of the events - we build the list by hand so that we can add flags in
* the future and not break backward compatibility. Apps will get only the
* events that they originally wanted. Be sure to add new events here!
*/
#define FAN_ALL_EVENTS (FAN_ACCESS |\
FAN_MODIFY |\
FAN_CLOSE |\
/*
* All events which require a permission response from userspace
*/
#define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\
#define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\
#define FANOTIFY_METADATA_VERSION 2
struct fanotify_event_metadata {
} __attribute__ ((packed));
struct fanotify_response {
} __attribute__ ((packed));
/* Legit userspace responses to a _PERM event */
#define FAN_ALLOW 0x01
#define FAN_DENY 0x02
/* Helper functions to deal with fanotify_event_metadata buffers */
#define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata))
(struct fanotify_event_metadata*)(((char *)(meta)) + \
#endif /* _LINUX_FANOTIFY_H */