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.

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef IGMP_H
  2. #define IGMP_H
  3. #include "stdint.h"
  4. #include <gpxe/in.h>
  5. #define IGMP_QUERY 0x11
  6. #define IGMPv1_REPORT 0x12
  7. #define IGMPv2_REPORT 0x16
  8. #define IGMP_LEAVE 0x17
  9. #define GROUP_ALL_HOSTS 0xe0000001 /* 224.0.0.1 Host byte order */
  10. #define MULTICAST_MASK 0xf0000000
  11. #define MULTICAST_NETWORK 0xe0000000
  12. enum {
  13. IGMP_SERVER,
  14. MAX_IGMP
  15. };
  16. struct igmp {
  17. uint8_t type;
  18. uint8_t response_time;
  19. uint16_t chksum;
  20. struct in_addr group;
  21. } PACKED;
  22. struct igmp_ip_t { /* Format of an igmp ip packet */
  23. struct iphdr ip;
  24. uint8_t router_alert[4]; /* Router alert option */
  25. struct igmp igmp;
  26. } PACKED;
  27. struct igmptable_t {
  28. struct in_addr group;
  29. unsigned long time;
  30. } PACKED;
  31. extern void join_group ( int slot, unsigned long group );
  32. extern void leave_group ( int slot );
  33. #endif /* IGMP_H */