Leaked source code of windows server 2003
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.

133 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. routing\ip\rtrmgr\mhrtbt.h
  5. Abstract:
  6. Header for multicast heartbeat
  7. Revision History:
  8. Amritansh Raghav 26th Dec 1997 Created
  9. --*/
  10. #define MHBEAT_SOCKET_FLAGS \
  11. (WSA_FLAG_MULTIPOINT_C_LEAF|WSA_FLAG_MULTIPOINT_D_LEAF)
  12. typedef struct _MCAST_HBEAT_CB
  13. {
  14. BOOL bActive;
  15. //
  16. // The name/address of group
  17. //
  18. WCHAR pwszGroup[MAX_GROUP_LEN];
  19. //
  20. // The resolved address
  21. //
  22. DWORD dwGroup;
  23. //
  24. // Port or protocol
  25. //
  26. WORD wPort;
  27. //
  28. // Protocol or RAW
  29. //
  30. BYTE byProtocol;
  31. //
  32. // Set to TRUE if a gethostbyname is in progress
  33. //
  34. BOOL bResolutionInProgress;
  35. //
  36. // The socket for the interface
  37. //
  38. SOCKET sHbeatSocket;
  39. //
  40. // The dead interval in system ticks
  41. //
  42. ULONGLONG ullDeadInterval;
  43. ULONGLONG ullLastHeard;
  44. }MCAST_HBEAT_CB, *PMCAST_HBEAT_CB;
  45. //
  46. // Structure used to pass to worker function
  47. //
  48. typedef struct _HEARTBEAT_CONTEXT
  49. {
  50. DWORD dwIfIndex;
  51. PICB picb;
  52. WCHAR pwszGroup[MAX_GROUP_LEN];
  53. }HEARTBEAT_CONTEXT, *PHEARTBEAT_CONTEXT;
  54. //
  55. // Forward function declarations
  56. //
  57. DWORD
  58. SetMHeartbeatInfo(
  59. IN PICB picb,
  60. IN PRTR_INFO_BLOCK_HEADER pInfoHdr
  61. );
  62. DWORD
  63. GetMHeartbeatInfo(
  64. PICB picb,
  65. PRTR_TOC_ENTRY pToc,
  66. PBYTE pbDataPtr,
  67. PRTR_INFO_BLOCK_HEADER pInfoHdr,
  68. PDWORD pdwSize
  69. );
  70. DWORD
  71. ActivateMHeartbeat(
  72. IN PICB picb
  73. );
  74. DWORD
  75. StartMHeartbeat(
  76. IN PICB picb
  77. );
  78. DWORD
  79. CreateHbeatSocket(
  80. IN PICB picb
  81. );
  82. VOID
  83. DeleteHbeatSocket(
  84. IN PICB picb
  85. );
  86. DWORD
  87. DeActivateMHeartbeat(
  88. IN PICB picb
  89. );
  90. VOID
  91. HandleMHeartbeatMessages(
  92. VOID
  93. );