You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

icmp6.h 1014B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef _GPXE_ICMP6_H
  2. #define _GPXE_ICMP6_H
  3. /** @file
  4. *
  5. * ICMP6 protocol
  6. *
  7. */
  8. #include <gpxe/ip6.h>
  9. #include <gpxe/ndp.h>
  10. #define ICMP6_NSOLICIT 135
  11. #define ICMP6_NADVERT 136
  12. extern struct tcpip_protocol icmp6_protocol;
  13. struct icmp6_header {
  14. uint8_t type;
  15. uint8_t code;
  16. uint16_t csum;
  17. /* Message body */
  18. };
  19. struct neighbour_solicit {
  20. uint8_t type;
  21. uint8_t code;
  22. uint16_t csum;
  23. uint32_t reserved;
  24. struct in6_addr target;
  25. /* "Compulsory" options */
  26. uint8_t opt_type;
  27. uint8_t opt_len;
  28. /* FIXME: hack alert */
  29. uint8_t opt_ll_addr[6];
  30. };
  31. struct neighbour_advert {
  32. uint8_t type;
  33. uint8_t code;
  34. uint16_t csum;
  35. uint8_t flags;
  36. uint8_t reserved;
  37. struct in6_addr target;
  38. uint8_t opt_type;
  39. uint8_t opt_len;
  40. /* FIXME: hack alert */
  41. uint8_t opt_ll_addr[6];
  42. };
  43. #define ICMP6_FLAGS_ROUTER 0x80
  44. #define ICMP6_FLAGS_SOLICITED 0x40
  45. #define ICMP6_FLAGS_OVERRIDE 0x20
  46. int icmp6_send_solicit ( struct net_device *netdev, struct in6_addr *src, struct in6_addr *dest );
  47. #endif /* _GPXE_ICMP6_H */