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.

366 lines
6.9 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 NewEventEpoch,
  193. IN ULONG NewRegroupEpoch
  194. );
  195. NTSTATUS
  196. CxImportSecurityContext(
  197. IN CL_NODE_ID NodeId,
  198. IN PWCHAR PackageName,
  199. IN ULONG PackageNameSize,
  200. IN ULONG SignatureSize,
  201. IN PVOID InboundContext,
  202. IN PVOID OutboundContext
  203. );
  204. VOID
  205. CxDeleteSecurityContext(
  206. IN CL_NODE_ID NodeId
  207. );
  208. //
  209. // Membership Message Interface
  210. //
  211. typedef
  212. VOID
  213. (*PCX_SEND_COMPLETE_ROUTINE) (
  214. IN NTSTATUS Status,
  215. IN ULONG BytesSent,
  216. IN PVOID Context,
  217. IN PVOID Buffer
  218. );
  219. NTSTATUS
  220. CxSendMembershipMessage(
  221. IN CL_NODE_ID DestinationNodeId,
  222. IN PVOID MessageData,
  223. IN USHORT MessageDataLength,
  224. IN PCX_SEND_COMPLETE_ROUTINE CompletionRoutine,
  225. IN PVOID CompletionContext OPTIONAL
  226. );
  227. VOID
  228. CxSendPoisonPacket(
  229. IN CL_NODE_ID DestinationNodeId,
  230. IN PCX_SEND_COMPLETE_ROUTINE CompletionRoutine OPTIONAL,
  231. IN PVOID CompletionContext OPTIONAL,
  232. IN PIRP Irp OPTIONAL
  233. );
  234. NTSTATUS
  235. CxSendHeartBeatMessage(
  236. IN CL_NODE_ID DestinationNodeId,
  237. IN ULONG SeqNumber,
  238. IN ULONG AckNumber,
  239. IN CL_NETWORK_ID NetworkId
  240. );
  241. //
  242. // Top-edge TDI Routines
  243. //
  244. NTSTATUS
  245. CxOpenAddress(
  246. OUT PCN_FSCONTEXT * CnFsContext,
  247. IN TRANSPORT_ADDRESS UNALIGNED * TransportAddress,
  248. IN ULONG TransportAddressLength
  249. );
  250. NTSTATUS
  251. CxCloseAddress(
  252. IN PCN_FSCONTEXT CnFsContext
  253. );
  254. NTSTATUS
  255. CxSetEventHandler(
  256. IN PIRP Irp,
  257. IN PIO_STACK_LOCATION IrpSp
  258. );
  259. NTSTATUS
  260. CxQueryInformation(
  261. IN PIRP Irp,
  262. IN PIO_STACK_LOCATION IrpSp
  263. );
  264. NTSTATUS
  265. CxSendDatagram(
  266. IN PIRP Irp,
  267. IN PIO_STACK_LOCATION IrpSp
  268. );
  269. NTSTATUS
  270. CxReceiveDatagram(
  271. IN PIRP Irp,
  272. IN PIO_STACK_LOCATION IrpSp
  273. );
  274. //
  275. // Test APIs
  276. //
  277. #if DBG
  278. NTSTATUS
  279. CxOnlinePendingInterface(
  280. IN CL_NODE_ID NodeId,
  281. IN CL_NETWORK_ID NetworkId
  282. );
  283. NTSTATUS
  284. CxOnlineInterface(
  285. IN CL_NODE_ID NodeId,
  286. IN CL_NETWORK_ID NetworkId
  287. );
  288. NTSTATUS
  289. CxOfflineInterface(
  290. IN CL_NODE_ID NodeId,
  291. IN CL_NETWORK_ID NetworkId
  292. );
  293. NTSTATUS
  294. CxFailInterface(
  295. IN CL_NODE_ID NodeId,
  296. IN CL_NETWORK_ID NetworkId
  297. );
  298. #endif // DBG
  299. #endif // ndef _CLUXPORT_INCLUDED