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.

793 lines
25 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. ntddcnet.h
  5. Abstract:
  6. Public header file for the Cluster Network Driver. Defines all
  7. control IOCTLs.
  8. Author:
  9. Mike Massa (mikemas) January 3, 1997
  10. Revision History:
  11. Who When What
  12. -------- -------- ----------------------------------------------
  13. mikemas 01-03-97 created
  14. Notes:
  15. --*/
  16. #ifndef _NTDDCNET_INCLUDED_
  17. #define _NTDDCNET_INCLUDED_
  18. //
  19. // Device Names.
  20. //
  21. // ClusterNetwork is the control device. All control IOCTLs are issued
  22. // on this device. ClusterDatagramProtocol is the datagram transport device.
  23. // This device supports TDI IOCTLs.
  24. //
  25. #define DD_CLUSNET_DEVICE_NAME L"\\Device\\ClusterNetwork"
  26. #define DD_CDP_DEVICE_NAME L"\\Device\\ClusterDatagramProtocol"
  27. //
  28. // General Types
  29. //
  30. //
  31. // Control IOCTL definitions.
  32. //
  33. #define FSCTL_NTDDCNET_BASE FILE_DEVICE_NETWORK
  34. #define _NTDDCNET_CTL_CODE(function, method, access) \
  35. CTL_CODE(FSCTL_NTDDCNET_BASE, function, method, access)
  36. #define ClusnetIoctlCode(_ioctl) (((_ioctl) >> 2) & 0x00000FFF)
  37. //
  38. // General driver management IOCTLs. Codes 0-49
  39. //
  40. #define CLUSNET_MINIMUM_GENERAL_IOCTL 0
  41. #define CLUSNET_MAXIMUM_GENERAL_IOCTL 49
  42. /* #define ClusnetIsGeneralIoctl(_ioctl) \
  43. ( (ClusnetIoctlCode(_ioctl) >= CLUSNET_MINIMUM_GENERAL_IOCTL) && \
  44. (ClusnetIoctlCode(_ioctl) <= CLUSNET_MAXIMUM_GENERAL_IOCTL) ) */
  45. // Check for CLUSNET_MINIMUM_GENERAL_IOCTL removed since ioctl is a ULONG
  46. // and always greater than zero. Reinstate if CLUSNET_MINIMUM_GENERAL_IOCTL
  47. // is made nonzero.
  48. #define ClusnetIsGeneralIoctl(_ioctl) \
  49. (ClusnetIoctlCode(_ioctl) <= CLUSNET_MAXIMUM_GENERAL_IOCTL)
  50. #define IOCTL_CLUSNET_INITIALIZE \
  51. _NTDDCNET_CTL_CODE(0, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  52. #define IOCTL_CLUSNET_SHUTDOWN \
  53. _NTDDCNET_CTL_CODE(1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  54. #define IOCTL_CLUSNET_ENABLE_SHUTDOWN_ON_CLOSE \
  55. _NTDDCNET_CTL_CODE(2, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  56. #define IOCTL_CLUSNET_DISABLE_SHUTDOWN_ON_CLOSE \
  57. _NTDDCNET_CTL_CODE(3, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  58. #define IOCTL_CLUSNET_SET_EVENT_MASK \
  59. _NTDDCNET_CTL_CODE(4, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  60. #define IOCTL_CLUSNET_GET_NEXT_EVENT \
  61. _NTDDCNET_CTL_CODE(5, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  62. #define IOCTL_CLUSNET_HALT \
  63. _NTDDCNET_CTL_CODE(6, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  64. #define IOCTL_CLUSNET_SET_MEMORY_LOGGING \
  65. _NTDDCNET_CTL_CODE(7, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  66. //
  67. // NTE IOCTLs are a special class of general driver management IOCTLs.
  68. // Codes are 8-12.
  69. //
  70. #define CLUSNET_MINIMUM_NTE_IOCTL 8
  71. #define CLUSNET_MAXIMUM_NTE_IOCTL 12
  72. #define ClusnetIsNTEIoctl(_ioctl) \
  73. ( (ClusnetIoctlCode(_ioctl) >= CLUSNET_MINIMUM_NTE_IOCTL) && \
  74. (ClusnetIoctlCode(_ioctl) <= CLUSNET_MAXIMUM_NTE_IOCTL) )
  75. #define IOCTL_CLUSNET_ADD_NTE \
  76. _NTDDCNET_CTL_CODE(8, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  77. #define IOCTL_CLUSNET_DELETE_NTE \
  78. _NTDDCNET_CTL_CODE(9, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  79. #define IOCTL_CLUSNET_SET_NTE_ADDRESS \
  80. _NTDDCNET_CTL_CODE(10, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  81. #define IOCTL_CLUSNET_ADD_NBT_INTERFACE \
  82. _NTDDCNET_CTL_CODE(11, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  83. #define IOCTL_CLUSNET_DEL_NBT_INTERFACE \
  84. _NTDDCNET_CTL_CODE(12, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  85. //
  86. // Clussvc to Clusnet Heartbeating Ioctls
  87. //
  88. #define IOCTL_CLUSNET_SET_IAMALIVE_PARAM \
  89. _NTDDCNET_CTL_CODE(13, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  90. #define IOCTL_CLUSNET_IAMALIVE \
  91. _NTDDCNET_CTL_CODE(14, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  92. //
  93. // Codes 25-49 are reserved for general test ioctls
  94. //
  95. //
  96. // General driver IOCTL structure definitions
  97. //
  98. //
  99. // Initialize request. This must be issued before any other request.
  100. //
  101. typedef struct {
  102. CL_NODE_ID LocalNodeId;
  103. ULONG MaxNodes;
  104. } CLUSNET_INITIALIZE_REQUEST, *PCLUSNET_INITIALIZE_REQUEST;
  105. //
  106. // Shutdown request. Deletes all registered nodes and interfaces.
  107. //
  108. typedef struct {
  109. CL_NODE_ID LocalNodeId;
  110. } CLUSNET_SHUTDOWN_REQUEST, *PCLUSNET_SHUTDOWN_REQUEST;
  111. //
  112. // shutdown on close request
  113. //
  114. typedef struct {
  115. ULONG ProcessId;
  116. } CLUSNET_SHUTDOWN_ON_CLOSE_REQUEST, *PCLUSNET_SHUTDOWN_ON_CLOSE_REQUEST;
  117. //
  118. // Set event mask request. Hands a bit mask and a function (kernel mode
  119. // only) to the driver indicating which events the thread wishes to
  120. // be notified about. The IRP is pended for user mode. Kernel mode
  121. // events are delivered via the callback.
  122. //
  123. typedef VOID (*CLUSNET_EVENT_CALLBACK_ROUTINE)(CLUSNET_EVENT_TYPE,
  124. CL_NODE_ID,
  125. CL_NETWORK_ID);
  126. typedef struct {
  127. ULONG EventMask;
  128. CLUSNET_EVENT_CALLBACK_ROUTINE KmodeEventCallback;
  129. } CLUSNET_SET_EVENT_MASK_REQUEST, *PCLUSNET_SET_EVENT_MASK_REQUEST;
  130. typedef CLUSNET_EVENT CLUSNET_EVENT_RESPONSE;
  131. typedef PCLUSNET_EVENT PCLUSNET_EVENT_RESPONSE;
  132. typedef struct _CLUSNET_EVENT_ENTRY {
  133. LIST_ENTRY Linkage;
  134. CLUSNET_EVENT EventData;
  135. } CLUSNET_EVENT_ENTRY, *PCLUSNET_EVENT_ENTRY;
  136. #define CN_EVENT_SIGNATURE 'tvec'
  137. //
  138. // in-memory logging. conveys the number of entries to allocate
  139. // (zero if turning off) for logging events
  140. //
  141. typedef struct _CLUSNET_SET_MEM_LOGGING_REQUEST {
  142. ULONG NumberOfEntries;
  143. } CLUSNET_SET_MEM_LOGGING_REQUEST, *PCLUSNET_SET_MEM_LOGGING_REQUEST;
  144. #ifdef MM_IN_CLUSNET
  145. //
  146. // Membership management IOCTLs. Codes 50-99
  147. //
  148. #define CLUSNET_MINIMUM_CMM_IOCTL 50
  149. #define CLUSNET_MAXIMUM_CMM_IOCTL 99
  150. #define ClusnetIsMembershipIoctl(_ioctl) \
  151. ( (ClusnetIoctlCode(_ioctl) >= CLUSNET_MINIMUM_CMM_IOCTL) && \
  152. (ClusnetIoctlCode(_ioctl) <= CLUSNET_MAXIMUM_CMM_IOCTL) )
  153. //
  154. // NOTE: currently (3/3/97) CMM Ioctl codes 50 through 62 are not used.
  155. // These were defined during an initial attempt to get the membership
  156. // manager into kernel mode (which didn't succeed).
  157. //
  158. //
  159. // first guy in cluster forms one...
  160. //
  161. #define IOCTL_CMM_FORM_CLUSTER \
  162. _NTDDCNET_CTL_CODE(50, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  163. //
  164. // MMJoin phases. Basically correspond to the 4 messages that are sent as part
  165. // of the Join process. End must be submitted to terminate the process.
  166. //
  167. #define IOCTL_CMM_JOIN_CLUSTER_PHASE1 \
  168. _NTDDCNET_CTL_CODE(51, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  169. #define IOCTL_CMM_JOIN_CLUSTER_PHASE2 \
  170. _NTDDCNET_CTL_CODE(52, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  171. #define IOCTL_CMM_JOIN_CLUSTER_PHASE3 \
  172. _NTDDCNET_CTL_CODE(53, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  173. #define IOCTL_CMM_JOIN_CLUSTER_PHASE4 \
  174. _NTDDCNET_CTL_CODE(54, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  175. #define IOCTL_CMM_JOIN_CLUSTER_ABORT \
  176. _NTDDCNET_CTL_CODE(55, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  177. #define IOCTL_CMM_JOIN_CLUSTER_END \
  178. _NTDDCNET_CTL_CODE(56, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  179. //
  180. // This ioctl is used to deliver a join message on an active node.
  181. //
  182. #define IOCTL_CMM_DELIVER_JOIN_MESSAGE \
  183. _NTDDCNET_CTL_CODE(57, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  184. #define IOCTL_CMM_SHUTDOWN_CLUSTER \
  185. _NTDDCNET_CTL_CODE(58, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  186. #define IOCTL_CMM_LEAVE_CLUSTER \
  187. _NTDDCNET_CTL_CODE(59, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  188. #define IOCTL_CMM_EJECT_CLUSTER \
  189. _NTDDCNET_CTL_CODE(60, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  190. #define IOCTL_CMM_GET_NODE_STATE \
  191. _NTDDCNET_CTL_CODE(61, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  192. //
  193. // callbacks are done by completing an (usually) outstanding IRP. The type
  194. // of callback as well as required parameters are passed back to clussvc
  195. // by completing this IRP.
  196. //
  197. #define IOCTL_CMM_REGISTER_CALLBACK \
  198. _NTDDCNET_CTL_CODE(62, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  199. //
  200. // Membership IOCTL structure definitions
  201. //
  202. //
  203. // Common request structure
  204. //
  205. // This structure shared among a number of requests. The Node field may not be
  206. // used; see the appropriate MM* routine to determine what is used.
  207. //
  208. typedef struct _CMM_COMMON_CLUSTER_REQUEST {
  209. ULONG Node;
  210. } CMM_COMMON_CLUSTER_REQUEST, *PCMM_COMMON_CLUSTER_REQUEST;
  211. //
  212. // Form cluster request
  213. //
  214. typedef struct _CMM_FORM_CLUSTER_REQUEST {
  215. ULONG ClockPeriod;
  216. ULONG SendHBRate;
  217. ULONG RecvHBRate;
  218. } CMM_FORM_CLUSTER_REQUEST, *PCMM_FORM_CLUSTER_REQUEST;
  219. //
  220. // Join cluster request
  221. //
  222. // Used for all four join phases. This structure is variable in length. Clussvc
  223. // must allocate enough space in which the MM writes a packet to be sent by
  224. // Clussvc. MM sets SizeOfSendData on output to indicate how much data is in
  225. // SendData after a join phase has been called. SendNodeMask indicates which
  226. // nodes should receive the packet.
  227. //
  228. typedef struct _CMM_JOIN_CLUSTER_REQUEST {
  229. ULONG JoiningNode;
  230. ULONG JoinTimeout;
  231. } CMM_JOIN_CLUSTER_REQUEST, *PCMM_JOIN_CLUSTER_REQUEST;
  232. //
  233. // Join cluster response
  234. //
  235. typedef struct _CMM_JOIN_CLUSTER_RESPONSE {
  236. ULONG SizeOfSendData;
  237. ULONG SendNodeMask;
  238. UCHAR SendData[0];
  239. } CMM_JOIN_CLUSTER_RESPONSE, *PCMM_JOIN_CLUSTER_RESPONSE;
  240. //
  241. // Deliver join message request
  242. //
  243. typedef struct _CMM_DELIVER_JOIN_CLUSTER_REQUEST {
  244. UCHAR MessageData[0];
  245. } CMM_DELIVER_JION_MESSAGE_REQUEST, *PCMM_DELIVER_JION_MESSAGE_REQUEST;
  246. //
  247. // Eject node request
  248. //
  249. typedef CMM_COMMON_CLUSTER_REQUEST CMM_EJECT_CLUSTER_REQUEST;
  250. typedef PCMM_COMMON_CLUSTER_REQUEST PCMM_EJECT_CLUSTER_REQUEST;
  251. //
  252. // Get node membership state request
  253. //
  254. typedef CMM_COMMON_CLUSTER_REQUEST CMM_GET_NODE_STATE_REQUEST;
  255. typedef PCMM_COMMON_CLUSTER_REQUEST PCMM_GET_NODE_STATE_REQUEST;
  256. //
  257. // Get node membership state response
  258. //
  259. typedef struct _CMM_GET_NODE_STATE_RESPONSE {
  260. CLUSNET_NODE_STATE State;
  261. } CMM_GET_NODE_STATE_RESPONSE, *PCMM_GET_NODE_STATE_RESPONSE;
  262. //
  263. // struct used to notfiy clussvc of callback events. All callbacks have a DWORD as their
  264. // first param. MMNodeChange is the only callback with a 2nd param. CallbackType is one
  265. // of RGP_CALLBACK_*. These structs are linked off of the main RGP struct
  266. //
  267. typedef struct _CMM_CALLBACK_DATA {
  268. ULONG CallbackType;
  269. ULONG Arg1;
  270. ULONG Arg2;
  271. } CMM_CALLBACK_DATA, *PCMM_CALLBACK_DATA;
  272. typedef struct _CMM_CALLBACK_EVENT {
  273. LIST_ENTRY Linkage;
  274. CMM_CALLBACK_DATA EventData;
  275. } CMM_CALLBACK_EVENT, *PCMM_CALLBACK_EVENT;
  276. #endif // MM_IN_CLUSNET
  277. //
  278. // Transport management IOCTLs. Codes 100-199
  279. //
  280. #define CLUSNET_MINIMUM_CX_IOCTL 100
  281. #define CLUSNET_MAXIMUM_CX_IOCTL 199
  282. #define ClusnetIsTransportIoctl(_ioctl) \
  283. ( (ClusnetIoctlCode(_ioctl) >= CLUSNET_MINIMUM_CX_IOCTL) && \
  284. (ClusnetIoctlCode(_ioctl) <= CLUSNET_MAXIMUM_CX_IOCTL) )
  285. #define IOCTL_CX_MINIMUM_IOCTL \
  286. _NTDDCNET_CTL_CODE(100, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  287. #define IOCTL_CX_REGISTER_NODE \
  288. _NTDDCNET_CTL_CODE(100, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  289. #define IOCTL_CX_DEREGISTER_NODE \
  290. _NTDDCNET_CTL_CODE(101, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  291. #define IOCTL_CX_REGISTER_NETWORK \
  292. _NTDDCNET_CTL_CODE(102, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  293. #define IOCTL_CX_DEREGISTER_NETWORK \
  294. _NTDDCNET_CTL_CODE(103, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  295. #define IOCTL_CX_REGISTER_INTERFACE \
  296. _NTDDCNET_CTL_CODE(104, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  297. #define IOCTL_CX_DEREGISTER_INTERFACE \
  298. _NTDDCNET_CTL_CODE(105, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  299. #define IOCTL_CX_ONLINE_NODE_COMM \
  300. _NTDDCNET_CTL_CODE(106, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  301. #define IOCTL_CX_OFFLINE_NODE_COMM \
  302. _NTDDCNET_CTL_CODE(107, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  303. #define IOCTL_CX_ONLINE_NETWORK \
  304. _NTDDCNET_CTL_CODE(108, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  305. #define IOCTL_CX_OFFLINE_NETWORK \
  306. _NTDDCNET_CTL_CODE(109, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  307. #define IOCTL_CX_GET_NETWORK_PRIORITY \
  308. _NTDDCNET_CTL_CODE(110, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  309. #define IOCTL_CX_SET_NETWORK_PRIORITY \
  310. _NTDDCNET_CTL_CODE(111, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  311. #define IOCTL_CX_GET_INTERFACE_PRIORITY \
  312. _NTDDCNET_CTL_CODE(112, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  313. #define IOCTL_CX_SET_INTERFACE_PRIORITY \
  314. _NTDDCNET_CTL_CODE(113, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  315. #define IOCTL_CX_GET_NODE_STATE \
  316. _NTDDCNET_CTL_CODE(114, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  317. #define IOCTL_CX_GET_NETWORK_STATE \
  318. _NTDDCNET_CTL_CODE(115, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  319. #define IOCTL_CX_GET_INTERFACE_STATE \
  320. _NTDDCNET_CTL_CODE(116, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  321. #define IOCTL_CX_IGNORE_NODE_STATE \
  322. _NTDDCNET_CTL_CODE(117, METHOD_BUFFERED, FILE_ANY_ACCESS)
  323. #define IOCTL_CX_SET_NODE_MMSTATE \
  324. _NTDDCNET_CTL_CODE(118, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  325. #define IOCTL_CX_GET_NODE_MMSTATE \
  326. _NTDDCNET_CTL_CODE(119, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  327. #define IOCTL_CX_SEND_POISON_PACKET \
  328. _NTDDCNET_CTL_CODE(120, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  329. #define IOCTL_CX_SET_OUTERSCREEN \
  330. _NTDDCNET_CTL_CODE(121, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  331. #define IOCTL_CX_REGROUP_FINISHED \
  332. _NTDDCNET_CTL_CODE(122, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  333. #define IOCTL_CX_IMPORT_SECURITY_CONTEXTS \
  334. _NTDDCNET_CTL_CODE(123, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  335. #define IOCTL_CX_SET_NETWORK_RESTRICTION \
  336. _NTDDCNET_CTL_CODE(124, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  337. #define IOCTL_CX_RESERVE_ENDPOINT \
  338. _NTDDCNET_CTL_CODE(125, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  339. #define IOCTL_CX_CONFIGURE_MULTICAST \
  340. _NTDDCNET_CTL_CODE(126, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  341. #define IOCTL_CX_GET_MULTICAST_REACHABLE_SET \
  342. _NTDDCNET_CTL_CODE(127, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  343. //
  344. // Codes 150-199 are reserved for test ioctls and are defined in cnettest.h
  345. //
  346. #define IOCTL_CX_MAXIMUM_IOCTL \
  347. _NTDDCNET_CTL_CODE(199, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  348. //
  349. // Transport IOCTL structure definitions
  350. //
  351. //
  352. // Common request definitions
  353. //
  354. typedef struct {
  355. CL_NODE_ID Id;
  356. } CX_NODE_COMMON_REQUEST, *PCX_NODE_COMMON_REQUEST;
  357. typedef struct {
  358. CL_NETWORK_ID Id;
  359. } CX_NETWORK_COMMON_REQUEST, *PCX_NETWORK_COMMON_REQUEST;
  360. typedef struct {
  361. CL_NODE_ID NodeId;
  362. CL_NETWORK_ID NetworkId;
  363. } CX_INTERFACE_COMMON_REQUEST, *PCX_INTERFACE_COMMON_REQUEST;
  364. //
  365. // Node registration request.
  366. //
  367. typedef CX_NODE_COMMON_REQUEST CX_NODE_REG_REQUEST;
  368. typedef PCX_NODE_COMMON_REQUEST PCX_NODE_REG_REQUEST;
  369. //
  370. // Node deregistration request.
  371. //
  372. typedef CX_NODE_COMMON_REQUEST CX_NODE_DEREG_REQUEST;
  373. typedef PCX_NODE_COMMON_REQUEST PCX_NODE_DEREG_REQUEST;
  374. //
  375. // Network registration request
  376. //
  377. // The Priority indicates the order in which networks will be chosen to
  378. // carry packets. Valid values are 0x1-0xFFFFFFFF. Numerically lower values
  379. // are higher priority.
  380. //
  381. // The TdiProviderName and TdiBindAddress structures follow the registration
  382. // strucuture in the IRP. The TdiProviderName is the device name
  383. // (e.g \Device\Udp) which must be opened to access the underlying
  384. // transport provider. The TdiBindAddress is the provider's local address to
  385. // which the network should bind.
  386. //
  387. typedef struct {
  388. CL_NETWORK_ID Id;
  389. ULONG Priority;
  390. BOOLEAN Restricted;
  391. } CX_NETWORK_REG_REQUEST, *PCX_NETWORK_REG_REQUEST;
  392. //
  393. // Network deregistration request.
  394. //
  395. typedef CX_NETWORK_COMMON_REQUEST CX_NETWORK_DEREG_REQUEST;
  396. typedef PCX_NETWORK_COMMON_REQUEST PCX_NETWORK_DEREG_REQUEST;
  397. //
  398. // Interface registration request.
  399. //
  400. // The Priority indicates the order in which interfaces will be chosen to
  401. // carry packets. Valid values are 0x1-0xFFFFFFFF. Numerically lower values
  402. // are higher priority. A value of zero indicates that the interface
  403. // should inherit its priority from the associated network.
  404. //
  405. // AdapterIdOffset is the offset in bytes from the beginning of the
  406. // CX_INTERFACE_REG_REQUEST structure to a buffer containing the adapter
  407. // id as a string of UNICODE characters. AdapterIdLength is the length,
  408. // in bytes, of the UNICODE string, not including terminating UNICODE_NULL.
  409. // AdapterIdOffset is 64-bit aligned.
  410. //
  411. // The TdiAddress field is a placeholder for a TDI TRANSPORT_ADDRESS
  412. // structure which is embedded in the registration structure. This
  413. // structure contains the transport address at which the cluster transport
  414. // on the specified node is listening on the specified network. For the
  415. // local node, this is the address used in the network registration (unless
  416. // a wildcard address was used).
  417. //
  418. typedef struct {
  419. CL_NODE_ID NodeId;
  420. CL_NETWORK_ID NetworkId;
  421. ULONG Priority;
  422. ULONG AdapterIdOffset;
  423. ULONG AdapterIdLength;
  424. ULONG TdiAddressLength;
  425. ULONG TdiAddress[1]; // TDI TRANSPORT_ADDRESS struct
  426. } CX_INTERFACE_REG_REQUEST, *PCX_INTERFACE_REG_REQUEST;
  427. typedef struct {
  428. ULONG MediaStatus; // NDIS_MEDIA_STATUS
  429. } CX_INTERFACE_REG_RESPONSE, *PCX_INTERFACE_REG_RESPONSE;
  430. //
  431. // Interface deregistration request.
  432. //
  433. typedef CX_INTERFACE_COMMON_REQUEST CX_INTERFACE_DEREG_REQUEST;
  434. typedef PCX_INTERFACE_COMMON_REQUEST PCX_INTERFACE_DEREG_REQUEST;
  435. //
  436. //
  437. // Online node request
  438. //
  439. typedef CX_NODE_COMMON_REQUEST CX_ONLINE_NODE_COMM_REQUEST;
  440. typedef PCX_NODE_COMMON_REQUEST PCX_ONLINE_NODE_COMM_REQUEST;
  441. //
  442. // Offline node request
  443. //
  444. typedef CX_NODE_COMMON_REQUEST CX_OFFLINE_NODE_COMM_REQUEST;
  445. typedef PCX_NODE_COMMON_REQUEST PCX_OFFLINE_NODE_COMM_REQUEST;
  446. // Online network request
  447. //
  448. // The TdiProviderName and TdiBindAddress structures follow the registration
  449. // strucuture in the IRP. The TdiProviderName is the device name
  450. // (e.g \Device\Udp) which must be opened to access the underlying
  451. // transport provider. The TdiBindAddress is the provider's local address to
  452. // which the network should bind.
  453. //
  454. // The output buffer for this request contains a TDI_ADDRESS_INFO structure,
  455. // which contains the local address that the provider actually opened.
  456. //
  457. typedef struct {
  458. CL_NETWORK_ID Id;
  459. ULONG TdiProviderNameOffset; // offset from start of struct
  460. ULONG TdiProviderNameLength; // in bytes, including NUL
  461. ULONG TdiBindAddressOffset; // offset from start of struct
  462. ULONG TdiBindAddressLength;
  463. ULONG AdapterNameOffset; // offset from start of struct
  464. ULONG AdapterNameLength;
  465. } CX_ONLINE_NETWORK_REQUEST, *PCX_ONLINE_NETWORK_REQUEST;
  466. //
  467. // Offline network request
  468. //
  469. typedef CX_NETWORK_COMMON_REQUEST CX_OFFLINE_NETWORK_REQUEST;
  470. typedef PCX_NETWORK_COMMON_REQUEST PCX_OFFLINE_NETWORK_REQUEST;
  471. //
  472. // Set network restriction request
  473. //
  474. typedef struct {
  475. CL_NETWORK_ID Id;
  476. BOOLEAN Restricted;
  477. ULONG NewPriority;
  478. } CX_SET_NETWORK_RESTRICTION_REQUEST, *PCX_SET_NETWORK_RESTRICTION_REQUEST;
  479. //
  480. // Get network priority request
  481. //
  482. typedef CX_NETWORK_COMMON_REQUEST CX_GET_NETWORK_PRIORITY_REQUEST;
  483. typedef PCX_NETWORK_COMMON_REQUEST PCX_GET_NETWORK_PRIORITY_REQUEST;
  484. //
  485. // Get network priority response
  486. //
  487. typedef struct {
  488. ULONG Priority;
  489. } CX_GET_NETWORK_PRIORITY_RESPONSE, *PCX_GET_NETWORK_PRIORITY_RESPONSE;
  490. //
  491. // Set network priority request
  492. //
  493. typedef struct {
  494. CL_NETWORK_ID Id;
  495. ULONG Priority;
  496. } CX_SET_NETWORK_PRIORITY_REQUEST, *PCX_SET_NETWORK_PRIORITY_REQUEST;
  497. //
  498. // Get interface priority request
  499. //
  500. typedef CX_INTERFACE_COMMON_REQUEST CX_GET_INTERFACE_PRIORITY_REQUEST;
  501. typedef PCX_INTERFACE_COMMON_REQUEST PCX_GET_INTERFACE_PRIORITY_REQUEST;
  502. //
  503. // Get interface priority response
  504. //
  505. typedef struct {
  506. ULONG InterfacePriority;
  507. ULONG NetworkPriority;
  508. } CX_GET_INTERFACE_PRIORITY_RESPONSE, *PCX_GET_INTERFACE_PRIORITY_RESPONSE;
  509. //
  510. // Set interface priority request
  511. //
  512. typedef struct {
  513. CL_NODE_ID NodeId;
  514. CL_NETWORK_ID NetworkId;
  515. ULONG Priority;
  516. } CX_SET_INTERFACE_PRIORITY_REQUEST, *PCX_SET_INTERFACE_PRIORITY_REQUEST;
  517. //
  518. // Get node state request
  519. //
  520. typedef CX_NODE_COMMON_REQUEST CX_GET_NODE_STATE_REQUEST;
  521. typedef PCX_NODE_COMMON_REQUEST PCX_GET_NODE_STATE_REQUEST;
  522. //
  523. // Get node state response
  524. //
  525. typedef struct {
  526. CLUSNET_NODE_COMM_STATE State;
  527. } CX_GET_NODE_STATE_RESPONSE, *PCX_GET_NODE_STATE_RESPONSE;
  528. //
  529. // Get network state request
  530. //
  531. typedef CX_NETWORK_COMMON_REQUEST CX_GET_NETWORK_STATE_REQUEST;
  532. typedef PCX_NETWORK_COMMON_REQUEST PCX_GET_NETWORK_STATE_REQUEST;
  533. //
  534. // Get network state response
  535. //
  536. typedef struct {
  537. CLUSNET_NETWORK_STATE State;
  538. } CX_GET_NETWORK_STATE_RESPONSE, *PCX_GET_NETWORK_STATE_RESPONSE;
  539. //
  540. // Get interface state request
  541. //
  542. typedef CX_INTERFACE_COMMON_REQUEST CX_GET_INTERFACE_STATE_REQUEST;
  543. typedef PCX_INTERFACE_COMMON_REQUEST PCX_GET_INTERFACE_STATE_REQUEST;
  544. //
  545. // Get interface state response
  546. //
  547. typedef struct {
  548. CLUSNET_INTERFACE_STATE State;
  549. } CX_GET_INTERFACE_STATE_RESPONSE, *PCX_GET_INTERFACE_STATE_RESPONSE;
  550. //
  551. // Get node membership state request
  552. //
  553. typedef CX_NODE_COMMON_REQUEST CX_GET_NODE_MMSTATE_REQUEST;
  554. typedef PCX_NODE_COMMON_REQUEST PCX_GET_NODE_MMSTATE_REQUEST;
  555. //
  556. // Get node membership state response
  557. //
  558. typedef struct {
  559. CLUSNET_NODE_STATE State;
  560. } CX_GET_NODE_MMSTATE_RESPONSE, *PCX_GET_NODE_MMSTATE_RESPONSE;
  561. //
  562. // Set node membership state request
  563. //
  564. typedef struct _CX_SET_NODE_MMSTATE_REQUEST {
  565. CL_NODE_ID NodeId;
  566. CLUSNET_NODE_STATE State;
  567. } CX_SET_NODE_MMSTATE_REQUEST, *PCX_SET_NODE_MMSTATE_REQUEST;
  568. //
  569. // Send Poison Packet request
  570. //
  571. typedef CX_NODE_COMMON_REQUEST CX_SEND_POISON_PKT_REQUEST;
  572. typedef PCX_NODE_COMMON_REQUEST PCX_SEND_POISON_PKT_REQUEST;
  573. //
  574. // Set Outerscreen request. sets clusnet's notion of which nodes
  575. // are in the cluster. used to filter poison packets from non-cluster
  576. // members.
  577. //
  578. typedef struct _CX_SET_OUTERSCREEN_REQUEST {
  579. ULONG Outerscreen;
  580. } CX_SET_OUTERSCREEN_REQUEST, *PCX_SET_OUTERSCREEN_REQUEST;
  581. //
  582. // Regroup Finished request. tell clusnet the new event epoch
  583. //
  584. typedef struct _CX_REGROUP_FINISHED_REQUEST {
  585. ULONG EventEpoch;
  586. ULONG RegroupEpoch;
  587. } CX_REGROUP_FINISHED_REQUEST, *PCX_REGROUP_FINISHED_REQUEST;
  588. //
  589. // Import Security Context. used to ship pointers to security blobs
  590. // from user to kernel mode so clusnet can sign its poison and
  591. // heartbeat pkts.
  592. //
  593. typedef struct _CX_IMPORT_SECURITY_CONTEXT_REQUEST {
  594. CL_NODE_ID JoiningNodeId;
  595. PVOID PackageName;
  596. ULONG PackageNameSize;
  597. ULONG SignatureSize;
  598. PVOID ServerContext;
  599. PVOID ClientContext;
  600. } CX_IMPORT_SECURITY_CONTEXT_REQUEST, *PCX_IMPORT_SECURITY_CONTEXT_REQUEST;
  601. //
  602. // Configure Multicast plumbs a network's multicast parameters into
  603. // clusnet.
  604. //
  605. typedef struct _CX_CONFIGURE_MULTICAST_REQUEST {
  606. CL_NETWORK_ID NetworkId;
  607. ULONG MulticastNetworkBrand;
  608. ULONG MulticastAddress; // offset from start of struct
  609. ULONG MulticastAddressLength;
  610. ULONG Key; // offset from start of struct
  611. ULONG KeyLength;
  612. } CX_CONFIGURE_MULTICAST_REQUEST, *PCX_CONFIGURE_MULTICAST_REQUEST;
  613. //
  614. // Request and response to query a network's multicast reachable set.
  615. //
  616. typedef CX_NETWORK_COMMON_REQUEST CX_GET_MULTICAST_REACHABLE_SET_REQUEST;
  617. typedef PCX_NETWORK_COMMON_REQUEST PCX_GET_MULTICAST_REACHABLE_SET_REQUEST;
  618. typedef struct _CX_GET_MULTICAST_REACHABLE_SET_RESPONSE {
  619. ULONG NodeScreen;
  620. } CX_GET_MULTICAST_REACHABLE_SET_RESPONSE,
  621. *PCX_GET_MULTICAST_REACHABLE_SET_RESPONSE;
  622. //
  623. // Add the defines for clussvc clusnet Heartbeating.
  624. //
  625. typedef struct _CLUSNET_SET_IAMALIVE_PARAM_REQUEST {
  626. ULONG Timeout;
  627. ClussvcHangAction Action;
  628. } CLUSNET_SET_IAMALIVE_PARAM_REQUEST, *PCLUSNET_SET_IAMALIVE_PARAM_REQUEST;
  629. #endif //ifndef _NTDDCNET_INCLUDED_