icmpv6.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _LINUX_ICMPV6_H
  2. #define _LINUX_ICMPV6_H
  3. #include <linux/skbuff.h>
  4. #include <uapi/linux/icmpv6.h>
  5. static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
  6. {
  7. return (struct icmp6hdr *)skb_transport_header(skb);
  8. }
  9. #include <linux/netdevice.h>
  10. #if IS_ENABLED(CONFIG_IPV6)
  11. extern void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info);
  12. typedef void ip6_icmp_send_t(struct sk_buff *skb, u8 type, u8 code, __u32 info);
  13. extern int inet6_register_icmp_sender(ip6_icmp_send_t *fn);
  14. extern int inet6_unregister_icmp_sender(ip6_icmp_send_t *fn);
  15. #else
  16. static inline void icmpv6_send(struct sk_buff *skb,
  17. u8 type, u8 code, __u32 info)
  18. {
  19. }
  20. #endif
  21. extern int icmpv6_init(void);
  22. extern int icmpv6_err_convert(u8 type, u8 code,
  23. int *err);
  24. extern void icmpv6_cleanup(void);
  25. extern void icmpv6_param_prob(struct sk_buff *skb,
  26. u8 code, int pos);
  27. struct flowi6;
  28. struct in6_addr;
  29. extern void icmpv6_flow_init(struct sock *sk,
  30. struct flowi6 *fl6,
  31. u8 type,
  32. const struct in6_addr *saddr,
  33. const struct in6_addr *daddr,
  34. int oif);
  35. #endif