summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-08-23 12:11:20 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-08-23 12:11:20 +0200
commitcf3be894fcb95adb360425c8482954522e9110d2 (patch)
tree9a6f2a95cd36218bcf6e852ecc300074ba7fef16 /src/channel.c
parent9d99a7699d7021a1c219d6553e037ac7ba4a5a37 (diff)
downloadconntrack-tools-cf3be894fcb95adb360425c8482954522e9110d2.tar.gz
conntrack-tools-cf3be894fcb95adb360425c8482954522e9110d2.zip
conntrackd: add support state-replication based on TCP
This patch adds support for TCP as protocol to replicate state-changes between two daemons. Note that this only makes sense with the notrack mode. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c
index 9d74b7f..76fb057 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -20,11 +20,13 @@
static struct channel_ops *ops[CHANNEL_MAX];
extern struct channel_ops channel_mcast;
extern struct channel_ops channel_udp;
+extern struct channel_ops channel_tcp;
void channel_init(void)
{
ops[CHANNEL_MCAST] = &channel_mcast;
ops[CHANNEL_UDP] = &channel_udp;
+ ops[CHANNEL_TCP] = &channel_tcp;
}
#define HEADERSIZ 28 /* IP header (20 bytes) + UDP header 8 (bytes) */
@@ -183,3 +185,18 @@ void channel_stats_extended(struct channel *c, int active,
{
return c->ops->stats_extended(c, active, h, fd);
}
+
+int channel_accept_isset(struct channel *c, fd_set *readfds)
+{
+ return c->ops->accept_isset(c, readfds);
+}
+
+int channel_isset(struct channel *c, fd_set *readfds)
+{
+ return c->ops->isset(c, readfds);
+}
+
+int channel_accept(struct channel *c)
+{
+ return c->ops->accept(c);
+}