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