summaryrefslogtreecommitdiffstats
path: root/include/ulogd/ulogd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ulogd/ulogd.h')
-rw-r--r--include/ulogd/ulogd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/ulogd/ulogd.h b/include/ulogd/ulogd.h
index f850160..0dbdcc1 100644
--- a/include/ulogd/ulogd.h
+++ b/include/ulogd/ulogd.h
@@ -203,4 +203,23 @@ extern struct ulogd_keyh_entry *ulogd_keyh;
#define IS_NEEDED(x) (x.flags & ULOGD_RETF_NEEDED)
#define SET_NEEDED(x) (x.flags |= ULOGD_RETF_NEEDED)
+/***********************************************************************
+ * file descriptor handling
+ ***********************************************************************/
+
+#define ULOGD_FD_READ 0x0001
+#define ULOGD_FD_WRITE 0x0002
+#define ULOGD_FD_EXCEPT 0x0004
+
+struct ulogd_fd {
+ struct list_head list;
+ int fd; /* file descriptor */
+ unsigned int when;
+ int (*cb)(int fd, unsigned int what, void *data);
+ void *data; /* void * to pass to callback */
+};
+
+int ulogd_register_fd(struct ulogd_fd *ufd);
+void ulogd_unregister_fd(struct ulogd_fd *ufd);
+
#endif /* _ULOGD_H */