summaryrefslogtreecommitdiffstats
path: root/src/libct.c
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-06-24 16:28:24 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-06-24 16:28:24 +0000
commite8c0b55fc1aac2238419cf6119930559d5c3119b (patch)
tree661764c91f6a22c6b4b9e51ad166d436f7d4466a /src/libct.c
parentce61f15a286854ce74e864924b552a55432785f5 (diff)
o Fixed syntax error (tab/space issue) in help message
o Fixed getopt handling on big endian machines o Fixed possible future read-over-end-of-array in TCP extension o Add manpage o Add missing space at output of libct_proto_icmp.c o Add status bits that were introduced in 2.6.11 o Add SCTP extension o Add support for expect creation o Bump version number to 0.63
Diffstat (limited to 'src/libct.c')
-rw-r--r--src/libct.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/libct.c b/src/libct.c
index d40c7f1..0555ec8 100644
--- a/src/libct.c
+++ b/src/libct.c
@@ -1,5 +1,6 @@
/*
- * (C) 2005 by Pablo Neira Ayuso <pablo@eurodev.net>
+ * (C) 2005 by Pablo Neira Ayuso <pablo@eurodev.net>,
+ * Harald Welte <laforge@netfilter.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -233,6 +234,28 @@ int create_conntrack(struct ip_conntrack_tuple *orig,
return 0;
}
+int create_expect(struct ip_conntrack_tuple *tuple,
+ struct ip_conntrack_tuple *mask,
+ struct ip_conntrack_tuple *master_tuple_orig,
+ struct ip_conntrack_tuple *master_tuple_reply,
+ unsigned long timeout)
+{
+ struct ctnl_handle cth;
+ int ret;
+
+ if ((ret = ctnl_open(&cth, 0)) < 0)
+ return ret;
+
+ if ((ret = ctnl_new_expect(&cth, tuple, mask, master_tuple_orig,
+ master_tuple_reply, timeout)) < 0)
+ return ret;
+
+ if ((ret = ctnl_close(&cth)) < 0)
+ return ret;
+
+ return -1;
+}
+
int delete_conntrack(struct ip_conntrack_tuple *tuple,
enum ctattr_type_t t)
{