From 9774b6c0a87a45030799abdfe8bf85a13f061c4d Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 23 Jul 2004 04:08:42 +0000 Subject: add core select() routine and (un-)registration functions --- include/ulogd/select.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/ulogd/select.h (limited to 'include') diff --git a/include/ulogd/select.h b/include/ulogd/select.h new file mode 100644 index 0000000..9562a6e --- /dev/null +++ b/include/ulogd/select.h @@ -0,0 +1,20 @@ +#ifndef ULOGD_SELECT_H +#define ULOGD_SELECT_H + +#define ULOGD_FD_F_READ 0x0001 +#define ULOGD_FD_F_WRITE 0x0002 + +struct ulogd_fd { + struct list_head list; + int fd; + unsigned int flags; + void *data; + int (*cb)(int fd, int flags, void *data); +}; + + +int ulogd_register_fd(struct ulogd_fd *fd); +int ulogd_unregister_fd(struct ulogd_fd *fd); +int ulogd_select_main(); + +#endif -- cgit v1.2.3