summaryrefslogtreecommitdiff
path: root/src/sync-alarm.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/sync-alarm.c
parentb5a30cfc0b58a4ae7b3169ec9a8955b323b85ed6 (diff)
downloadconntrack-tools-c66ed8fdb8b64fcb8973f6b60a9696b59ba29ee6.tar.gz
conntrack-tools-c66ed8fdb8b64fcb8973f6b60a9696b59ba29ee6.zip
implement a rb-tree based alarm framework
Diffstat (limited to 'src/sync-alarm.c')
-rw-r--r--src/sync-alarm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sync-alarm.c b/src/sync-alarm.c
index c7cecc8..4473af2 100644
--- a/src/sync-alarm.c
+++ b/src/sync-alarm.c
@@ -27,7 +27,7 @@
#include <stdlib.h>
#include <string.h>
-static void refresher(struct alarm_list *a, void *data)
+static void refresher(struct alarm_block *a, void *data)
{
size_t len;
struct nethdr *net;
@@ -46,7 +46,7 @@ static void refresher(struct alarm_list *a, void *data)
static void cache_alarm_add(struct us_conntrack *u, void *data)
{
- struct alarm_list *alarm = data;
+ struct alarm_block *alarm = data;
init_alarm(alarm, u, refresher);
add_alarm(alarm,
@@ -56,7 +56,7 @@ static void cache_alarm_add(struct us_conntrack *u, void *data)
static void cache_alarm_update(struct us_conntrack *u, void *data)
{
- struct alarm_list *alarm = data;
+ struct alarm_block *alarm = data;
add_alarm(alarm,
random() % CONFIG(refresh) + 1,
((random() % 5 + 1) * 200000) - 1);
@@ -64,12 +64,12 @@ static void cache_alarm_update(struct us_conntrack *u, void *data)
static void cache_alarm_destroy(struct us_conntrack *u, void *data)
{
- struct alarm_list *alarm = data;
+ struct alarm_block *alarm = data;
del_alarm(alarm);
}
static struct cache_extra cache_alarm_extra = {
- .size = sizeof(struct alarm_list),
+ .size = sizeof(struct alarm_block),
.add = cache_alarm_add,
.update = cache_alarm_update,
.destroy = cache_alarm_destroy