]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - include/linux/icmpv6.h
ipv6: translate ICMP_TIME_EXCEEDED to ICMPV6_TIME_EXCEED
[mirror_ubuntu-artful-kernel.git] / include / linux / icmpv6.h
1 #ifndef _LINUX_ICMPV6_H
2 #define _LINUX_ICMPV6_H
3
4 #include <linux/skbuff.h>
5 #include <uapi/linux/icmpv6.h>
6
7 static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
8 {
9 return (struct icmp6hdr *)skb_transport_header(skb);
10 }
11
12 #include <linux/netdevice.h>
13
14 #if IS_ENABLED(CONFIG_IPV6)
15 extern void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info);
16
17 typedef void ip6_icmp_send_t(struct sk_buff *skb, u8 type, u8 code, __u32 info,
18 const struct in6_addr *force_saddr);
19 extern int inet6_register_icmp_sender(ip6_icmp_send_t *fn);
20 extern int inet6_unregister_icmp_sender(ip6_icmp_send_t *fn);
21 int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type);
22
23 #else
24
25 static inline void icmpv6_send(struct sk_buff *skb,
26 u8 type, u8 code, __u32 info)
27 {
28
29 }
30 #endif
31
32 extern int icmpv6_init(void);
33 extern int icmpv6_err_convert(u8 type, u8 code,
34 int *err);
35 extern void icmpv6_cleanup(void);
36 extern void icmpv6_param_prob(struct sk_buff *skb,
37 u8 code, int pos);
38
39 struct flowi6;
40 struct in6_addr;
41 extern void icmpv6_flow_init(struct sock *sk,
42 struct flowi6 *fl6,
43 u8 type,
44 const struct in6_addr *saddr,
45 const struct in6_addr *daddr,
46 int oif);
47 #endif