Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / include / linux / icmpv6.h
bloba8f888976137820e9b6a94a5d6bf37619073d19a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_ICMPV6_H
3 #define _LINUX_ICMPV6_H
5 #include <linux/skbuff.h>
6 #include <uapi/linux/icmpv6.h>
8 static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
10 return (struct icmp6hdr *)skb_transport_header(skb);
13 #include <linux/netdevice.h>
15 #if IS_ENABLED(CONFIG_IPV6)
16 extern void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info);
18 typedef void ip6_icmp_send_t(struct sk_buff *skb, u8 type, u8 code, __u32 info,
19 const struct in6_addr *force_saddr);
20 extern int inet6_register_icmp_sender(ip6_icmp_send_t *fn);
21 extern int inet6_unregister_icmp_sender(ip6_icmp_send_t *fn);
22 int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type,
23 unsigned int data_len);
25 #else
27 static inline void icmpv6_send(struct sk_buff *skb,
28 u8 type, u8 code, __u32 info)
32 #endif
34 extern int icmpv6_init(void);
35 extern int icmpv6_err_convert(u8 type, u8 code,
36 int *err);
37 extern void icmpv6_cleanup(void);
38 extern void icmpv6_param_prob(struct sk_buff *skb,
39 u8 code, int pos);
41 struct flowi6;
42 struct in6_addr;
43 extern void icmpv6_flow_init(struct sock *sk,
44 struct flowi6 *fl6,
45 u8 type,
46 const struct in6_addr *saddr,
47 const struct in6_addr *daddr,
48 int oif);
49 #endif