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.

158 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. clusdef.h
  5. Abstract:
  6. Common definitions for user-mode and kernel-mode components of the
  7. cluster project.
  8. Author:
  9. Mike Massa (mikemas) 15-Feb-1997
  10. Revision History:
  11. --*/
  12. #ifndef _CLUSDEF_H
  13. #define _CLUSDEF_H
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif // __cplusplus
  17. //
  18. // Cluster node ID definition
  19. //
  20. typedef ULONG CL_NODE_ID;
  21. #define ClusterMinNodeId 1
  22. #define ClusterMinNodeIdString L"1"
  23. #define ClusterDefaultMaxNodes 16
  24. #define ClusterAnyNodeId 0
  25. #define ClusterInvalidNodeId 0xFFFFFFFF
  26. //
  27. // Default clusnet endpoint value assigned by IANA
  28. //
  29. #define CLUSNET_DEFAULT_ENDPOINT_STRING L"3343" // our UDP port number
  30. //
  31. // Default role for a cluster network.
  32. //
  33. #define CL_DEFAULT_NETWORK_ROLE ClusterNetworkRoleInternalAndClient
  34. //
  35. // Cluster network ID definition
  36. //
  37. typedef ULONG CL_NETWORK_ID, *PCL_NETWORK_ID;
  38. #define ClusterAnyNetworkId 0
  39. #define ClusterInvalidNetworkId 0xFFFFFFFF
  40. //
  41. // ClusNet node communication state definition
  42. //
  43. typedef enum {
  44. ClusnetNodeCommStateOffline = 0,
  45. ClusnetNodeCommStateOfflinePending = 1,
  46. ClusnetNodeCommStateUnreachable = 2,
  47. ClusnetNodeCommStateOnlinePending = 3,
  48. ClusnetNodeCommStateOnline = 4
  49. } CLUSNET_NODE_COMM_STATE, *PCLUSNET_NODE_COMM_STATE;
  50. //
  51. // ClusNet network state definition
  52. //
  53. typedef enum {
  54. ClusnetNetworkStateOffline = 0,
  55. ClusnetNetworkStateOfflinePending = 1,
  56. ClusnetNetworkStatePartitioned = 2,
  57. ClusnetNetworkStateOnlinePending = 3,
  58. ClusnetNetworkStateOnline = 4
  59. } CLUSNET_NETWORK_STATE, *PCLUSNET_NETWORK_STATE;
  60. //
  61. // ClusNet interface state definition
  62. //
  63. typedef enum {
  64. ClusnetInterfaceStateOffline = 0,
  65. ClusnetInterfaceStateOfflinePending = 1,
  66. ClusnetInterfaceStateUnreachable = 2,
  67. ClusnetInterfaceStateOnlinePending = 3,
  68. ClusnetInterfaceStateOnline = 4
  69. } CLUSNET_INTERFACE_STATE, *PCLUSNET_INTERFACE_STATE;
  70. //
  71. // ClusNet node membership state. This tracks the internal
  72. // membership state maintained by the membership engine in the cluster
  73. // service. This enum MUST start at zero since it is used as an index
  74. // into a state table.
  75. //
  76. typedef enum {
  77. ClusnetNodeStateAlive = 0,
  78. ClusnetNodeStateJoining,
  79. ClusnetNodeStateDead,
  80. ClusnetNodeStateNotConfigured,
  81. ClusnetNodeStateLastEntry
  82. } CLUSNET_NODE_STATE, *PCLUSNET_NODE_STATE;
  83. //
  84. // ClusNet Event definitions
  85. //
  86. typedef enum _CLUSNET_EVENT_TYPE {
  87. ClusnetEventNone = 0x00000000,
  88. ClusnetEventNodeUp = 0x00000001,
  89. ClusnetEventNodeDown = 0x00000002,
  90. ClusnetEventPoisonPacketReceived = 0x00000004,
  91. ClusnetEventHalt = 0x00000008,
  92. ClusnetEventNetInterfaceUp = 0x00000010,
  93. ClusnetEventNetInterfaceUnreachable = 0x00000020,
  94. ClusnetEventNetInterfaceFailed = 0x00000040,
  95. ClusnetEventAddAddress = 0x00000100,
  96. ClusnetEventDelAddress = 0x00000200,
  97. ClusnetEventMulticastSet = 0x00001000,
  98. ClusnetEventAll = 0xFFFFFFFF
  99. } CLUSNET_EVENT_TYPE, *PCLUSNET_EVENT_TYPE;
  100. typedef struct {
  101. ULONG Epoch;
  102. CLUSNET_EVENT_TYPE EventType;
  103. CL_NODE_ID NodeId;
  104. CL_NETWORK_ID NetworkId;
  105. } CLUSNET_EVENT, *PCLUSNET_EVENT;
  106. //
  107. // Add types for Clussvc to clusnet Heartbeating.
  108. //
  109. typedef enum _ClussvcHangAction {
  110. ClussvcHangActionDisable = 0,
  111. ClussvcHangActionLog = 1,
  112. ClussvcHangActionTerminateService = 2,
  113. ClussvcHangActionBugCheckMachine = 3,
  114. ClussvcHangActionMax = 4
  115. } ClussvcHangAction, *PClussvcHangAction;
  116. //
  117. // ClusNet NTSTATUS codes are now located in ntstatus.h
  118. //
  119. #ifdef __cplusplus
  120. }
  121. #endif // __cplusplus
  122. #endif //_CLUSDEF_H