Source code of Windows XP (NT5)
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.

75 lines
3.1 KiB

  1. /********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1990-2000 **/
  4. /********************************************************************/
  5. /* :ts=4 */
  6. //** IGMP.H - IP multicast definitions.
  7. //
  8. // This file contains definitions related to IP multicast.
  9. // IP protocol number for IGMP
  10. #define PROT_IGMP 2
  11. extern uint IGMPLevel;
  12. extern HANDLE IcmpHeaderPool;
  13. // Structure used for local mcast address tracking.
  14. typedef struct IGMPAddr {
  15. struct IGMPAddr *iga_next;
  16. struct IGMPSrcAddr *iga_srclist;
  17. IPAddr iga_addr;
  18. uint iga_grefcnt; // # sockets joining whole group
  19. uint iga_isrccnt; // # sources with isa_irefcnt>0
  20. uint iga_resptimer; // query response timer
  21. uint iga_resptype; // response type
  22. uint iga_trtimer; // triggered report timer
  23. uchar iga_changetype;// triggered change type
  24. uchar iga_xmitleft; // triggered xmit's left
  25. } IGMPAddr;
  26. // Values of iga_resptype
  27. #define NO_RESP 0
  28. #define GROUP_RESP 1
  29. #define GROUP_SOURCE_RESP 2
  30. // Values of iga_changetype
  31. #define NO_CHANGE 0
  32. #define MODE_CHANGE 1
  33. #define SOURCE_CHANGE 2
  34. typedef struct IGMPSrcAddr {
  35. struct IGMPSrcAddr *isa_next;
  36. IPAddr isa_addr;
  37. uint isa_irefcnt; // # sockets Including this source
  38. uint isa_xrefcnt; // # sockets Excluding this source
  39. uchar isa_xmitleft; // triggered xmit's left
  40. uchar isa_csmarked; // response xmit's left
  41. } IGMPSrcAddr;
  42. #define IGMP_ADD 0
  43. #define IGMP_DELETE 1
  44. #define IGMP_DELETE_ALL 2
  45. #define IGMP_CHANGE 3
  46. #define IGMPV1 2 //IGMP version 1
  47. #define IGMPV2 3 //IGMP version 2
  48. #define IGMPV3 4 //IGMP version 3
  49. extern void InitIGMPForNTE(NetTableEntry *NTE);
  50. extern void StopIGMPForNTE(NetTableEntry *NTE);
  51. extern IP_STATUS IGMPAddrChange(NetTableEntry *NTE, IPAddr Addr,
  52. uint ChangeType,
  53. uint NumExclSources, IPAddr *ExclSourceList,
  54. uint NumEnclSources, IPAddr *InclSourceList);
  55. extern IP_STATUS IGMPInclChange(NetTableEntry *NTE, IPAddr Addr,
  56. uint NumAddSources, IPAddr *AddSourceList,
  57. uint NumDelSources, IPAddr *DelSourceList);
  58. extern IP_STATUS IGMPExclChange(NetTableEntry *NTE, IPAddr Addr,
  59. uint NumAddSources, IPAddr *AddSourceList,
  60. uint NumDelSources, IPAddr *DelSourceList);
  61. extern void IGMPTimer(NetTableEntry *NTE);
  62. extern uchar IsMCastSourceAllowed(IPAddr Dest, IPAddr Src, uchar Protocol, NetTableEntry *NTE);
  63. #define IGMP_TABLE_SIZE 32
  64. #define IGMP_HASH(x) ((((uchar *)&(x))[3]) % IGMP_TABLE_SIZE)