Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __LINUX_NETFILTER_H |
| 2 | #define __LINUX_NETFILTER_H |
| 3 | |
| 4 | #ifdef __KERNEL__ |
| 5 | #include <linux/init.h> |
| 6 | #include <linux/types.h> |
| 7 | #include <linux/skbuff.h> |
| 8 | #include <linux/net.h> |
| 9 | #include <linux/if.h> |
| 10 | #include <linux/wait.h> |
| 11 | #include <linux/list.h> |
| 12 | #endif |
| 13 | #include <linux/compiler.h> |
| 14 | |
| 15 | /* Responses from hook functions. */ |
| 16 | #define NF_DROP 0 |
| 17 | #define NF_ACCEPT 1 |
| 18 | #define NF_STOLEN 2 |
| 19 | #define NF_QUEUE 3 |
| 20 | #define NF_REPEAT 4 |
| 21 | #define NF_STOP 5 |
| 22 | #define NF_MAX_VERDICT NF_STOP |
| 23 | |
Harald Welte | 0ab43f8 | 2005-08-09 19:43:44 -0700 | [diff] [blame] | 24 | /* we overload the higher bits for encoding auxiliary data such as the queue |
| 25 | * number. Not nice, but better than additional function arguments. */ |
| 26 | #define NF_VERDICT_MASK 0x0000ffff |
| 27 | #define NF_VERDICT_BITS 16 |
| 28 | |
| 29 | #define NF_VERDICT_QMASK 0xffff0000 |
| 30 | #define NF_VERDICT_QBITS 16 |
| 31 | |
Harald Welte | b766b30 | 2005-08-12 11:36:44 -0700 | [diff] [blame] | 32 | #define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE) |
Harald Welte | 0ab43f8 | 2005-08-09 19:43:44 -0700 | [diff] [blame] | 33 | |
Harald Welte | 6869c4d | 2005-08-09 19:24:19 -0700 | [diff] [blame] | 34 | /* only for userspace compatibility */ |
| 35 | #ifndef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | /* Generic cache responses from hook functions. |
| 37 | <= 0x2000 is used for protocol-flags. */ |
| 38 | #define NFC_UNKNOWN 0x4000 |
| 39 | #define NFC_ALTERED 0x8000 |
Harald Welte | 6869c4d | 2005-08-09 19:24:19 -0700 | [diff] [blame] | 40 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | |
Patrick McHardy | 6e23ae2 | 2007-11-19 18:53:30 -0800 | [diff] [blame] | 42 | enum nf_inet_hooks { |
| 43 | NF_INET_PRE_ROUTING, |
| 44 | NF_INET_LOCAL_IN, |
| 45 | NF_INET_FORWARD, |
| 46 | NF_INET_LOCAL_OUT, |
| 47 | NF_INET_POST_ROUTING, |
| 48 | NF_INET_NUMHOOKS |
| 49 | }; |
| 50 | |
Jan Engelhardt | 643a2c1 | 2007-12-17 22:43:50 -0800 | [diff] [blame] | 51 | union nf_inet_addr { |
| 52 | u_int32_t all[4]; |
| 53 | __be32 ip; |
| 54 | __be32 ip6[4]; |
| 55 | }; |
| 56 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | #ifdef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | #ifdef CONFIG_NETFILTER |
| 59 | |
| 60 | extern void netfilter_init(void); |
| 61 | |
| 62 | /* Largest hook number + 1 */ |
| 63 | #define NF_MAX_HOOKS 8 |
| 64 | |
| 65 | struct sk_buff; |
| 66 | struct net_device; |
| 67 | |
| 68 | typedef unsigned int nf_hookfn(unsigned int hooknum, |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 69 | struct sk_buff *skb, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | const struct net_device *in, |
| 71 | const struct net_device *out, |
| 72 | int (*okfn)(struct sk_buff *)); |
| 73 | |
| 74 | struct nf_hook_ops |
| 75 | { |
| 76 | struct list_head list; |
| 77 | |
| 78 | /* User fills in from here down. */ |
| 79 | nf_hookfn *hook; |
| 80 | struct module *owner; |
| 81 | int pf; |
| 82 | int hooknum; |
| 83 | /* Hooks are ordered in ascending priority. */ |
| 84 | int priority; |
| 85 | }; |
| 86 | |
| 87 | struct nf_sockopt_ops |
| 88 | { |
| 89 | struct list_head list; |
| 90 | |
| 91 | int pf; |
| 92 | |
| 93 | /* Non-inclusive ranges: use 0/0/NULL to never get called. */ |
| 94 | int set_optmin; |
| 95 | int set_optmax; |
| 96 | int (*set)(struct sock *sk, int optval, void __user *user, unsigned int len); |
Dmitry Mishin | 3fdadf7 | 2006-03-20 22:45:21 -0800 | [diff] [blame] | 97 | int (*compat_set)(struct sock *sk, int optval, |
| 98 | void __user *user, unsigned int len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | |
| 100 | int get_optmin; |
| 101 | int get_optmax; |
| 102 | int (*get)(struct sock *sk, int optval, void __user *user, int *len); |
Dmitry Mishin | 3fdadf7 | 2006-03-20 22:45:21 -0800 | [diff] [blame] | 103 | int (*compat_get)(struct sock *sk, int optval, |
| 104 | void __user *user, int *len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | |
Neil Horman | 16fcec3 | 2007-09-11 11:28:26 +0200 | [diff] [blame] | 106 | /* Use the module struct to lock set/get code in place */ |
| 107 | struct module *owner; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 | }; |
| 109 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | /* Function to register/unregister hook points. */ |
| 111 | int nf_register_hook(struct nf_hook_ops *reg); |
| 112 | void nf_unregister_hook(struct nf_hook_ops *reg); |
Patrick McHardy | 972d1cb | 2006-04-06 14:09:12 -0700 | [diff] [blame] | 113 | int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n); |
| 114 | void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | |
| 116 | /* Functions to register get/setsockopt ranges (non-inclusive). You |
| 117 | need to check permissions yourself! */ |
| 118 | int nf_register_sockopt(struct nf_sockopt_ops *reg); |
| 119 | void nf_unregister_sockopt(struct nf_sockopt_ops *reg); |
| 120 | |
Patrick McHardy | d62f9ed | 2006-11-29 02:35:17 +0100 | [diff] [blame] | 121 | #ifdef CONFIG_SYSCTL |
| 122 | /* Sysctl registration */ |
Pavel Emelyanov | b3fd3ff | 2008-01-09 00:34:02 -0800 | [diff] [blame^] | 123 | extern struct ctl_path nf_net_netfilter_sysctl_path[]; |
| 124 | extern struct ctl_path nf_net_ipv4_netfilter_sysctl_path[]; |
Patrick McHardy | d62f9ed | 2006-11-29 02:35:17 +0100 | [diff] [blame] | 125 | #endif /* CONFIG_SYSCTL */ |
| 126 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 127 | extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; |
| 128 | |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 129 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 130 | struct net_device *indev, struct net_device *outdev, |
| 131 | int (*okfn)(struct sk_buff *), int thresh); |
| 132 | |
| 133 | /** |
| 134 | * nf_hook_thresh - call a netfilter hook |
| 135 | * |
| 136 | * Returns 1 if the hook has allowed the packet to pass. The function |
| 137 | * okfn must be invoked by the caller in this case. Any other return |
| 138 | * value indicates the packet has been consumed by the hook. |
| 139 | */ |
| 140 | static inline int nf_hook_thresh(int pf, unsigned int hook, |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 141 | struct sk_buff *skb, |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 142 | struct net_device *indev, |
| 143 | struct net_device *outdev, |
Patrick McHardy | 48d5cad | 2006-02-15 15:10:22 -0800 | [diff] [blame] | 144 | int (*okfn)(struct sk_buff *), int thresh, |
| 145 | int cond) |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 146 | { |
Patrick McHardy | 48d5cad | 2006-02-15 15:10:22 -0800 | [diff] [blame] | 147 | if (!cond) |
| 148 | return 1; |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 149 | #ifndef CONFIG_NETFILTER_DEBUG |
| 150 | if (list_empty(&nf_hooks[pf][hook])) |
| 151 | return 1; |
| 152 | #endif |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 153 | return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh); |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 154 | } |
| 155 | |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 156 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb, |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 157 | struct net_device *indev, struct net_device *outdev, |
| 158 | int (*okfn)(struct sk_buff *)) |
| 159 | { |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 160 | return nf_hook_thresh(pf, hook, skb, indev, outdev, okfn, INT_MIN, 1); |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 161 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | |
| 163 | /* Activate hook; either okfn or kfree_skb called, unless a hook |
| 164 | returns NF_STOLEN (in which case, it's up to the hook to deal with |
| 165 | the consequences). |
| 166 | |
| 167 | Returns -ERRNO if packet dropped. Zero means queued, stolen or |
| 168 | accepted. |
| 169 | */ |
| 170 | |
| 171 | /* RR: |
| 172 | > I don't want nf_hook to return anything because people might forget |
| 173 | > about async and trust the return value to mean "packet was ok". |
| 174 | |
| 175 | AK: |
| 176 | Just document it clearly, then you can expect some sense from kernel |
| 177 | coders :) |
| 178 | */ |
| 179 | |
| 180 | /* This is gross, but inline doesn't cut it for avoiding the function |
| 181 | call in fast path: gcc doesn't inline (needs value tracking?). --RR */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 182 | |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 183 | /* HX: It's slightly less gross now. */ |
| 184 | |
| 185 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ |
| 186 | ({int __ret; \ |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 187 | if ((__ret=nf_hook_thresh(pf, hook, (skb), indev, outdev, okfn, thresh, 1)) == 1)\ |
Patrick McHardy | 48d5cad | 2006-02-15 15:10:22 -0800 | [diff] [blame] | 188 | __ret = (okfn)(skb); \ |
| 189 | __ret;}) |
| 190 | |
| 191 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ |
| 192 | ({int __ret; \ |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 193 | if ((__ret=nf_hook_thresh(pf, hook, (skb), indev, outdev, okfn, INT_MIN, cond)) == 1)\ |
Patrick McHardy | 16a6677 | 2006-01-06 23:01:48 -0800 | [diff] [blame] | 194 | __ret = (okfn)(skb); \ |
| 195 | __ret;}) |
| 196 | |
| 197 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ |
| 198 | NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 | |
| 200 | /* Call setsockopt() */ |
| 201 | int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, |
| 202 | int len); |
| 203 | int nf_getsockopt(struct sock *sk, int pf, int optval, char __user *opt, |
| 204 | int *len); |
| 205 | |
Dmitry Mishin | 3fdadf7 | 2006-03-20 22:45:21 -0800 | [diff] [blame] | 206 | int compat_nf_setsockopt(struct sock *sk, int pf, int optval, |
| 207 | char __user *opt, int len); |
| 208 | int compat_nf_getsockopt(struct sock *sk, int pf, int optval, |
| 209 | char __user *opt, int *len); |
| 210 | |
Harald Welte | 089af26 | 2005-08-09 19:37:23 -0700 | [diff] [blame] | 211 | /* Call this before modifying an existing packet: ensures it is |
| 212 | modifiable and linear to the point you care about (writable_len). |
| 213 | Returns true or false. */ |
Herbert Xu | 37d4187 | 2007-10-14 00:39:18 -0700 | [diff] [blame] | 214 | extern int skb_make_writable(struct sk_buff *skb, unsigned int writable_len); |
Harald Welte | 089af26 | 2005-08-09 19:37:23 -0700 | [diff] [blame] | 215 | |
Patrick McHardy | 1841a4c | 2007-12-05 01:22:05 -0800 | [diff] [blame] | 216 | struct flowi; |
Patrick McHardy | 02f014d | 2007-12-05 01:26:33 -0800 | [diff] [blame] | 217 | struct nf_queue_entry; |
Patrick McHardy | c01cd42 | 2007-12-05 01:24:48 -0800 | [diff] [blame] | 218 | |
Patrick McHardy | bce8032 | 2006-04-06 14:18:09 -0700 | [diff] [blame] | 219 | struct nf_afinfo { |
| 220 | unsigned short family; |
Al Viro | b51655b | 2006-11-14 21:40:42 -0800 | [diff] [blame] | 221 | __sum16 (*checksum)(struct sk_buff *skb, unsigned int hook, |
Patrick McHardy | 422c346 | 2006-04-06 14:18:43 -0700 | [diff] [blame] | 222 | unsigned int dataoff, u_int8_t protocol); |
Patrick McHardy | 1841a4c | 2007-12-05 01:22:05 -0800 | [diff] [blame] | 223 | int (*route)(struct dst_entry **dst, struct flowi *fl); |
Patrick McHardy | bce8032 | 2006-04-06 14:18:09 -0700 | [diff] [blame] | 224 | void (*saveroute)(const struct sk_buff *skb, |
Patrick McHardy | 02f014d | 2007-12-05 01:26:33 -0800 | [diff] [blame] | 225 | struct nf_queue_entry *entry); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 226 | int (*reroute)(struct sk_buff *skb, |
Patrick McHardy | 02f014d | 2007-12-05 01:26:33 -0800 | [diff] [blame] | 227 | const struct nf_queue_entry *entry); |
Patrick McHardy | bce8032 | 2006-04-06 14:18:09 -0700 | [diff] [blame] | 228 | int route_key_size; |
Harald Welte | 2cc7d57 | 2005-08-09 19:42:34 -0700 | [diff] [blame] | 229 | }; |
| 230 | |
Patrick McHardy | 1e796fd | 2007-12-17 22:42:27 -0800 | [diff] [blame] | 231 | extern const struct nf_afinfo *nf_afinfo[NPROTO]; |
| 232 | static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family) |
Patrick McHardy | bce8032 | 2006-04-06 14:18:09 -0700 | [diff] [blame] | 233 | { |
| 234 | return rcu_dereference(nf_afinfo[family]); |
| 235 | } |
Harald Welte | 2cc7d57 | 2005-08-09 19:42:34 -0700 | [diff] [blame] | 236 | |
Al Viro | b51655b | 2006-11-14 21:40:42 -0800 | [diff] [blame] | 237 | static inline __sum16 |
Patrick McHardy | 422c346 | 2006-04-06 14:18:43 -0700 | [diff] [blame] | 238 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, |
| 239 | u_int8_t protocol, unsigned short family) |
| 240 | { |
Patrick McHardy | 1e796fd | 2007-12-17 22:42:27 -0800 | [diff] [blame] | 241 | const struct nf_afinfo *afinfo; |
Al Viro | b51655b | 2006-11-14 21:40:42 -0800 | [diff] [blame] | 242 | __sum16 csum = 0; |
Patrick McHardy | 422c346 | 2006-04-06 14:18:43 -0700 | [diff] [blame] | 243 | |
| 244 | rcu_read_lock(); |
| 245 | afinfo = nf_get_afinfo(family); |
| 246 | if (afinfo) |
| 247 | csum = afinfo->checksum(skb, hook, dataoff, protocol); |
| 248 | rcu_read_unlock(); |
| 249 | return csum; |
| 250 | } |
| 251 | |
Patrick McHardy | 1e796fd | 2007-12-17 22:42:27 -0800 | [diff] [blame] | 252 | extern int nf_register_afinfo(const struct nf_afinfo *afinfo); |
| 253 | extern void nf_unregister_afinfo(const struct nf_afinfo *afinfo); |
Patrick McHardy | bce8032 | 2006-04-06 14:18:09 -0700 | [diff] [blame] | 254 | |
Patrick McHardy | eb9c7eb | 2006-01-06 23:06:30 -0800 | [diff] [blame] | 255 | #include <net/flow.h> |
| 256 | extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); |
| 257 | |
| 258 | static inline void |
| 259 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) |
| 260 | { |
Patrick McHardy | 051578c | 2007-12-17 22:42:51 -0800 | [diff] [blame] | 261 | #ifdef CONFIG_NF_NAT_NEEDED |
Patrick McHardy | eb9c7eb | 2006-01-06 23:06:30 -0800 | [diff] [blame] | 262 | void (*decodefn)(struct sk_buff *, struct flowi *); |
| 263 | |
Patrick McHardy | 051578c | 2007-12-17 22:42:51 -0800 | [diff] [blame] | 264 | if (family == AF_INET) { |
| 265 | rcu_read_lock(); |
| 266 | decodefn = rcu_dereference(ip_nat_decode_session); |
| 267 | if (decodefn) |
| 268 | decodefn(skb, fl); |
| 269 | rcu_read_unlock(); |
| 270 | } |
Patrick McHardy | eb9c7eb | 2006-01-06 23:06:30 -0800 | [diff] [blame] | 271 | #endif |
| 272 | } |
| 273 | |
Harald Welte | 608c8e4 | 2005-08-09 19:58:27 -0700 | [diff] [blame] | 274 | #ifdef CONFIG_PROC_FS |
| 275 | #include <linux/proc_fs.h> |
| 276 | extern struct proc_dir_entry *proc_net_netfilter; |
| 277 | #endif |
| 278 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | #else /* !CONFIG_NETFILTER */ |
| 280 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) |
Patrick McHardy | 48d5cad | 2006-02-15 15:10:22 -0800 | [diff] [blame] | 281 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) |
David S. Miller | f53b61d | 2006-01-07 12:50:27 -0800 | [diff] [blame] | 282 | static inline int nf_hook_thresh(int pf, unsigned int hook, |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 283 | struct sk_buff *skb, |
David S. Miller | f53b61d | 2006-01-07 12:50:27 -0800 | [diff] [blame] | 284 | struct net_device *indev, |
| 285 | struct net_device *outdev, |
Patrick McHardy | 48d5cad | 2006-02-15 15:10:22 -0800 | [diff] [blame] | 286 | int (*okfn)(struct sk_buff *), int thresh, |
| 287 | int cond) |
David S. Miller | f53b61d | 2006-01-07 12:50:27 -0800 | [diff] [blame] | 288 | { |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 289 | return okfn(skb); |
David S. Miller | f53b61d | 2006-01-07 12:50:27 -0800 | [diff] [blame] | 290 | } |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 291 | static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb, |
David S. Miller | f53b61d | 2006-01-07 12:50:27 -0800 | [diff] [blame] | 292 | struct net_device *indev, struct net_device *outdev, |
| 293 | int (*okfn)(struct sk_buff *)) |
| 294 | { |
Patrick McHardy | 9c92d34 | 2006-02-15 15:18:19 -0800 | [diff] [blame] | 295 | return 1; |
David S. Miller | f53b61d | 2006-01-07 12:50:27 -0800 | [diff] [blame] | 296 | } |
David S. Miller | f53b61d | 2006-01-07 12:50:27 -0800 | [diff] [blame] | 297 | struct flowi; |
Patrick McHardy | eb9c7eb | 2006-01-06 23:06:30 -0800 | [diff] [blame] | 298 | static inline void |
| 299 | nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {} |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 300 | #endif /*CONFIG_NETFILTER*/ |
| 301 | |
Yasuyuki Kozakai | 5f79e0f | 2007-03-23 11:17:07 -0700 | [diff] [blame] | 302 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
| 303 | extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *); |
| 304 | extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); |
Yasuyuki Kozakai | de6e05c | 2007-03-23 11:17:27 -0700 | [diff] [blame] | 305 | extern void (*nf_ct_destroy)(struct nf_conntrack *); |
Yasuyuki Kozakai | 5f79e0f | 2007-03-23 11:17:07 -0700 | [diff] [blame] | 306 | #else |
| 307 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
| 308 | #endif |
| 309 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 310 | #endif /*__KERNEL__*/ |
| 311 | #endif /*__LINUX_NETFILTER_H*/ |