Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[sfrench/cifs-2.6.git] / include / net / netfilter / ipv6 / nf_reject.h
1 #ifndef _IPV6_NF_REJECT_H
2 #define _IPV6_NF_REJECT_H
3
4 #include <linux/icmpv6.h>
5
6 static inline void
7 nf_send_unreach6(struct net *net, struct sk_buff *skb_in, unsigned char code,
8              unsigned int hooknum)
9 {
10         if (hooknum == NF_INET_LOCAL_OUT && skb_in->dev == NULL)
11                 skb_in->dev = net->loopback_dev;
12
13         icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0);
14 }
15
16 void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook);
17
18 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb,
19                                               struct tcphdr *otcph,
20                                               unsigned int *otcplen, int hook);
21 struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb,
22                                      const struct sk_buff *oldskb,
23                                      __be16 protocol, int hoplimit);
24 void nf_reject_ip6_tcphdr_put(struct sk_buff *nskb,
25                               const struct sk_buff *oldskb,
26                               const struct tcphdr *oth, unsigned int otcplen);
27
28 #endif /* _IPV6_NF_REJECT_H */