[NETFILTER]: Add ctnetlink subsystem
[deliverable/linux.git] / include / linux / netfilter_ipv4 / ip_conntrack_helper.h
CommitLineData
1da177e4
LT
1/* IP connection tracking helpers. */
2#ifndef _IP_CONNTRACK_HELPER_H
3#define _IP_CONNTRACK_HELPER_H
4#include <linux/netfilter_ipv4/ip_conntrack.h>
5
6struct module;
7
8struct ip_conntrack_helper
9{
10 struct list_head list; /* Internal use. */
11
12 const char *name; /* name of the module */
13 struct module *me; /* pointer to self */
14 unsigned int max_expected; /* Maximum number of concurrent
15 * expected connections */
16 unsigned int timeout; /* timeout for expecteds */
17
18 /* Mask of things we will help (compared against server response) */
19 struct ip_conntrack_tuple tuple;
20 struct ip_conntrack_tuple mask;
21
22 /* Function to call when data passes; return verdict, or -1 to
23 invalidate. */
24 int (*help)(struct sk_buff **pskb,
25 struct ip_conntrack *ct,
26 enum ip_conntrack_info conntrackinfo);
080774a2
HW
27
28 int (*to_nfattr)(struct sk_buff *skb, const struct ip_conntrack *ct);
1da177e4
LT
29};
30
31extern int ip_conntrack_helper_register(struct ip_conntrack_helper *);
32extern void ip_conntrack_helper_unregister(struct ip_conntrack_helper *);
33
34/* Allocate space for an expectation: this is mandatory before calling
4acdbdbe
RR
35 ip_conntrack_expect_related. You will have to call put afterwards. */
36extern struct ip_conntrack_expect *
37ip_conntrack_expect_alloc(struct ip_conntrack *master);
38extern void ip_conntrack_expect_put(struct ip_conntrack_expect *exp);
1da177e4
LT
39
40/* Add an expected connection: can have more than one per connection */
41extern int ip_conntrack_expect_related(struct ip_conntrack_expect *exp);
42extern void ip_conntrack_unexpect_related(struct ip_conntrack_expect *exp);
43
44#endif /*_IP_CONNTRACK_HELPER_H*/
This page took 0.056669 seconds and 5 git commands to generate.