blob: b4f6c29caced9604ec7cc26a127a0ce145a397d2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINUX_ICMPV6_H
2#define _LINUX_ICMPV6_H
3
Arnaldo Carvalho de Melocc70ab22007-03-13 14:03:22 -03004#include <linux/skbuff.h>
David Howells607ca462012-10-13 10:46:48 +01005#include <uapi/linux/icmpv6.h>
Arnaldo Carvalho de Melocc70ab22007-03-13 14:03:22 -03006
7static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
8{
Arnaldo Carvalho de Melo9c702202007-04-25 18:04:18 -07009 return (struct icmp6hdr *)skb_transport_header(skb);
Arnaldo Carvalho de Melocc70ab22007-03-13 14:03:22 -030010}
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
12#include <linux/netdevice.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
14extern void icmpv6_send(struct sk_buff *skb,
Brian Haleyd5fdd6b2009-06-23 04:31:07 -070015 u8 type, u8 code,
Alexey Dobriyan3ffe5332010-02-18 08:25:24 +000016 __u32 info);
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
Denis V. Lunev9b0f9762008-02-29 11:13:15 -080018extern int icmpv6_init(void);
Brian Haleyd5fdd6b2009-06-23 04:31:07 -070019extern int icmpv6_err_convert(u8 type, u8 code,
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 int *err);
21extern void icmpv6_cleanup(void);
22extern void icmpv6_param_prob(struct sk_buff *skb,
Brian Haleyd5fdd6b2009-06-23 04:31:07 -070023 u8 code, int pos);
YOSHIFUJI Hideaki95e41e92007-12-06 15:43:30 -080024
David S. Miller4c9483b2011-03-12 16:22:43 -050025struct flowi6;
David S. Millerf59d4382008-03-05 20:58:10 -080026struct in6_addr;
YOSHIFUJI Hideaki95e41e92007-12-06 15:43:30 -080027extern void icmpv6_flow_init(struct sock *sk,
David S. Miller4c9483b2011-03-12 16:22:43 -050028 struct flowi6 *fl6,
YOSHIFUJI Hideaki95e41e92007-12-06 15:43:30 -080029 u8 type,
30 const struct in6_addr *saddr,
31 const struct in6_addr *daddr,
32 int oif);
Linus Torvalds1da177e2005-04-16 15:20:36 -070033#endif