From 746f7031f4d1e3bccdd6db3c53835d8b85b73c90 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 17 Jan 2009 18:03:53 +0100 Subject: src: add state polling support (oppossed to current event-driven) This patch adds the clause PollSecs that changes the normal behaviour of conntrackd. With PollSecs set to > 0, conntrackd polls every N seconds the entries. This is the opposed behaviour of an event-driven behaviour but may be useful for those that have really strong limitations in terms of CPU consumption and want to perform a relaxed replication. Signed-off-by: Pablo Neira Ayuso --- include/conntrackd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/conntrackd.h b/include/conntrackd.h index fbf126a..acf907c 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -48,6 +48,7 @@ #define CTD_SYNC_FTFW (1UL << 2) #define CTD_SYNC_ALARM (1UL << 3) #define CTD_SYNC_NOTRACK (1UL << 4) +#define CTD_POLL (1UL << 5) /* FILENAME_MAX is 4096 on my system, perhaps too much? */ #ifndef FILENAME_MAXLEN @@ -85,6 +86,7 @@ struct ct_conf { int family; /* protocol family */ unsigned int resend_queue_size; /* FTFW protocol */ unsigned int window_size; + int poll_kernel_secs; int cache_write_through; int filter_from_kernelspace; int event_iterations_limit; -- cgit v1.2.3