patch-2.3.99-pre2 linux/include/linux/netfilter_ipv4/ip_conntrack_helper.h

Next file: linux/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
Previous file: linux/include/linux/netfilter_ipv4/ip_conntrack_ftp.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre1/linux/include/linux/netfilter_ipv4/ip_conntrack_helper.h linux/include/linux/netfilter_ipv4/ip_conntrack_helper.h
@@ -0,0 +1,30 @@
+/* IP connection tracking helpers. */
+#ifndef _IP_CONNTRACK_HELPER_H
+#define _IP_CONNTRACK_HELPER_H
+#include <linux/netfilter_ipv4/ip_conntrack.h>
+
+struct module;
+
+struct ip_conntrack_helper
+{	
+	/* Internal use. */
+	struct list_head list;
+
+	/* Returns TRUE if it wants to help this connection (tuple is
+           the tuple of REPLY packets from server). */
+	int (*will_help)(const struct ip_conntrack_tuple *rtuple);
+
+	/* Function to call when data passes; return verdict, or -1 to
+           invalidate. */
+	int (*help)(const struct iphdr *, size_t len,
+		    struct ip_conntrack *ct,
+		    enum ip_conntrack_info conntrackinfo);
+};
+
+extern int ip_conntrack_helper_register(struct ip_conntrack_helper *);
+extern void ip_conntrack_helper_unregister(struct ip_conntrack_helper *);
+
+/* Add an expected connection. */
+extern int ip_conntrack_expect_related(struct ip_conntrack *related_to,
+				       const struct ip_conntrack_tuple *tuple);
+#endif /*_IP_CONNTRACK_HELPER_H*/

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)