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.

221 lines
7.2 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. // Define the following field to 1 for Cluster Beta testing, zero otherwise.
  19. //
  20. #define CLUSTER_BETA 1
  21. //
  22. // Cluster node ID definition
  23. //
  24. typedef ULONG CL_NODE_ID;
  25. #define ClusterMinNodeId 1
  26. #define ClusterMinNodeIdString L"1"
  27. #define ClusterDefaultMaxNodes 16
  28. #define ClusterAnyNodeId 0
  29. #define ClusterInvalidNodeId 0xFFFFFFFF
  30. //
  31. // Cluster network ID definition
  32. //
  33. typedef ULONG CL_NETWORK_ID, *PCL_NETWORK_ID;
  34. #define ClusterAnyNetworkId 0
  35. #define ClusterInvalidNetworkId 0xFFFFFFFF
  36. //
  37. // ClusNet node communication state definition
  38. //
  39. typedef enum {
  40. ClusnetNodeCommStateOffline = 0,
  41. ClusnetNodeCommStateOfflinePending = 1,
  42. ClusnetNodeCommStateUnreachable = 2,
  43. ClusnetNodeCommStateOnlinePending = 3,
  44. ClusnetNodeCommStateOnline = 4
  45. } CLUSNET_NODE_COMM_STATE, *PCLUSNET_NODE_COMM_STATE;
  46. //
  47. // ClusNet network state definition
  48. //
  49. typedef enum {
  50. ClusnetNetworkStateOffline = 0,
  51. ClusnetNetworkStateOfflinePending = 1,
  52. ClusnetNetworkStatePartitioned = 2,
  53. ClusnetNetworkStateOnlinePending = 3,
  54. ClusnetNetworkStateOnline = 4
  55. } CLUSNET_NETWORK_STATE, *PCLUSNET_NETWORK_STATE;
  56. //
  57. // ClusNet interface state definition
  58. //
  59. typedef enum {
  60. ClusnetInterfaceStateOffline = 0,
  61. ClusnetInterfaceStateOfflinePending = 1,
  62. ClusnetInterfaceStateUnreachable = 2,
  63. ClusnetInterfaceStateOnlinePending = 3,
  64. ClusnetInterfaceStateOnline = 4
  65. } CLUSNET_INTERFACE_STATE, *PCLUSNET_INTERFACE_STATE;
  66. //
  67. // ClusNet node membership state. This tracks the internal
  68. // membership state maintained by the membership engine in the cluster
  69. // service. This enum MUST start at zero since it is used as an index
  70. // into a state table.
  71. //
  72. typedef enum {
  73. ClusnetNodeStateAlive = 0,
  74. ClusnetNodeStateJoining,
  75. ClusnetNodeStateDead,
  76. ClusnetNodeStateNotConfigured,
  77. ClusnetNodeStateLastEntry
  78. } CLUSNET_NODE_STATE, *PCLUSNET_NODE_STATE;
  79. //
  80. // ClusNet Event definitions
  81. //
  82. typedef enum _CLUSNET_EVENT_TYPE {
  83. ClusnetEventNone = 0x00000000,
  84. ClusnetEventNodeUp = 0x00000001,
  85. ClusnetEventNodeDown = 0x00000002,
  86. ClusnetEventPoisonPacketReceived = 0x00000004,
  87. ClusnetEventHalt = 0x00000008,
  88. ClusnetEventAll = 0xFFFFFFFF
  89. } CLUSNET_EVENT_TYPE, *PCLUSNET_EVENT_TYPE;
  90. typedef struct {
  91. ULONG Epoch;
  92. CLUSNET_EVENT_TYPE EventType;
  93. CL_NODE_ID NodeId;
  94. CL_NETWORK_ID NetworkId;
  95. } CLUSNET_EVENT, *PCLUSNET_EVENT;
  96. //
  97. // ClusNet NTSTATUS codes.
  98. //
  99. // We start by defining our own facility code to distinguish our status
  100. // values.
  101. //
  102. // This claim is also in ntstatus.h. Leaving it here to avoid any
  103. // possible build breaks or issues.
  104. // EBK - 5/8/2000 Whistler bug # 83157
  105. #ifndef FACILITY_CLUSTER_ERROR_CODE
  106. #define FACILITY_CLUSTER_ERROR_CODE 0x13
  107. #endif
  108. //
  109. // Warning codes
  110. //
  111. #define STATUS_CLUSTER_NODE_ALREADY_ONLINE 0x80130001L
  112. #define STATUS_CLUSTER_NODE_ALREADY_OFFLINE 0x80130002L
  113. #define STATUS_CLUSTER_NETWORK_ALREADY_ONLINE 0x80130003L
  114. #define STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE 0x80130004L
  115. #define STATUS_CLUSTER_NODE_ALREADY_MEMBER 0x80130005L
  116. //
  117. // Error codes
  118. //
  119. #define STATUS_CLUSTER_INVALID_NODE 0xC0130001L
  120. #define STATUS_CLUSTER_NODE_EXISTS 0xC0130002L
  121. #define STATUS_CLUSTER_JOIN_IN_PROGRESS 0xC0130003L
  122. #define STATUS_CLUSTER_NODE_NOT_FOUND 0xC0130004L
  123. #define STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND 0xC0130005L
  124. #define STATUS_CLUSTER_NETWORK_EXISTS 0xC0130006L
  125. #define STATUS_CLUSTER_NETWORK_NOT_FOUND 0xC0130007L
  126. #define STATUS_CLUSTER_INTERFACE_EXISTS 0xC0130008L
  127. #define STATUS_CLUSTER_INTERFACE_NOT_FOUND 0xC0130009L
  128. #define STATUS_CLUSTER_INVALID_REQUEST 0xC013000AL
  129. #define STATUS_CLUSTER_INVALID_NETWORK_PROVIDER 0xC013000BL
  130. #define STATUS_CLUSTER_NODE_OFFLINE 0xC013000CL
  131. #define STATUS_CLUSTER_NODE_UNREACHABLE 0xC013000DL
  132. #define STATUS_CLUSTER_NODE_NOT_MEMBER 0xC013000EL
  133. #define STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS 0xC013000FL
  134. #define STATUS_CLUSTER_INVALID_NETWORK 0xC0130010L
  135. #define STATUS_CLUSTER_NO_NET_ADAPTERS 0xC0130011L
  136. #define STATUS_CLUSTER_NODE_NOT_ONLINE 0xC0130012L
  137. #define STATUS_CLUSTER_NODE_NOT_OFFLINE 0xC0130013L
  138. #define STATUS_CLUSTER_NODE_NOT_PAUSED 0xC0130014L
  139. //
  140. // ClusNet Win32 Error Codes
  141. //
  142. //
  143. // Warning codes
  144. //
  145. // These constants are declared with real values in clusmsg.h. There declaration
  146. // here maybe completely obsolete. I just left them here to avoid introducing any
  147. // unforseen breaks.
  148. // EBK - 5/8/2000 Whistler bug # 83158
  149. //
  150. #define ERROR_CLUSTER_NODE_ALREADY_ONLINE STATUS_CLUSTER_NODE_ALREADY_ONLINE
  151. #define ERROR_CLUSTER_NODE_ALREADY_OFFLINE STATUS_CLUSTER_NODE_ALREADY_OFFLINE
  152. #define ERROR_CLUSTER_NETWORK_ALREADY_ONLINE STATUS_CLUSTER_NETWORK_ALREADY_ONLINE
  153. #define ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE
  154. #define ERROR_CLUSTER_ALREADY_MEMBER STATUS_CLUSTER_NODE_ALREADY_MEMBER
  155. //
  156. // Error codes
  157. //
  158. #define ERROR_CLUSTER_INVALID_NODE STATUS_CLUSTER_INVALID_NODE
  159. #define ERROR_CLUSTER_NODE_EXISTS STATUS_CLUSTER_NODE_EXISTS
  160. #define ERROR_CLUSTER_JOIN_IN_PROGRESS STATUS_CLUSTER_JOIN_IN_PROGRESS
  161. #define ERROR_CLUSTER_NODE_NOT_FOUND STATUS_CLUSTER_NODE_NOT_FOUND
  162. #define ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND
  163. #define ERROR_CLUSTER_NETWORK_EXISTS STATUS_CLUSTER_NETWORK_EXISTS
  164. #define ERROR_CLUSTER_NETWORK_NOT_FOUND STATUS_CLUSTER_NETWORK_NOT_FOUND
  165. #define ERROR_CLUSTER_INTERFACE_EXISTS STATUS_CLUSTER_INTERFACE_EXISTS
  166. #define ERROR_CLUSTER_INTERFACE_NOT_FOUND STATUS_CLUSTER_INTERFACE_NOT_FOUND
  167. #define ERROR_CLUSTER_INVALID_REQUEST STATUS_CLUSTER_INVALID_REQUEST
  168. #define ERROR_CLUSTER_INVALID_NETWORK_PROVIDER STATUS_CLUSTER_INVALID_NETWORK_PROVIDER
  169. #define ERROR_CLUSTER_NODE_OFFLINE STATUS_CLUSTER_NODE_OFFLINE
  170. #define ERROR_CLUSTER_NODE_UNREACHABLE STATUS_CLUSTER_NODE_UNREACHABLE
  171. #define ERROR_CLUSTER_NODE_NOT_MEMBER STATUS_CLUSTER_NODE_NOT_MEMBER
  172. #define ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS
  173. #define ERROR_CLUSTER_INVALID_NETWORK STATUS_CLUSTER_INVALID_NETWORK
  174. #define ERROR_CLUSTER_NO_NET_ADAPTERS STATUS_CLUSTER_NO_NET_ADAPTERS
  175. #define ERROR_CLUSTER_NODE_NOT_ONLINE STATUS_CLUSTER_NODE_NOT_ONLINE
  176. #define ERROR_CLUSTER_NODE_NOT_OFFLINE STATUS_CLUSTER_NODE_NOT_OFFLINE
  177. #define ERROR_CLUSTER_NODE_NOT_PAUSED STATUS_CLUSTER_NODE_NOT_PAUSED
  178. #define ERROR_CLUSTER_NETWORK_NOT_INTERNAL 0xC0130050L
  179. #ifdef __cplusplus
  180. }
  181. #endif // __cplusplus
  182. #endif //_CLUSDEF_H