summaryrefslogtreecommitdiff
path: root/include/conntrackd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/conntrackd.h')
-rw-r--r--include/conntrackd.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/include/conntrackd.h b/include/conntrackd.h
index 9359dfa..d338fc4 100644
--- a/include/conntrackd.h
+++ b/include/conntrackd.h
@@ -69,6 +69,7 @@
#define CTD_SYNC_NOTRACK (1UL << 4)
#define CTD_POLL (1UL << 5)
#define CTD_EXPECT (1UL << 6)
+#define CTD_HELPER (1UL << 7)
/* FILENAME_MAX is 4096 on my system, perhaps too much? */
#ifndef FILENAME_MAXLEN
@@ -103,7 +104,6 @@ struct ct_conf {
unsigned int netlink_buffer_size_max_grown;
int nl_overrun_resync;
unsigned int flags;
- int family; /* protocol family */
unsigned int resend_queue_size; /* FTFW protocol */
unsigned int window_size;
int poll_kernel_secs;
@@ -134,6 +134,9 @@ struct ct_conf {
int syslog_facility;
size_t buffer_size;
} stats;
+ struct {
+ struct list_head list;
+ } cthelper;
};
#define STATE(x) st.x
@@ -252,24 +255,41 @@ struct ct_stats_state {
struct cache *cache; /* internal events cache (netlink) */
};
-union ct_state {
+#define STATE_CTH(x) state.cthelper->x
+
+struct ct_helper_state {
+ struct mnl_socket *nl;
+ uint32_t portid;
+};
+
+struct ct_state {
struct ct_sync_state *sync;
struct ct_stats_state *stats;
+ struct ct_helper_state *cthelper;
};
extern struct ct_conf conf;
-extern union ct_state state;
+extern struct ct_state state;
extern struct ct_general_state st;
struct ct_mode {
struct internal_handler *internal;
int (*init)(void);
- void (*run)(fd_set *readfds);
int (*local)(int fd, int type, void *data);
void (*kill)(void);
};
-/* conntrackd modes */
+/* basic ctnl functions */
+void ctnl_kill(void);
+int ctnl_local(int fd, int type, void *data);
+int ctnl_init(void);
+
+/* basic cthelper functions */
+void cthelper_kill(void);
+int cthelper_local(int fd, int type, void *data);
+int cthelper_init(void);
+
+/* conntrackd ctnl modes */
extern struct ct_mode sync_mode;
extern struct ct_mode stats_mode;
@@ -278,7 +298,7 @@ extern struct ct_mode stats_mode;
/* These live in run.c */
void killer(int foo);
int init(void);
-void run(void);
+void select_main_loop(void);
/* from read_config_yy.c */
int