diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-10-27 12:18:34 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-01-10 01:54:45 +0100 |
commit | 598e465087365db1fa36b67aa53d291e400ec5b1 (patch) | |
tree | 91a7867a4ad8a72e1f16ea422c2cf2b6b919d41d /src/sync-mode.c | |
parent | 931c0eff309d8c7277ebe6d670fd72d8fbe3c674 (diff) | |
download | conntrack-tools-598e465087365db1fa36b67aa53d291e400ec5b1.tar.gz conntrack-tools-598e465087365db1fa36b67aa53d291e400ec5b1.zip |
conntrackd: generalize local handler actions
This patch prepares the introduction of actions with the expectation
table. Mostly renamings.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r-- | src/sync-mode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c index 17533f8..7e6fa31 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -486,31 +486,31 @@ static int local_handler_sync(int fd, int type, void *data) int ret = LOCAL_RET_OK; switch(type) { - case DUMP_INTERNAL: + case CT_DUMP_INTERNAL: if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE(mode)->internal->ct.dump(fd, NFCT_O_PLAIN); exit(EXIT_SUCCESS); } break; - case DUMP_EXTERNAL: + case CT_DUMP_EXTERNAL: if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE_SYNC(external)->ct.dump(fd, NFCT_O_PLAIN); exit(EXIT_SUCCESS); } break; - case DUMP_INT_XML: + case CT_DUMP_INT_XML: if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE(mode)->internal->ct.dump(fd, NFCT_O_XML); exit(EXIT_SUCCESS); } break; - case DUMP_EXT_XML: + case CT_DUMP_EXT_XML: if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE_SYNC(external)->ct.dump(fd, NFCT_O_XML); exit(EXIT_SUCCESS); } break; - case COMMIT: + case CT_COMMIT: /* delete the reset alarm if any before committing */ del_alarm(&STATE_SYNC(reset_cache_alarm)); @@ -525,20 +525,20 @@ static int local_handler_sync(int fd, int type, void *data) CONFIG(purge_timeout), 0); } break; - case FLUSH_CACHE: + case CT_FLUSH_CACHE: /* inmediate flush, remove pending flush scheduled if any */ del_alarm(&STATE_SYNC(reset_cache_alarm)); dlog(LOG_NOTICE, "flushing caches"); STATE(mode)->internal->ct.flush(); STATE_SYNC(external)->ct.flush(); break; - case FLUSH_INT_CACHE: + case CT_FLUSH_INT_CACHE: /* inmediate flush, remove pending flush scheduled if any */ del_alarm(&STATE_SYNC(reset_cache_alarm)); dlog(LOG_NOTICE, "flushing internal cache"); STATE(mode)->internal->ct.flush(); break; - case FLUSH_EXT_CACHE: + case CT_FLUSH_EXT_CACHE: dlog(LOG_NOTICE, "flushing external cache"); STATE_SYNC(external)->ct.flush(); break; |