summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-09-26 18:25:45 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-09-26 18:52:26 +0200
commit0cf75aaf19ffd08e7c63fee737423d01343f4cb9 (patch)
tree46f6da1d02085480123437819b829aebac477c14 /include
parent36118bfc4901b0978d2c8f17912fe91ec66f35e8 (diff)
nfct: modularize extensions
Modularize timeout and helper extensions. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/nfct.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/include/nfct.h b/include/nfct.h
index 5548b03..ddf9038 100644
--- a/include/nfct.h
+++ b/include/nfct.h
@@ -1,6 +1,8 @@
#ifndef _NFCT_H_
#define _NFCT_H_
+#include "linux_list.h"
+
enum {
NFCT_SUBSYS_NONE = 0,
NFCT_SUBSYS_TIMEOUT,
@@ -19,21 +21,16 @@ enum {
NFCT_CMD_DISABLE,
};
+#define __init __attribute__((constructor))
+
void nfct_perror(const char *msg);
-int nfct_cmd_timeout_parse_params(int argc, char *argv[]);
-int nfct_cmd_timeout_list(int argc, char *argv[]);
-int nfct_cmd_timeout_add(int argc, char *argv[]);
-int nfct_cmd_timeout_delete(int argc, char *argv[]);
-int nfct_cmd_timeout_get(int argc, char *argv[]);
-int nfct_cmd_timeout_flush(int argc, char *argv[]);
-
-int nfct_cmd_helper_parse_params(int argc, char *argv[]);
-int nfct_cmd_helper_list(int argc, char *argv[]);
-int nfct_cmd_helper_add(int argc, char *argv[]);
-int nfct_cmd_helper_delete(int argc, char *argv[]);
-int nfct_cmd_helper_get(int argc, char *argv[]);
-int nfct_cmd_helper_flush(int argc, char *argv[]);
-int nfct_cmd_helper_disable(int argc, char *argv[]);
+struct nfct_extension {
+ struct list_head head;
+ int type;
+ int (*parse_params)(int argc, char *argv[]);
+};
+
+void nfct_extension_register(struct nfct_extension *ext);
#endif