From bb33d2f581228692c4686cc5ec95eb05b04a8f72 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Fri, 22 Feb 2008 00:29:23 +0000 Subject: add missing timer.h --- include/ulogd/timer.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/ulogd/timer.h (limited to 'include/ulogd') 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 +#include + +#include + +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 -- cgit v1.2.3