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.

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