summaryrefslogtreecommitdiff
path: root/src/cache_timer.c
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-01-29 13:54:24 +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-01-29 13:54:24 +0000
commitc66ed8fdb8b64fcb8973f6b60a9696b59ba29ee6 (patch)
tree1f4b8453d082371ded73f67b763d56c7c96fd08d /src/cache_timer.c
parentb5a30cfc0b58a4ae7b3169ec9a8955b323b85ed6 (diff)
downloadconntrack-tools-c66ed8fdb8b64fcb8973f6b60a9696b59ba29ee6.tar.gz
conntrack-tools-c66ed8fdb8b64fcb8973f6b60a9696b59ba29ee6.zip
implement a rb-tree based alarm framework
Diffstat (limited to 'src/cache_timer.c')
-rw-r--r--src/cache_timer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cache_timer.c b/src/cache_timer.c
index fe997ec..6619c2c 100644
--- a/src/cache_timer.c
+++ b/src/cache_timer.c
@@ -24,7 +24,7 @@
#include <stdio.h>
-static void timeout(struct alarm_list *a, void *data)
+static void timeout(struct alarm_block *a, void *data)
{
struct us_conntrack *u = data;
@@ -34,7 +34,7 @@ static void timeout(struct alarm_list *a, void *data)
static void timer_add(struct us_conntrack *u, void *data)
{
- struct alarm_list *alarm = data;
+ struct alarm_block *alarm = data;
init_alarm(alarm, u, timeout);
add_alarm(alarm, CONFIG(cache_timeout), 0);
@@ -42,20 +42,20 @@ static void timer_add(struct us_conntrack *u, void *data)
static void timer_update(struct us_conntrack *u, void *data)
{
- struct alarm_list *alarm = data;
+ struct alarm_block *alarm = data;
add_alarm(alarm, CONFIG(cache_timeout), 0);
}
static void timer_destroy(struct us_conntrack *u, void *data)
{
- struct alarm_list *alarm = data;
+ struct alarm_block *alarm = data;
del_alarm(alarm);
}
static int timer_dump(struct us_conntrack *u, void *data, char *buf, int type)
{
struct timeval tv, tmp;
- struct alarm_list *alarm = data;
+ struct alarm_block *alarm = data;
if (type == NFCT_O_XML)
return 0;
@@ -69,7 +69,7 @@ static int timer_dump(struct us_conntrack *u, void *data, char *buf, int type)
}
struct cache_feature timer_feature = {
- .size = sizeof(struct alarm_list),
+ .size = sizeof(struct alarm_block),
.add = timer_add,
.update = timer_update,
.destroy = timer_destroy,