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 1.0KB

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