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.

633 lines
22 KiB

  1. /*++ BUILD Version: 0009 // Increment this if a change has global effects
  2. Copyright (c) 1987-1993 Microsoft Corporation
  3. Module Name:
  4. ntddnwfs.h
  5. Abstract:
  6. This is the include file that defines all constants and types for
  7. accessing the NetWare redirector file system device.
  8. Author:
  9. Colin Watson (ColinW) 23-Dec-1992
  10. Revision History:
  11. --*/
  12. #ifndef _NTDDNWFS_
  13. #define _NTDDNWFS_
  14. #include <windef.h>
  15. #include <winnetwk.h> // NETRESOURCE structure
  16. typedef CHAR SERVERNAME[48];
  17. typedef SERVERNAME* PSERVERNAME;
  18. //
  19. // Device Name - this string is the name of the device. It is the name
  20. // that should be passed to NtOpenFile when accessing the device.
  21. //
  22. // Note: For devices that support multiple units, it should be suffixed
  23. // with the Ascii representation of the unit number.
  24. //
  25. #define DD_NWFS_DEVICE_NAME "\\Device\\NwRdr"
  26. #define DD_NWFS_DEVICE_NAME_U L"\\Device\\NwRdr"
  27. //
  28. // The file system name as returned by
  29. // NtQueryInformationVolume(FileFsAttributeInformation)
  30. //
  31. #define DD_NWFS_FILESYS_NAME "NWRDR"
  32. #define DD_NWFS_FILESYS_NAME_U L"NWRDR"
  33. //
  34. // Connection type bit mask
  35. //
  36. #define CONNTYPE_DISK 0x00000001
  37. #define CONNTYPE_PRINT 0x00000002
  38. #define CONNTYPE_ANY ( CONNTYPE_DISK | CONNTYPE_PRINT )
  39. #define CONNTYPE_IMPLICIT 0x80000000
  40. #define CONNTYPE_SYMBOLIC 0x40000000
  41. #define CONNTYPE_UID 0x00010000
  42. //
  43. // EA Names for creating a connection
  44. //
  45. #define EA_NAME_USERNAME "UserName"
  46. #define EA_NAME_PASSWORD "Password"
  47. #define EA_NAME_TYPE "Type"
  48. #define EA_NAME_CREDENTIAL_EX "ExCredentials"
  49. #define TRANSACTION_REQUEST 0x00000003
  50. //
  51. // NtDeviceIoControlFile/NtFsControlFile IoControlCode values for this device.
  52. //
  53. // Warning: Remember that the low two bits of the code specify how the
  54. // buffers are passed to the driver!
  55. //
  56. //
  57. // Method = 00 - Buffer both input and output buffers for the request
  58. // Method = 01 - Buffer input, map output buffer to an MDL as an IN buff
  59. // Method = 10 - Buffer input, map output buffer to an MDL as an OUT buff
  60. // Method = 11 - Do not buffer either the input or output
  61. //
  62. #define IOCTL_NWRDR_BASE FILE_DEVICE_NETWORK_FILE_SYSTEM
  63. #define _NWRDR_CONTROL_CODE(request, method, access) \
  64. CTL_CODE(IOCTL_NWRDR_BASE, request, method, access)
  65. #define FSCTL_NWR_START _NWRDR_CONTROL_CODE(200, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
  66. #define FSCTL_NWR_STOP _NWRDR_CONTROL_CODE(201, METHOD_BUFFERED, FILE_ANY_ACCESS)
  67. #define FSCTL_NWR_LOGON _NWRDR_CONTROL_CODE(202, METHOD_BUFFERED, FILE_ANY_ACCESS)
  68. #define FSCTL_NWR_LOGOFF _NWRDR_CONTROL_CODE(203, METHOD_BUFFERED, FILE_ANY_ACCESS)
  69. #define FSCTL_NWR_GET_CONNECTION _NWRDR_CONTROL_CODE(204, METHOD_NEITHER, FILE_ANY_ACCESS)
  70. #define FSCTL_NWR_ENUMERATE_CONNECTIONS _NWRDR_CONTROL_CODE(205, METHOD_NEITHER, FILE_ANY_ACCESS)
  71. #define FSCTL_NWR_DELETE_CONNECTION _NWRDR_CONTROL_CODE(207, METHOD_BUFFERED, FILE_ANY_ACCESS)
  72. #define FSCTL_NWR_BIND_TO_TRANSPORT _NWRDR_CONTROL_CODE(208, METHOD_BUFFERED, FILE_ANY_ACCESS)
  73. #define FSCTL_NWR_CHANGE_PASS _NWRDR_CONTROL_CODE(209, METHOD_BUFFERED, FILE_ANY_ACCESS)
  74. #define FSCTL_NWR_SET_INFO _NWRDR_CONTROL_CODE(211, METHOD_BUFFERED, FILE_ANY_ACCESS)
  75. #define FSCTL_NWR_GET_USERNAME _NWRDR_CONTROL_CODE(215, METHOD_NEITHER, FILE_ANY_ACCESS)
  76. #define FSCTL_NWR_CHALLENGE _NWRDR_CONTROL_CODE(216, METHOD_BUFFERED, FILE_ANY_ACCESS)
  77. #define FSCTL_NWR_GET_CONN_DETAILS _NWRDR_CONTROL_CODE(217, METHOD_NEITHER, FILE_ANY_ACCESS)
  78. #define FSCTL_NWR_GET_MESSAGE _NWRDR_CONTROL_CODE(218, METHOD_NEITHER, FILE_ANY_ACCESS)
  79. #define FSCTL_NWR_GET_STATISTICS _NWRDR_CONTROL_CODE(219, METHOD_NEITHER, FILE_ANY_ACCESS)
  80. #define FSCTL_NWR_GET_CONN_STATUS _NWRDR_CONTROL_CODE(220, METHOD_NEITHER, FILE_ANY_ACCESS)
  81. #define FSCTL_NWR_GET_CONN_INFO _NWRDR_CONTROL_CODE(221, METHOD_NEITHER, FILE_ANY_ACCESS)
  82. #define FSCTL_NWR_GET_PREFERRED_SERVER _NWRDR_CONTROL_CODE(222, METHOD_NEITHER, FILE_ANY_ACCESS)
  83. #define FSCTL_NWR_GET_CONN_PERFORMANCE _NWRDR_CONTROL_CODE(223, METHOD_NEITHER, FILE_ANY_ACCESS)
  84. #define FSCTL_NWR_SET_SHAREBIT _NWRDR_CONTROL_CODE(224, METHOD_NEITHER, FILE_ANY_ACCESS)
  85. #define FSCTL_NWR_GET_CONN_DETAILS2 _NWRDR_CONTROL_CODE(225, METHOD_NEITHER, FILE_ANY_ACCESS)
  86. #define FSCTL_NWR_CLOSEALL _NWRDR_CONTROL_CODE(226, METHOD_BUFFERED, FILE_ANY_ACCESS)
  87. #define FSCTL_NWR_NDS_SETCONTEXT NWR_ANY_NDS(1)
  88. #define FSCTL_NWR_NDS_GETCONTEXT NWR_ANY_NDS(2)
  89. #define FSCTL_NWR_NDS_VERIFY_TREE NWR_ANY_NDS(3)
  90. #define FSCTL_NWR_NDS_RESOLVE_NAME NWR_ANY_NDS(4)
  91. #define FSCTL_NWR_NDS_LIST_SUBS NWR_ANY_NDS(5)
  92. #define FSCTL_NWR_NDS_READ_INFO NWR_ANY_NDS(6)
  93. #define FSCTL_NWR_NDS_READ_ATTR NWR_ANY_NDS(7)
  94. #define FSCTL_NWR_NDS_OPEN_STREAM NWR_ANY_NDS(8)
  95. #define FSCTL_NWR_NDS_GET_QUEUE_INFO NWR_ANY_NDS(9)
  96. #define FSCTL_NWR_NDS_GET_VOLUME_INFO NWR_ANY_NDS(10)
  97. #define FSCTL_NWR_NDS_RAW_FRAGEX NWR_ANY_NDS(11)
  98. #define FSCTL_NWR_NDS_CHANGE_PASS NWR_ANY_NDS(12)
  99. #define FSCTL_NWR_NDS_LIST_TREES NWR_ANY_NDS(13)
  100. #define IOCTL_NWR_RAW_HANDLE _NWRDR_CONTROL_CODE(1002,METHOD_NEITHER, FILE_ANY_ACCESS)
  101. //
  102. // UserNcp control code definitions. The parameter (X) to NWR_ANY_NCP
  103. // is the function code to be placed in the NCP.
  104. //
  105. #define NWR_ANY_NCP(X) _NWRDR_CONTROL_CODE(0x400 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  106. #define NWR_ANY_F2_NCP(X) _NWRDR_CONTROL_CODE(0x500 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  107. #define NWR_ANY_HANDLE_NCP(X) _NWRDR_CONTROL_CODE(0x600 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  108. #define NWR_ANY_NDS(X) _NWRDR_CONTROL_CODE(0x700 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  109. #define FSCTL_NWR_NCP_E3H NWR_ANY_NCP(0x17)
  110. #define FSCTL_NWR_NCP_E2H NWR_ANY_NCP(0x16)
  111. #define FSCTL_NWR_NCP_E1H NWR_ANY_NCP(0x15)
  112. #define FSCTL_NWR_NCP_E0H NWR_ANY_NCP(0x14)
  113. //
  114. // Macro for obtaining the parameter given to NWR_ANY_XXX when creating
  115. // a control code to send a UserNcp to the redirector.
  116. //
  117. #define ANY_NCP_OPCODE(X) ((UCHAR)(((X) >> 2) & 0x00ff))
  118. //
  119. // Macro to give the command type
  120. //
  121. #define IS_IT_NWR_ANY_NCP(X) ((X & 0x1C00) == (0x400 << 2))
  122. #define IS_IT_NWR_ANY_F2_NCP(X) ((X & 0x1C00) == (0x500 << 2))
  123. #define IS_IT_NWR_ANY_HANDLE_NCP(X) ((X & 0x1C00) == (0x600 << 2))
  124. //
  125. // Redirector Request Packet used by the Workstation service
  126. // to pass parameters to the Redirector through Buffer 1 of
  127. // NtFsControlFile.
  128. //
  129. // Additional output of each FSCtl is found in Buffer 2.
  130. //
  131. #define REQUEST_PACKET_VERSION 0x00000001L // Structure version.
  132. typedef struct _NWR_REQUEST_PACKET {
  133. ULONG Version; // Version of structure in Buffer 2
  134. union {
  135. //
  136. // For FSCTL_NWR_BIND_TO_TRANSPORT
  137. //
  138. struct {
  139. ULONG QualityOfService; // Quality of service indicator IN
  140. ULONG TransportNameLength; // Not including terminator IN
  141. WCHAR TransportName[1]; // Name of transport provider IN
  142. } Bind;
  143. //
  144. // For FSCTL_NWR_LOGON
  145. //
  146. struct {
  147. LUID LogonId; // User logon session identifier IN
  148. ULONG UserNameLength; // Byte count not including NULL IN
  149. ULONG PasswordLength; // Byte count not including NULL IN
  150. ULONG ServerNameLength; // Byte count not including NULL IN
  151. ULONG ReplicaAddrLength; // IPX address of the nearest dir server
  152. // replica (for NDS login only).
  153. // It's either sizeof(TDI_ADDRESS_IPX)
  154. // or 0. IN
  155. ULONG PrintOption; // Print options for user IN
  156. WCHAR UserName[1]; // User name not NULL terminated. IN
  157. // Password string // Default password for connection,
  158. // not NULL terminated, packed
  159. // in buffer immediately after
  160. // UserName. IN
  161. // ServerName // Preferred server name packed in
  162. // buffer immediately after
  163. // Password. IN
  164. // IpxAddress // Address copied from the SAP response
  165. // packet, packed immediately after
  166. // the servername. IN
  167. } Logon;
  168. //
  169. // For FSCTL_NWR_CHANGE_PASS
  170. //
  171. struct {
  172. ULONG UserNameLength;
  173. ULONG PasswordLength;
  174. ULONG ServerNameLength;
  175. WCHAR UserName[1];
  176. // Password string // New password. IN
  177. // ServerName // Server with the new password IN
  178. } ChangePass;
  179. //
  180. // For FSCTL_NWR_LOGOFF
  181. //
  182. struct {
  183. LUID LogonId; // User logon session identifier IN
  184. } Logoff;
  185. //
  186. // For FSCTL_NWR_DELETE_CONNECTION
  187. //
  188. struct {
  189. BOOLEAN UseForce; // Force flag IN
  190. } DeleteConn;
  191. //
  192. // For FSCTL_NWR_GET_CONNECTION
  193. //
  194. struct {
  195. ULONG BytesNeeded; // Size (byte count) required of
  196. // output buffer including
  197. // terminator OUT
  198. ULONG DeviceNameLength; // Not including terminator IN
  199. WCHAR DeviceName[4]; // Name of DOS device IN
  200. } GetConn;
  201. //
  202. // FSCTL_NWR_ENUMERATE_CONNECTIONS
  203. //
  204. struct {
  205. ULONG EntriesRequested; // Number of entries to get IN
  206. ULONG EntriesReturned; // Entries returned in respose buf OUT
  207. ULONG_PTR ResumeKey; // Handle to next entry to get IN OUT
  208. ULONG BytesNeeded; // Size (byte count) of next entry OUT
  209. ULONG ConnectionType; // Resource type requested IN
  210. LUID Uid; // Uid to search for IN
  211. } EnumConn;
  212. //
  213. // FSCTL_NWR_SET_INFO
  214. //
  215. struct {
  216. ULONG PrintOption;
  217. ULONG MaximumBurstSize;
  218. ULONG PreferredServerLength; // Byte count not including NULL IN
  219. ULONG ProviderNameLength; // Byte count not including NULL IN
  220. WCHAR PreferredServer[1]; // Preferred server name not NULL
  221. // terminated.
  222. // ProviderName string // Provider name not NULL terminated.
  223. // Packed in buffer immediately
  224. // after PreferredServer
  225. } SetInfo;
  226. //
  227. // FSCTL_NWR_GET_CONN_STATUS
  228. //
  229. struct {
  230. ULONG ConnectionNameLength; // IN: Length of the connection name we want.
  231. ULONG_PTR ResumeKey; // IN: Resume key for a continued request.
  232. ULONG EntriesReturned; // OUT: Entries returned in respose buffer.
  233. ULONG BytesNeeded; // OUT: Size (byte count) of next entry.
  234. WCHAR ConnectionName[1]; // IN: Connection name described above.
  235. } GetConnStatus;
  236. //
  237. // FSCTL_NWR_GET_CONN_INFO
  238. //
  239. struct {
  240. ULONG ConnectionNameLength; // IN: Length of the connection name we want.
  241. WCHAR ConnectionName[1]; // IN: Connection name described above.
  242. } GetConnInfo;
  243. //
  244. // FSCTL_NWR_GET_CONN_PERFORMANCE
  245. //
  246. struct {
  247. //
  248. // These are the fields for the NETCONNECTINFOSTRUCT.
  249. //
  250. DWORD dwFlags;
  251. DWORD dwSpeed;
  252. DWORD dwDelay;
  253. DWORD dwOptDataSize;
  254. //
  255. // This is the remote name in question.
  256. //
  257. ULONG RemoteNameLength;
  258. WCHAR RemoteName[1];
  259. } GetConnPerformance;
  260. struct {
  261. ULONG DebugFlags; // Value for NwDebug
  262. } DebugValue;
  263. } Parameters;
  264. } NWR_REQUEST_PACKET, *PNWR_REQUEST_PACKET;
  265. typedef struct _NWR_NDS_REQUEST_PACKET {
  266. //
  267. // Version of structure in Buffer 2.
  268. //
  269. ULONG Version;
  270. union {
  271. //
  272. // For FSCTL_NWR_NDS_RESOLVE_NAME
  273. //
  274. struct {
  275. ULONG ObjectNameLength; // IN
  276. DWORD ResolverFlags; // IN
  277. DWORD BytesWritten; // OUT
  278. WCHAR ObjectName[1]; // IN
  279. } ResolveName;
  280. //
  281. // For FSCTL_NWR_NDS_READ_INFO
  282. //
  283. struct {
  284. DWORD ObjectId; // IN
  285. DWORD BytesWritten; // OUT
  286. } GetObjectInfo;
  287. //
  288. // For FSCTL_NWR_NDS_LIST_SUBS
  289. //
  290. struct {
  291. DWORD ObjectId; // IN
  292. DWORD_PTR IterHandle; // IN
  293. DWORD BytesWritten; // OUT
  294. } ListSubordinates;
  295. //
  296. // For FSCTL_NWR_NDS_READ_ATTR
  297. //
  298. struct {
  299. DWORD ObjectId; // IN
  300. DWORD_PTR IterHandle; // IN
  301. DWORD BytesWritten; // OUT
  302. DWORD AttributeNameLength; // IN
  303. WCHAR AttributeName[1]; // IN
  304. } ReadAttribute;
  305. //
  306. // For FSCTL_NWR_NDS_OPEN_STREAM
  307. //
  308. struct {
  309. DWORD FileLength; // OUT
  310. DWORD StreamAccess; // IN
  311. DWORD ObjectOid; // IN
  312. UNICODE_STRING StreamName; // IN
  313. WCHAR StreamNameString[1]; // IN
  314. } OpenStream;
  315. //
  316. // For FSCTL_NWR_NDS_SET_CONTEXT
  317. //
  318. struct {
  319. DWORD TreeNameLen ; // IN
  320. DWORD ContextLen; // IN
  321. WCHAR TreeAndContextString[1]; // IN
  322. } SetContext;
  323. //
  324. // For FSCTL_NWR_NDS_GET_CONTEXT
  325. //
  326. struct {
  327. UNICODE_STRING Context; // OUT
  328. DWORD TreeNameLen ; // IN
  329. WCHAR TreeNameString[1]; // IN
  330. } GetContext;
  331. //
  332. // For FSCTL_NWR_NDS_VERIFY_TREE
  333. //
  334. struct {
  335. UNICODE_STRING TreeName; // IN
  336. WCHAR NameString[1]; // IN
  337. } VerifyTree;
  338. //
  339. // For FSCTL_NWR_NDS_GET_QUEUE_INFO
  340. //
  341. struct {
  342. UNICODE_STRING QueueName; // IN
  343. UNICODE_STRING HostServer; // OUT
  344. DWORD QueueId; // OUT
  345. } GetQueueInfo;
  346. //
  347. // For FSCTL_NWR_NDS_GET_VOLUME_INFO
  348. //
  349. struct {
  350. DWORD ServerNameLen; // OUT
  351. DWORD TargetVolNameLen; // OUT
  352. DWORD VolumeNameLen; // IN
  353. WCHAR VolumeName[1]; // IN
  354. } GetVolumeInfo;
  355. //
  356. // For FSCTL_NWR_NDS_RAW_FRAGEX
  357. //
  358. struct {
  359. DWORD NdsVerb; // IN
  360. DWORD RequestLength; // IN
  361. DWORD ReplyLength; // OUT
  362. BYTE Request[1]; // IN
  363. } RawRequest;
  364. //
  365. // For FSCTL_NWR_NDS_CHANGE_PASS
  366. //
  367. struct {
  368. DWORD NdsTreeNameLength;
  369. DWORD UserNameLength;
  370. DWORD CurrentPasswordLength;
  371. DWORD NewPasswordLength;
  372. //
  373. // The above strings should be end to
  374. // end starting at StringBuffer.
  375. //
  376. WCHAR StringBuffer[1];
  377. } ChangePass;
  378. //
  379. // For FSCTL_NWR_NDS_LIST_TREES
  380. //
  381. struct {
  382. DWORD NtUserNameLength; // IN
  383. LARGE_INTEGER UserLuid; // OUT
  384. DWORD TreesReturned; // OUT
  385. WCHAR NtUserName[1]; // IN
  386. } ListTrees;
  387. } Parameters;
  388. } NWR_NDS_REQUEST_PACKET, *PNWR_NDS_REQUEST_PACKET;
  389. //
  390. // Structure of buffer 2 for FSCTL_NWR_GET_CONNECTION
  391. //
  392. typedef struct _NWR_SERVER_RESOURCE {
  393. WCHAR UncName[1]; // Server resource name DOS device
  394. // is connected to; NULL terminated
  395. } NWR_SERVER_RESOURCE, *PNWR_SERVER_RESOURCE;
  396. //
  397. // Structure of buffer for FSCTL_NWR_GET_MESSAGE
  398. //
  399. typedef struct _NWR_SERVER_MESSAGE {
  400. ULONG MessageOffset; // Offset from start of buffer to message
  401. LUID LogonId; // Logon ID
  402. WCHAR Server[1]; // Source of message, NUL terminated OUT
  403. //WCHAR Message[]; // The message text, NUL terminated OUT
  404. } NWR_SERVER_MESSAGE, *PNWR_SERVER_MESSAGE;
  405. #define TRANSACTION_VERSION 0x00000001L // Structure version.
  406. typedef struct _NWR_TRANSACTION {
  407. ULONG Type; // Type of structure
  408. ULONG Size; // Size of fixed portion of structure
  409. ULONG Version; // Structure version.
  410. ULONG NameLength; // Number of bytes in name (in path
  411. // format, e.g., \server\pipe\netapi\4)
  412. ULONG NameOffset; // Offset of name in buffer.
  413. BOOLEAN ResponseExpected; // Should remote system respond?
  414. ULONG Timeout; // Timeout time in milliseconds.
  415. ULONG SetupWords; // Number of trans setup words (may be
  416. // 0). (setup words are input/output.)
  417. ULONG SetupOffset; // Offset of setup (may be 0 for none).
  418. ULONG MaxSetup; // Size of setup word array (may be 0).
  419. ULONG ParmLength; // Input param area length (may be 0).
  420. PVOID ParmPtr; // Input parameter area (may be NULL).
  421. ULONG MaxRetParmLength; // Output param. area length (may be 0).
  422. ULONG DataLength; // Input data area length (may be 0).
  423. PVOID DataPtr; // Input data area (may be NULL).
  424. ULONG MaxRetDataLength; // Output data area length (may be 0).
  425. PVOID RetDataPtr; // Output data area (may be NULL).
  426. } NWR_TRANSACTION, *PNWR_TRANSACTION;
  427. typedef struct _NWR_GET_CONNECTION_DETAILS {
  428. SERVERNAME ServerName;
  429. UCHAR OrderNumber; // Position in the Scb chain starting at 1
  430. UCHAR ServerAddress[12];
  431. UCHAR ConnectionNumberLo;
  432. UCHAR ConnectionNumberHi;
  433. UCHAR MajorVersion;
  434. UCHAR MinorVersion;
  435. BOOLEAN Preferred;
  436. } NWR_GET_CONNECTION_DETAILS, *PNWR_GET_CONNECTION_DETAILS;
  437. typedef struct _CONN_DETAILS2 {
  438. BOOL fNds; // TRUE if NDS, false for Bindery servers
  439. WCHAR NdsTreeName[48]; // The tree name or '\0' for a 2.x or 3.x server
  440. } CONN_DETAILS2, *PCONN_DETAILS2;
  441. typedef struct _NWR_GET_USERNAME {
  442. WCHAR UserName[1];
  443. } NWR_GET_USERNAME, *PNWR_GET_USERNAME;
  444. typedef struct _NWR_GET_CHALLENGE_REQUEST {
  445. ULONG Flags;
  446. ULONG ObjectId;
  447. UCHAR Challenge[8];
  448. ULONG ServerNameorPasswordLength;
  449. WCHAR ServerNameorPassword[1]; // No NULL
  450. } NWR_GET_CHALLENGE_REQUEST, *PNWR_GET_CHALLENGE_REQUEST;
  451. #define CHALLENGE_FLAGS_SERVERNAME 0
  452. #define CHALLENGE_FLAGS_PASSWORD 1
  453. typedef struct _NWR_GET_CHALLENGE_REPLY {
  454. UCHAR Challenge[8];
  455. } NWR_GET_CHALLENGE_REPLY, *PNWR_GET_CHALLENGE_REPLY;
  456. typedef struct _NW_REDIR_STATISTICS {
  457. LARGE_INTEGER StatisticsStartTime;
  458. LARGE_INTEGER BytesReceived;
  459. LARGE_INTEGER NcpsReceived;
  460. LARGE_INTEGER BytesTransmitted;
  461. LARGE_INTEGER NcpsTransmitted;
  462. ULONG ReadOperations;
  463. ULONG RandomReadOperations;
  464. ULONG ReadNcps;
  465. ULONG PacketBurstReadNcps;
  466. ULONG PacketBurstReadTimeouts;
  467. ULONG WriteOperations;
  468. ULONG RandomWriteOperations;
  469. ULONG WriteNcps;
  470. ULONG PacketBurstWriteNcps;
  471. ULONG PacketBurstWriteTimeouts;
  472. // Connection/Session counts
  473. ULONG Sessions;
  474. ULONG FailedSessions;
  475. ULONG Reconnects;
  476. ULONG NW2xConnects;
  477. ULONG NW3xConnects;
  478. ULONG NW4xConnects;
  479. ULONG ServerDisconnects;
  480. ULONG CurrentCommands;
  481. } NW_REDIR_STATISTICS, *PNW_REDIR_STATISTICS;
  482. //
  483. // CONN_STATUS structures for the new shell.
  484. //
  485. typedef struct _CONN_STATUS {
  486. DWORD dwTotalLength; // The total length including packed strings.
  487. LPWSTR pszServerName; // The server name.
  488. LPWSTR pszUserName; // The user name.
  489. LPWSTR pszTreeName; // The tree name or NULL for a 2.x or 3.x server.
  490. DWORD nConnNum; // The connection number used on nw srv.
  491. BOOL fNds; // TRUE if NDS, False for Bindery servers
  492. BOOL fPreferred; // TRUE if the connection is a preferred server with no explicit uses.
  493. DWORD dwConnType; // Authentication status of the connection.
  494. } CONN_STATUS, *PCONN_STATUS;
  495. #define NW_CONN_NOT_AUTHENTICATED 0x00000000
  496. #define NW_CONN_BINDERY_LOGIN 0x00000001
  497. #define NW_CONN_NDS_AUTHENTICATED_NO_LICENSE 0x00000002
  498. #define NW_CONN_NDS_AUTHENTICATED_LICENSED 0x00000003
  499. #define NW_CONN_DISCONNECTED 0x00000004
  500. typedef struct _CONN_INFORMATION {
  501. DWORD HostServerLength;
  502. LPWSTR HostServer;
  503. DWORD UserNameLength;
  504. LPWSTR UserName;
  505. } CONN_INFORMATION, *PCONN_INFORMATION;
  506. #endif // ifndef _NTDDNWFS_