summaryrefslogtreecommitdiffstats
path: root/include/ulogd/timer.h
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-02-22 00:29:23 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-02-22 00:29:23 +0000
commitbb33d2f581228692c4686cc5ec95eb05b04a8f72 (patch)
tree559213d4fedda190fdbd6d4dc0a93bcabbd300da /include/ulogd/timer.h
parent046c16def8c0508eca9ad913076952c751e58d69 (diff)
add missing timer.h
Diffstat (limited to 'include/ulogd/timer.h')
-rw-r--r--include/ulogd/timer.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/ulogd/timer.h b/include/ulogd/timer.h
new file mode 100644
index 0000000..2a3ebc9
--- /dev/null
+++ b/include/ulogd/timer.h
@@ -0,0 +1,26 @@
+#ifndef _TIMER_H_
+#define _TIMER_H_
+
+#include <ulogd/linux_rbtree.h>
+#include <ulogd/linuxlist.h>
+
+#include <sys/time.h>
+
+struct ulogd_timer {
+ struct rb_node node;
+ struct llist_head list;
+ struct timeval tv;
+ void *data;
+ void (*cb)(struct ulogd_timer *a, void *data);
+};
+
+void ulogd_init_timer(struct ulogd_timer *t,
+ void *data,
+ void (*cb)(struct ulogd_timer *a, void *data));
+void ulogd_add_timer(struct ulogd_timer *alarm, unsigned long sc);
+void ulogd_del_timer(struct ulogd_timer *alarm);
+int ulogd_timer_pending(struct ulogd_timer *alarm);
+struct timeval *ulogd_get_next_timer_run(struct timeval *next_timer);
+struct timeval *ulogd_do_timer_run(struct timeval *next_timer);
+
+#endif