fix iov_iter_fault_in_readable()
[linux-2.6-block.git] / include / linux / icmpv6.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_ICMPV6_H
2#define _LINUX_ICMPV6_H
3
cc70ab26 4#include <linux/skbuff.h>
607ca46e 5#include <uapi/linux/icmpv6.h>
cc70ab26
ACM
6
7static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
8{
9c70220b 9 return (struct icmp6hdr *)skb_transport_header(skb);
cc70ab26 10}
1da177e4
LT
11
12#include <linux/netdevice.h>
1da177e4 13
5f5624cf
PS
14#if IS_ENABLED(CONFIG_IPV6)
15extern void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info);
16
b1cadc1a
ED
17typedef void ip6_icmp_send_t(struct sk_buff *skb, u8 type, u8 code, __u32 info,
18 const struct in6_addr *force_saddr);
5f5624cf
PS
19extern int inet6_register_icmp_sender(ip6_icmp_send_t *fn);
20extern int inet6_unregister_icmp_sender(ip6_icmp_send_t *fn);
20e1954f
ED
21int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type,
22 unsigned int data_len);
5f5624cf
PS
23
24#else
25
26static inline void icmpv6_send(struct sk_buff *skb,
27 u8 type, u8 code, __u32 info)
28{
29
30}
31#endif
1da177e4 32
9b0f976f 33extern int icmpv6_init(void);
d5fdd6ba 34extern int icmpv6_err_convert(u8 type, u8 code,
1da177e4
LT
35 int *err);
36extern void icmpv6_cleanup(void);
37extern void icmpv6_param_prob(struct sk_buff *skb,
d5fdd6ba 38 u8 code, int pos);
95e41e93 39
4c9483b2 40struct flowi6;
f59d4389 41struct in6_addr;
95e41e93 42extern void icmpv6_flow_init(struct sock *sk,
4c9483b2 43 struct flowi6 *fl6,
95e41e93
YH
44 u8 type,
45 const struct in6_addr *saddr,
46 const struct in6_addr *daddr,
47 int oif);
1da177e4 48#endif