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.

365 lines
6.5 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. cluxport.h
  5. Abstract:
  6. Cluster Transport definitions exposed within the Cluster Network Driver.
  7. Author:
  8. Mike Massa (mikemas) January 3, 1996
  9. Revision History:
  10. Who When What
  11. -------- -------- ----------------------------------------------
  12. mikemas 01-03-97 created
  13. Notes:
  14. --*/
  15. #ifndef _CLUXPORT_INCLUDED
  16. #define _CLUXPORT_INCLUDED
  17. #include <tdi.h>
  18. #include <tdikrnl.h>
  19. #include <clustdi.h>
  20. //
  21. //
  22. // Function Prototypes
  23. //
  24. //
  25. //
  26. // Initialization/Shutdown
  27. //
  28. NTSTATUS
  29. CxLoad(
  30. IN PUNICODE_STRING RegistryPath
  31. );
  32. VOID
  33. CxUnload(
  34. VOID
  35. );
  36. NTSTATUS
  37. CxInitialize(
  38. VOID
  39. );
  40. VOID
  41. CxShutdown(
  42. VOID
  43. );
  44. //
  45. // Irp Dispatch
  46. //
  47. NTSTATUS
  48. CxDispatchDeviceControl(
  49. IN PIRP Irp,
  50. IN PIO_STACK_LOCATION IrpSp
  51. );
  52. //
  53. // Nodes
  54. //
  55. NTSTATUS
  56. CxRegisterNode(
  57. CL_NODE_ID NodeId
  58. );
  59. NTSTATUS
  60. CxDeregisterNode(
  61. CL_NODE_ID NodeId,
  62. PIRP Irp,
  63. PIO_STACK_LOCATION IrpSp
  64. );
  65. NTSTATUS
  66. CxOnlineNodeComm(
  67. CL_NODE_ID NodeId
  68. );
  69. NTSTATUS
  70. CxOfflineNodeComm(
  71. IN CL_NODE_ID NodeId,
  72. IN PIRP Irp,
  73. IN PIO_STACK_LOCATION IrpSp
  74. );
  75. NTSTATUS
  76. CxGetNodeCommState(
  77. IN CL_NODE_ID NodeId,
  78. OUT PCLUSNET_NODE_COMM_STATE State
  79. );
  80. //
  81. // Networks
  82. //
  83. NTSTATUS
  84. CxRegisterNetwork(
  85. CL_NETWORK_ID NetworkId,
  86. ULONG Priority,
  87. BOOLEAN Restricted
  88. );
  89. NTSTATUS
  90. CxDeregisterNetwork(
  91. CL_NETWORK_ID NetworkId,
  92. PIRP Irp,
  93. PIO_STACK_LOCATION IrpSp
  94. );
  95. NTSTATUS
  96. CxOnlineNetwork(
  97. IN CL_NETWORK_ID NetworkId,
  98. IN PWCHAR TdiProviderName,
  99. IN ULONG TdiProviderNameLength,
  100. IN PTRANSPORT_ADDRESS TdiBindAddress,
  101. IN ULONG TdiBindAddressLength,
  102. IN PWCHAR AdapterName,
  103. IN ULONG AdapterNameLength,
  104. OUT PTDI_ADDRESS_INFO TdiBindAddressInfo,
  105. IN ULONG TdiBindAddressInfoLength,
  106. IN PIRP Irp OPTIONAL
  107. );
  108. NTSTATUS
  109. CxOfflineNetwork(
  110. CL_NETWORK_ID NetworkId,
  111. PIRP Irp,
  112. PIO_STACK_LOCATION IrpSp
  113. );
  114. NTSTATUS
  115. CxGetNetworkState(
  116. IN CL_NETWORK_ID NetworkId,
  117. OUT PCLUSNET_NETWORK_STATE State
  118. );
  119. NTSTATUS
  120. CxSetNetworkRestriction(
  121. IN CL_NETWORK_ID NetworkId,
  122. IN BOOLEAN Restricted,
  123. IN ULONG NewPriority
  124. );
  125. NTSTATUS
  126. CxSetNetworkPriority(
  127. IN CL_NETWORK_ID NetworkId,
  128. IN ULONG Priority
  129. );
  130. NTSTATUS
  131. CxGetNetworkPriority(
  132. IN CL_NETWORK_ID NetworkId,
  133. OUT PULONG Priority
  134. );
  135. //
  136. // Interfaces
  137. //
  138. NTSTATUS
  139. CxRegisterInterface(
  140. CL_NODE_ID NodeId,
  141. CL_NETWORK_ID NetworkId,
  142. ULONG Priority,
  143. PUWSTR AdapterId,
  144. ULONG AdapterIdLength,
  145. ULONG TdiAddressLength,
  146. PTRANSPORT_ADDRESS TdiAddress,
  147. PULONG MediaStatus
  148. );
  149. NTSTATUS
  150. CxDeregisterInterface(
  151. CL_NODE_ID NodeId,
  152. CL_NETWORK_ID NetworkId
  153. );
  154. NTSTATUS
  155. CxSetInterfacePriority(
  156. IN CL_NODE_ID NodeId,
  157. IN CL_NETWORK_ID NetworkId,
  158. IN ULONG Priority
  159. );
  160. NTSTATUS
  161. CxGetInterfacePriority(
  162. IN CL_NODE_ID NodeId,
  163. IN CL_NETWORK_ID NetworkId,
  164. OUT PULONG InterfacePriority,
  165. OUT PULONG NetworkPriority
  166. );
  167. NTSTATUS
  168. CxGetInterfaceState(
  169. IN CL_NODE_ID NodeId,
  170. IN CL_NETWORK_ID NetworkId,
  171. OUT PCLUSNET_INTERFACE_STATE State
  172. );
  173. //
  174. // Misc. stuff
  175. //
  176. NTSTATUS
  177. CxGetNodeMembershipState(
  178. IN CL_NODE_ID NodeId,
  179. OUT PCLUSNET_NODE_STATE State
  180. );
  181. NTSTATUS
  182. CxSetNodeMembershipState(
  183. IN CL_NODE_ID NodeId,
  184. IN CLUSNET_NODE_STATE State
  185. );
  186. NTSTATUS
  187. CxSetOuterscreen(
  188. IN ULONG Outerscreen
  189. );
  190. VOID
  191. CxRegroupFinished(
  192. IN ULONG NewEpoch
  193. );
  194. NTSTATUS
  195. CxImportSecurityContext(
  196. IN CL_NODE_ID NodeId,
  197. IN PWCHAR PackageName,
  198. IN ULONG PackageNameSize,
  199. IN ULONG SignatureSize,
  200. IN PVOID InboundContext,
  201. IN PVOID OutboundContext
  202. );
  203. VOID
  204. CxDeleteSecurityContext(
  205. IN CL_NODE_ID NodeId
  206. );
  207. //
  208. // Membership Message Interface
  209. //
  210. typedef
  211. VOID
  212. (*PCX_SEND_COMPLETE_ROUTINE) (
  213. IN NTSTATUS Status,
  214. IN ULONG BytesSent,
  215. IN PVOID Context,
  216. IN PVOID Buffer
  217. );
  218. NTSTATUS
  219. CxSendMembershipMessage(
  220. IN CL_NODE_ID DestinationNodeId,
  221. IN PVOID MessageData,
  222. IN USHORT MessageDataLength,
  223. IN PCX_SEND_COMPLETE_ROUTINE CompletionRoutine,
  224. IN PVOID CompletionContext OPTIONAL
  225. );
  226. VOID
  227. CxSendPoisonPacket(
  228. IN CL_NODE_ID DestinationNodeId,
  229. IN PCX_SEND_COMPLETE_ROUTINE CompletionRoutine OPTIONAL,
  230. IN PVOID CompletionContext OPTIONAL,
  231. IN PIRP Irp OPTIONAL
  232. );
  233. NTSTATUS
  234. CxSendHeartBeatMessage(
  235. IN CL_NODE_ID DestinationNodeId,
  236. IN ULONG SeqNumber,
  237. IN ULONG AckNumber,
  238. IN CL_NETWORK_ID NetworkId
  239. );
  240. //
  241. // Top-edge TDI Routines
  242. //
  243. NTSTATUS
  244. CxOpenAddress(
  245. OUT PCN_FSCONTEXT * CnFsContext,
  246. IN TRANSPORT_ADDRESS UNALIGNED * TransportAddress,
  247. IN ULONG TransportAddressLength
  248. );
  249. NTSTATUS
  250. CxCloseAddress(
  251. IN PCN_FSCONTEXT CnFsContext
  252. );
  253. NTSTATUS
  254. CxSetEventHandler(
  255. IN PIRP Irp,
  256. IN PIO_STACK_LOCATION IrpSp
  257. );
  258. NTSTATUS
  259. CxQueryInformation(
  260. IN PIRP Irp,
  261. IN PIO_STACK_LOCATION IrpSp
  262. );
  263. NTSTATUS
  264. CxSendDatagram(
  265. IN PIRP Irp,
  266. IN PIO_STACK_LOCATION IrpSp
  267. );
  268. NTSTATUS
  269. CxReceiveDatagram(
  270. IN PIRP Irp,
  271. IN PIO_STACK_LOCATION IrpSp
  272. );
  273. //
  274. // Test APIs
  275. //
  276. #if DBG
  277. NTSTATUS
  278. CxOnlinePendingInterface(
  279. IN CL_NODE_ID NodeId,
  280. IN CL_NETWORK_ID NetworkId
  281. );
  282. NTSTATUS
  283. CxOnlineInterface(
  284. IN CL_NODE_ID NodeId,
  285. IN CL_NETWORK_ID NetworkId
  286. );
  287. NTSTATUS
  288. CxOfflineInterface(
  289. IN CL_NODE_ID NodeId,
  290. IN CL_NETWORK_ID NetworkId
  291. );
  292. NTSTATUS
  293. CxFailInterface(
  294. IN CL_NODE_ID NodeId,
  295. IN CL_NETWORK_ID NetworkId
  296. );
  297. #endif // DBG
  298. #endif // ndef _CLUXPORT_INCLUDED
  299.