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.

655 lines
26 KiB

  1. /*++ BUILD Version: 0005 // Increment this if a change has global effects
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ntddbrow.h
  5. Abstract:
  6. This is the include file that defines all constants and types for
  7. accessing the datagram receiver device driver, better know as the
  8. Browser.
  9. Authors:
  10. Larry Osterman (larryo) & Rita Wong (ritaw) 25-Mar-1991
  11. Revision History:
  12. --*/
  13. #ifndef _NTDDBROW_
  14. #define _NTDDBROW_
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #include <windef.h>
  19. #include <lmcons.h>
  20. #include <lmwksta.h>
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. //
  25. // Device Name - this string is the name of the device. It is the name
  26. // that should be passed to NtOpenFile when accessing the device.
  27. //
  28. // Note: For devices that support multiple units, it should be suffixed
  29. // with the Ascii representation of the unit number.
  30. //
  31. #define DD_BROWSER_DEVICE_NAME "\\Device\\LanmanDatagramReceiver"
  32. #define DD_BROWSER_DEVICE_NAME_U L"\\Device\\LanmanDatagramReceiver"
  33. //
  34. // The file system name as returned by
  35. // NtQueryInformationVolume(FileFsAttributeInformation)
  36. //
  37. #define DD_BROWSER_NAME "LMBROWSER"
  38. //
  39. // Name of the event used to force the scavenger thread to announce the
  40. // server.
  41. //
  42. #define SERVER_ANNOUNCE_EVENT_W L"\\LanmanServerAnnounceEvent"
  43. #define BOWSER_CONFIG_PARAMETERS L"Parameters"
  44. #define BOWSER_CONFIG_IRP_STACK_SIZE L"IrpStackSize"
  45. #define BOWSER_CONFIG_MAILSLOT_THRESHOLD L"MailslotDatagramThreshold"
  46. #define BOWSER_CONFIG_GETBLIST_THRESHOLD L"GetBrowserListThreshold"
  47. #define BOWSER_CONFIG_SERVER_DELETION_THRESHOLD L"BrowserServerDeletionThreshold"
  48. #define BOWSER_CONFIG_DOMAIN_DELETION_THRESHOLD L"BrowserDomainDeletionThreshold"
  49. #define BOWSER_CONFIG_FIND_MASTER_TIMEOUT L"BrowserFindMasterTimeout"
  50. #define BOWSER_CONFIG_MINIMUM_CONFIGURED_BROWSER L"BrowserMinimumConfiguredBrowsers"
  51. #define BROWSER_CONFIG_BACKUP_RECOVERY_TIME L"BackupBrowserRecoveryTime"
  52. #define BROWSER_CONFIG_MAXIMUM_BROWSE_ENTRIES L"MaximumBrowseEntries"
  53. #define BROWSER_CONFIG_REFUSE_RESET L"RefuseReset"
  54. //
  55. // This defines the revision of the NT browser.
  56. //
  57. // To guarantee that a newer browser is preferred over an older version, bump
  58. // this version number.
  59. //
  60. #define BROWSER_ELECTION_VERSION 0x0001
  61. #define BROWSER_VERSION_MAJOR 0x01
  62. #define BROWSER_VERSION_MINOR 0x0F
  63. //
  64. // Number of seconds a GetBrowserServerList request will wait until it forces
  65. // an election.
  66. //
  67. #define BOWSER_GETBROWSERLIST_TIMEOUT 1
  68. //
  69. // Number of retries of the GetBrowserServerList request we will issue before we
  70. // give up.
  71. //
  72. #define BOWSER_GETBROWSERLIST_RETRY_COUNT 3
  73. //
  74. // The browser service on a master browser will query the driver with this
  75. // frequency.
  76. //
  77. #define BROWSER_QUERY_DRIVER_FREQUENCY 30
  78. //
  79. // NtDeviceIoControlFile IoControlCode values for this device.
  80. //
  81. // Warning: Remember that the low two bits of the code specify how the
  82. // buffers are passed to the driver!
  83. //
  84. //
  85. // Method = 00 - Buffer both input and output buffers for the request
  86. // Method = 01 - Buffer input, map output buffer to an MDL as an IN buff
  87. // Method = 10 - Buffer input, map output buffer to an MDL as an OUT buff
  88. // Method = 11 - Do not buffer either the input or output
  89. //
  90. #define IOCTL_DGR_BASE FILE_DEVICE_NETWORK_BROWSER
  91. #define _BROWSER_CONTROL_CODE(request, method, access) \
  92. CTL_CODE(IOCTL_DGR_BASE, request, method, access)
  93. #define IOCTL_LMDR_START _BROWSER_CONTROL_CODE(0x001, METHOD_NEITHER, FILE_ANY_ACCESS)
  94. #define IOCTL_LMDR_STOP _BROWSER_CONTROL_CODE(0x002, METHOD_NEITHER, FILE_ANY_ACCESS)
  95. #define IOCTL_LMDR_ADD_NAME _BROWSER_CONTROL_CODE(0x003, METHOD_BUFFERED, FILE_ANY_ACCESS)
  96. #define IOCTL_LMDR_DELETE_NAME _BROWSER_CONTROL_CODE(0x004, METHOD_BUFFERED, FILE_ANY_ACCESS)
  97. #define IOCTL_LMDR_ADD_NAME_DOM _BROWSER_CONTROL_CODE(0x003, METHOD_NEITHER, FILE_ANY_ACCESS)
  98. #define IOCTL_LMDR_DELETE_NAME_DOM _BROWSER_CONTROL_CODE(0x004, METHOD_NEITHER, FILE_ANY_ACCESS)
  99. #define IOCTL_LMDR_ENUMERATE_NAMES _BROWSER_CONTROL_CODE(0x005, METHOD_NEITHER, FILE_ANY_ACCESS)
  100. #define IOCTL_LMDR_ENUMERATE_SERVERS _BROWSER_CONTROL_CODE(0x006, METHOD_NEITHER, FILE_ANY_ACCESS)
  101. #define IOCTL_LMDR_BIND_TO_TRANSPORT _BROWSER_CONTROL_CODE(0x007, METHOD_BUFFERED, FILE_ANY_ACCESS)
  102. #define IOCTL_LMDR_BIND_TO_TRANSPORT_DOM _BROWSER_CONTROL_CODE(0x007, METHOD_NEITHER, FILE_ANY_ACCESS)
  103. #define IOCTL_LMDR_ENUMERATE_TRANSPORTS _BROWSER_CONTROL_CODE(0x008, METHOD_NEITHER, FILE_ANY_ACCESS)
  104. #define IOCTL_LMDR_UNBIND_FROM_TRANSPORT _BROWSER_CONTROL_CODE(0x008, METHOD_BUFFERED, FILE_ANY_ACCESS)
  105. #define IOCTL_LMDR_UNBIND_FROM_TRANSPORT_DOM _BROWSER_CONTROL_CODE(0x009, METHOD_NEITHER, FILE_ANY_ACCESS)
  106. #define IOCTL_LMDR_RENAME_DOMAIN _BROWSER_CONTROL_CODE(0x00A, METHOD_NEITHER, FILE_ANY_ACCESS)
  107. #define IOCTL_LMDR_GET_BROWSER_SERVER_LIST _BROWSER_CONTROL_CODE(0x00C, METHOD_NEITHER, FILE_ANY_ACCESS)
  108. #define IOCTL_LMDR_GET_MASTER_NAME _BROWSER_CONTROL_CODE(0x00D, METHOD_BUFFERED, FILE_ANY_ACCESS)
  109. #define IOCTL_LMDR_BECOME_BACKUP _BROWSER_CONTROL_CODE(0x00E, METHOD_BUFFERED, FILE_ANY_ACCESS)
  110. #define IOCTL_LMDR_BECOME_MASTER _BROWSER_CONTROL_CODE(0x00F, METHOD_BUFFERED, FILE_ANY_ACCESS)
  111. #define IOCTL_LMDR_WAIT_FOR_MASTER_ANNOUNCE _BROWSER_CONTROL_CODE(0x011, METHOD_BUFFERED, FILE_ANY_ACCESS)
  112. #define IOCTL_LMDR_WRITE_MAILSLOT _BROWSER_CONTROL_CODE(0x012, METHOD_NEITHER, FILE_ANY_ACCESS)
  113. #define IOCTL_LMDR_UPDATE_STATUS _BROWSER_CONTROL_CODE(0x013, METHOD_NEITHER, FILE_ANY_ACCESS)
  114. #define IOCTL_LMDR_CHANGE_ROLE _BROWSER_CONTROL_CODE(0x014, METHOD_BUFFERED, FILE_ANY_ACCESS)
  115. #define IOCTL_LMDR_NEW_MASTER_NAME _BROWSER_CONTROL_CODE(0x015, METHOD_BUFFERED, FILE_ANY_ACCESS)
  116. #define IOCTL_LMDR_QUERY_STATISTICS _BROWSER_CONTROL_CODE(0x016, METHOD_BUFFERED, FILE_ANY_ACCESS)
  117. #define IOCTL_LMDR_RESET_STATISTICS _BROWSER_CONTROL_CODE(0x017, METHOD_BUFFERED, FILE_ANY_ACCESS)
  118. #define IOCTL_LMDR_DEBUG_CALL _BROWSER_CONTROL_CODE(0x018, METHOD_BUFFERED, FILE_ANY_ACCESS)
  119. #define IOCTL_LMDR_NETLOGON_MAILSLOT_READ _BROWSER_CONTROL_CODE(0x019, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  120. #define IOCTL_LMDR_NETLOGON_MAILSLOT_ENABLE _BROWSER_CONTROL_CODE(0x020, METHOD_BUFFERED, FILE_ANY_ACCESS)
  121. #define IOCTL_LMDR_IP_ADDRESS_CHANGED _BROWSER_CONTROL_CODE(0x021, METHOD_BUFFERED, FILE_ANY_ACCESS)
  122. #define IOCTL_LMDR_ENABLE_DISABLE_TRANSPORT _BROWSER_CONTROL_CODE(0x022, METHOD_BUFFERED, FILE_ANY_ACCESS)
  123. #define IOCTL_LMDR_BROWSER_PNP_READ _BROWSER_CONTROL_CODE(0x023, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  124. #define IOCTL_LMDR_BROWSER_PNP_ENABLE _BROWSER_CONTROL_CODE(0x024, METHOD_BUFFERED, FILE_ANY_ACCESS)
  125. //
  126. // Identifies the data structure type for Buffer 2 of each IoCtl
  127. //
  128. typedef enum _IOCTL_LMDR_STRUCTURES {
  129. EnumerateNames, // IOCTL_LMDR_ENUMERATE_NAMES
  130. EnumerateServers, // IOCTL_LMDR_ENUMERATE_SERVERS
  131. EnumerateXports, // IOCTL_LMDR_ENUMERATE_TRANSPORTS
  132. Datagram
  133. } IOCTL_LMDR_STRUCTURES;
  134. typedef enum _DGRECEIVER_NAME_TYPE {
  135. ComputerName = 1, // 1: Computer name (signature 0), unique
  136. PrimaryDomain, // 2: Primary domain (signature 0), group
  137. LogonDomain, // 3: Logon domain (signature 0), group
  138. OtherDomain, // 4: Other domain (signature 0), group
  139. DomainAnnouncement, // 5: domain announce (__MSBROWSE__), group
  140. MasterBrowser, // 6: Master browser (domain name, signature 1d), unique
  141. BrowserElection, // 7: Election name (domain name, signature 1e), group
  142. BrowserServer, // 8: Server name (signature 20)
  143. DomainName, // 9: DC Domain name (domain name, signature 1c)
  144. PrimaryDomainBrowser, // a: PDC Browser name (domain name, signature 1b), unique
  145. AlternateComputerName, // b: Computer name (signature 0), unique
  146. } DGRECEIVER_NAME_TYPE, *PDGRECEIVER_NAME_TYPE;
  147. #ifdef ENABLE_PSEUDO_BROWSER
  148. //
  149. // Pseudo Browser Server
  150. // - pseudo level definition:
  151. // 0: Default. normal browser server.
  152. // 1: Semi Pseudo. Regular server but w/ no DMB communications.
  153. // 2: Fully Pseudo server. Black hole functionality.
  154. //
  155. #define BROWSER_NON_PSEUDO 0
  156. #define BROWSER_SEMI_PSEUDO_NO_DMB 1
  157. #define BROWSER_PSEUDO 2
  158. #endif
  159. //
  160. // LAN Man Redirector Request Packet used by the Workstation service
  161. // to pass parameters to the Redirector through Buffer 1 of
  162. // NtDeviceIoControlFile.
  163. //
  164. // Additional input or output of each IoCtl is found in Buffer 2.
  165. //
  166. #define LMDR_REQUEST_PACKET_VERSION_DOM 0x00000007L // Structure version.
  167. #define LMDR_REQUEST_PACKET_VERSION 0x00000006L // Structure version.
  168. typedef struct _LMDR_REQUEST_PACKET {
  169. IOCTL_LMDR_STRUCTURES Type; // Type of structure in Buffer 2
  170. ULONG Version; // Version of structure in Buffer 2
  171. ULONG Level; // Level of information or force level
  172. LUID LogonId; // User logon session identifier
  173. UNICODE_STRING TransportName;
  174. UNICODE_STRING EmulatedDomainName;
  175. union {
  176. struct {
  177. ULONG NumberOfMailslotBuffers;
  178. ULONG NumberOfServerAnnounceBuffers;
  179. ULONG IllegalDatagramThreshold;
  180. ULONG EventLogResetFrequency;
  181. BOOLEAN LogElectionPackets;
  182. BOOLEAN IsLanManNt;
  183. } Start; // IN
  184. struct {
  185. DGRECEIVER_NAME_TYPE Type; // Type of name
  186. ULONG DgReceiverNameLength; // Length of datagram receiver name
  187. WCHAR Name[1]; // Null terminated datagram receiver name.
  188. } AddDelName;
  189. struct {
  190. ULONG EntriesRead; // OUT Number of entries returned
  191. ULONG TotalEntries; // OUT Total entries available.
  192. ULONG TotalBytesNeeded; // OUT Number of bytes needed for API
  193. ULONG ResumeHandle; // IN OUT Resume handle
  194. } EnumerateNames; // OUT Buffer2 is an array of DGRECEIVE
  195. struct {
  196. ULONG EntriesRead; // OUT Number of entries returned
  197. ULONG TotalEntries; // OUT Total entries available
  198. ULONG TotalBytesNeeded; // OUT Total bytes needed to read all
  199. // entries
  200. ULONG ResumeHandle; // IN OUT Resume handle
  201. ULONG ServerType; // IN Type of servers to enumerate
  202. // (defined in lmserver.h)
  203. ULONG DomainNameLength; // IN Length of domain name
  204. WCHAR DomainName[1]; // IN Name of domain to enumerate servers
  205. // from
  206. } EnumerateServers; // OUT Buffer2 contains array of
  207. // ServerInfo structures
  208. struct {
  209. ULONG EntriesRead; // OUT Number of entries returned
  210. ULONG TotalEntries; // OUT Total entries available
  211. ULONG TotalBytesNeeded; // OUT Total bytes needed to read all
  212. // entries
  213. ULONG ResumeHandle; // IN OUT Resume handle
  214. } EnumerateTransports; // OUT Buffer2 contains array of
  215. struct {
  216. ULONG TransportNameLength; // not including terminator
  217. WCHAR TransportName[1]; // Name of transport provider
  218. } Bind; // IN
  219. struct {
  220. ULONG TransportNameLength; // not including terminator
  221. WCHAR TransportName[1]; // Name of transport provider
  222. } Unbind; // IN
  223. struct {
  224. ULONG EntriesRead; // OUT Number of entries returned
  225. ULONG TotalEntries; // OUT Total entries available.
  226. ULONG TotalBytesNeeded; // OUT Number of bytes needed for API
  227. ULONG ResumeHandle; // IN OUT Resume handle (Ignored)
  228. USHORT DomainNameLength; // IN Length of domain name.
  229. BOOLEAN ForceRescan; // IN Discard internal list and re-query.
  230. BOOLEAN UseBrowseList; // IN TRUE if use server list (not net)
  231. WCHAR DomainName[1]; // IN Name of domain to retreive domain for
  232. } GetBrowserServerList;
  233. // Begin Never Used (But don't delete it since it is largest branch of union)
  234. struct {
  235. LARGE_INTEGER TimeReceived; // Time request was received.
  236. LARGE_INTEGER TimeQueued; // Time request was queued.
  237. LARGE_INTEGER TimeQueuedToBrowserThread; // Time request was queued.
  238. ULONG RequestorNameLength; // Length of name requesting list
  239. ULONG Token; // Client token.
  240. USHORT RequestedCount; // Number of entries requested.
  241. WCHAR Name[1]; // IN Name of transport, OUT name of requestor
  242. } WaitForBrowserServerRequest;
  243. // End Never Used
  244. struct {
  245. ULONG MasterNameLength; // Length of name requesting list
  246. WCHAR Name[1]; // IN Name of transport, OUT name of master
  247. } WaitForMasterAnnouncement;
  248. struct {
  249. ULONG MasterNameLength; // OUT Length of master for domain
  250. WCHAR Name[1]; // IN Name of transport, OUT name of master
  251. } GetMasterName;
  252. struct {
  253. DGRECEIVER_NAME_TYPE DestinationNameType; // IN Name type of name to send.
  254. ULONG MailslotNameLength; // IN Length of mailslot name.
  255. // If 0, use default (\MAILSLOT\BROWSE)
  256. ULONG NameLength; // IN Destination name length.
  257. WCHAR Name[1]; // IN Name of destination
  258. } SendDatagram;
  259. struct {
  260. ULONG NewStatus;
  261. ULONG NumberOfServersInTable;
  262. BOOLEAN IsLanmanNt;
  263. #ifdef ENABLE_PSEUDO_BROWSER
  264. BOOLEAN PseudoServerLevel; // Warning: multi-level value. We're using
  265. // BOOLEAN size var due to back compatibility
  266. // w/ older structs. It shouldn't matter since
  267. // we're dealing w/ just very few levels.
  268. // Begin Never Used
  269. BOOLEAN NeverUsed1;
  270. BOOLEAN NeverUsed2;
  271. // End Never Used
  272. #else
  273. // Begin Never Used
  274. BOOLEAN NeverUsed1;
  275. BOOLEAN NeverUsed2;
  276. BOOLEAN NeverUsed3;
  277. // End Never Used
  278. #endif
  279. BOOLEAN MaintainServerList;
  280. } UpdateStatus;
  281. struct {
  282. UCHAR RoleModification;
  283. } ChangeRole;
  284. struct {
  285. DWORD DebugTraceBits; // IN New debug trace bits.
  286. BOOL OpenLog; // IN True if we should open log file
  287. BOOL CloseLog; // IN True if we should close log file
  288. BOOL TruncateLog; // IN True if we should truncate log
  289. WCHAR TraceFileName[1]; // IN If OpenLog, LogFileName (NT file)
  290. } Debug;
  291. struct {
  292. DWORD MaxMessageCount; // IN number of netlogon messages to queue
  293. } NetlogonMailslotEnable; // Use 0 to disable queuing
  294. struct {
  295. BOOL EnableTransport; // IN True if we should enable transport
  296. BOOL PreviouslyEnabled; // Returns if the transport was previously enabled
  297. } EnableDisableTransport;
  298. struct {
  299. BOOL ValidateOnly; // True if new name is to be validated
  300. ULONG DomainNameLength; // not including terminator
  301. WCHAR DomainName[1]; // New name of domain
  302. } DomainRename; // IN
  303. } Parameters;
  304. } LMDR_REQUEST_PACKET, *PLMDR_REQUEST_PACKET;
  305. //
  306. // Wow64: 32 bit compatibility (bug 454130)
  307. //
  308. typedef struct _LMDR_REQUEST_PACKET32 {
  309. IOCTL_LMDR_STRUCTURES Type; // Type of structure in Buffer 2
  310. ULONG Version; // Version of structure in Buffer 2
  311. ULONG Level; // Level of information or force level
  312. LUID LogonId; // User logon session identifier
  313. // 32 bit replace: UNICODE_STRING TransportName;
  314. UNICODE_STRING32 TransportName;
  315. // 32 bit replace: UNICODE_STRING EmulatedDomainName;
  316. UNICODE_STRING32 EmulatedDomainName;
  317. union {
  318. struct {
  319. ULONG NumberOfMailslotBuffers;
  320. ULONG NumberOfServerAnnounceBuffers;
  321. ULONG IllegalDatagramThreshold;
  322. ULONG EventLogResetFrequency;
  323. BOOLEAN LogElectionPackets;
  324. BOOLEAN IsLanManNt;
  325. } Start; // IN
  326. struct {
  327. DGRECEIVER_NAME_TYPE Type; // Type of name
  328. ULONG DgReceiverNameLength; // Length of datagram receiver name
  329. WCHAR Name[1]; // Null terminated datagram receiver name.
  330. } AddDelName;
  331. struct {
  332. ULONG EntriesRead; // OUT Number of entries returned
  333. ULONG TotalEntries; // OUT Total entries available.
  334. ULONG TotalBytesNeeded; // OUT Number of bytes needed for API
  335. ULONG ResumeHandle; // IN OUT Resume handle
  336. } EnumerateNames; // OUT Buffer2 is an array of DGRECEIVE
  337. struct {
  338. ULONG EntriesRead; // OUT Number of entries returned
  339. ULONG TotalEntries; // OUT Total entries available
  340. ULONG TotalBytesNeeded; // OUT Total bytes needed to read all
  341. // entries
  342. ULONG ResumeHandle; // IN OUT Resume handle
  343. ULONG ServerType; // IN Type of servers to enumerate
  344. // (defined in lmserver.h)
  345. ULONG DomainNameLength; // IN Length of domain name
  346. WCHAR DomainName[1]; // IN Name of domain to enumerate servers
  347. // from
  348. } EnumerateServers; // OUT Buffer2 contains array of
  349. // ServerInfo structures
  350. struct {
  351. ULONG EntriesRead; // OUT Number of entries returned
  352. ULONG TotalEntries; // OUT Total entries available
  353. ULONG TotalBytesNeeded; // OUT Total bytes needed to read all
  354. // entries
  355. ULONG ResumeHandle; // IN OUT Resume handle
  356. } EnumerateTransports; // OUT Buffer2 contains array of
  357. struct {
  358. ULONG TransportNameLength; // not including terminator
  359. WCHAR TransportName[1]; // Name of transport provider
  360. } Bind; // IN
  361. struct {
  362. ULONG TransportNameLength; // not including terminator
  363. WCHAR TransportName[1]; // Name of transport provider
  364. } Unbind; // IN
  365. struct {
  366. ULONG EntriesRead; // OUT Number of entries returned
  367. ULONG TotalEntries; // OUT Total entries available.
  368. ULONG TotalBytesNeeded; // OUT Number of bytes needed for API
  369. ULONG ResumeHandle; // IN OUT Resume handle (Ignored)
  370. USHORT DomainNameLength; // IN Length of domain name.
  371. BOOLEAN ForceRescan; // IN Discard internal list and re-query.
  372. BOOLEAN UseBrowseList; // IN TRUE if use server list (not net)
  373. WCHAR DomainName[1]; // IN Name of domain to retreive domain for
  374. } GetBrowserServerList;
  375. // Begin Never Used (But don't delete it since it is largest branch of union)
  376. struct {
  377. LARGE_INTEGER TimeReceived; // Time request was received.
  378. LARGE_INTEGER TimeQueued; // Time request was queued.
  379. LARGE_INTEGER TimeQueuedToBrowserThread; // Time request was queued.
  380. ULONG RequestorNameLength; // Length of name requesting list
  381. ULONG Token; // Client token.
  382. USHORT RequestedCount; // Number of entries requested.
  383. WCHAR Name[1]; // IN Name of transport, OUT name of requestor
  384. } WaitForBrowserServerRequest;
  385. // End Never Used
  386. struct {
  387. ULONG MasterNameLength; // Length of name requesting list
  388. WCHAR Name[1]; // IN Name of transport, OUT name of master
  389. } WaitForMasterAnnouncement;
  390. struct {
  391. ULONG MasterNameLength; // OUT Length of master for domain
  392. WCHAR Name[1]; // IN Name of transport, OUT name of master
  393. } GetMasterName;
  394. struct {
  395. DGRECEIVER_NAME_TYPE DestinationNameType; // IN Name type of name to send.
  396. ULONG MailslotNameLength; // IN Length of mailslot name.
  397. // If 0, use default (\MAILSLOT\BROWSE)
  398. ULONG NameLength; // IN Destination name length.
  399. WCHAR Name[1]; // IN Name of destination
  400. } SendDatagram;
  401. struct {
  402. ULONG NewStatus;
  403. ULONG NumberOfServersInTable;
  404. BOOLEAN IsLanmanNt;
  405. #ifdef ENABLE_PSEUDO_BROWSER
  406. BOOLEAN PseudoServerLevel; // Warning: multi-level value. We're using
  407. // BOOLEAN size var due to back compatibility
  408. // w/ older structs. It shouldn't matter since
  409. // we're dealing w/ just very few levels.
  410. // Begin Never Used
  411. BOOLEAN NeverUsed1;
  412. BOOLEAN NeverUsed2;
  413. // End Never Used
  414. #else
  415. // Begin Never Used
  416. BOOLEAN NeverUsed1;
  417. BOOLEAN NeverUsed2;
  418. BOOLEAN NeverUsed3;
  419. // End Never Used
  420. #endif
  421. BOOLEAN MaintainServerList;
  422. } UpdateStatus;
  423. struct {
  424. UCHAR RoleModification;
  425. } ChangeRole;
  426. struct {
  427. DWORD DebugTraceBits; // IN New debug trace bits.
  428. BOOL OpenLog; // IN True if we should open log file
  429. BOOL CloseLog; // IN True if we should close log file
  430. BOOL TruncateLog; // IN True if we should truncate log
  431. WCHAR TraceFileName[1]; // IN If OpenLog, LogFileName (NT file)
  432. } Debug;
  433. struct {
  434. DWORD MaxMessageCount; // IN number of netlogon messages to queue
  435. } NetlogonMailslotEnable; // Use 0 to disable queuing
  436. struct {
  437. BOOL EnableTransport; // IN True if we should enable transport
  438. BOOL PreviouslyEnabled; // Returns if the transport was previously enabled
  439. } EnableDisableTransport;
  440. struct {
  441. BOOL ValidateOnly; // True if new name is to be validated
  442. ULONG DomainNameLength; // not including terminator
  443. WCHAR DomainName[1]; // New name of domain
  444. } DomainRename; // IN
  445. } Parameters;
  446. } LMDR_REQUEST_PACKET32, *PLMDR_REQUEST_PACKET32;
  447. //
  448. // The NETLOGON_MAILSLOT structure describes a mailslot messages received by
  449. // the browser's IOCTL_LMDR_NETLOGON_MAILSLOT_READ
  450. //
  451. // A NETLOGON_MAILSLOT message is also returned to Netlogon when an
  452. // interesting PNP event occurs. In that case, the fields will be set as
  453. // follows:
  454. //
  455. // MailslotNameSize: 0 indicating this is a PNP event.
  456. // MailslotNameOffset: One of the NETLOGON_PNP_OPCODEs indicating the
  457. // event being notified.
  458. // TransportName*: Name of transport being affected.
  459. // DestinationName*: Name of the hosted domain being affected
  460. //
  461. typedef enum _NETLOGON_PNP_OPCODE {
  462. NlPnpMailslotMessage,
  463. NlPnpTransportBind,
  464. NlPnpTransportUnbind,
  465. NlPnpNewIpAddress,
  466. NlPnpDomainRename,
  467. NlPnpNewRole
  468. } NETLOGON_PNP_OPCODE, *PNETLOGON_PNP_OPCODE;
  469. typedef struct {
  470. LARGE_INTEGER TimeReceived;
  471. DWORD MailslotNameSize; // Unicode name of mailslot message was received on
  472. DWORD MailslotNameOffset;
  473. DWORD TransportNameSize; // Unicode name of transport message was received on
  474. DWORD TransportNameOffset;
  475. DWORD MailslotMessageSize;// Actual mailslot message
  476. DWORD MailslotMessageOffset;
  477. DWORD DestinationNameSize;// Unicode name of computer or domain message was received on
  478. DWORD DestinationNameOffset;
  479. DWORD ClientSockAddrSize; // IP Address (Sockaddr) (Network byte order) of the sender
  480. // 0: if not an IP transport
  481. DWORD ClientSockAddrOffset;
  482. } NETLOGON_MAILSLOT, *PNETLOGON_MAILSLOT;
  483. //
  484. // The DGRECEIVE structure describes the list of names that have been
  485. // added to the datagram browser.
  486. //
  487. typedef struct _DGRECEIVE_NAMES {
  488. UNICODE_STRING DGReceiverName;
  489. DGRECEIVER_NAME_TYPE Type;
  490. } DGRECEIVE_NAMES, *PDGRECEIVE_NAMES;
  491. typedef struct _LMDR_TRANSPORT_LIST {
  492. ULONG NextEntryOffset; // Offset of next entry (dword aligned)
  493. ULONG TransportNameLength;
  494. ULONG Flags; // Flags for transport
  495. WCHAR TransportName[1];
  496. } LMDR_TRANSPORT_LIST, *PLMDR_TRANSPORT_LIST;
  497. #define LMDR_TRANSPORT_WANNISH 0x00000001 // If set, Xport is wannish.
  498. #define LMDR_TRANSPORT_RAS 0x00000002 // If set, Xport is RAS.
  499. #define LMDR_TRANSPORT_IPX 0x00000004 // If set, Xport is direct host IPX.
  500. #define LMDR_TRANSPORT_PDC 0x00000008 // If set, Xport has <Domain>[1B] registered
  501. //
  502. // Browser statistics.
  503. //
  504. typedef struct _BOWSER_STATISTICS {
  505. LARGE_INTEGER StartTime;
  506. LARGE_INTEGER NumberOfServerAnnouncements;
  507. LARGE_INTEGER NumberOfDomainAnnouncements;
  508. ULONG NumberOfElectionPackets;
  509. ULONG NumberOfMailslotWrites;
  510. ULONG NumberOfGetBrowserServerListRequests;
  511. ULONG NumberOfMissedServerAnnouncements;
  512. ULONG NumberOfMissedMailslotDatagrams;
  513. ULONG NumberOfMissedGetBrowserServerListRequests;
  514. ULONG NumberOfFailedServerAnnounceAllocations;
  515. ULONG NumberOfFailedMailslotAllocations;
  516. ULONG NumberOfFailedMailslotReceives;
  517. ULONG NumberOfFailedMailslotWrites;
  518. ULONG NumberOfFailedMailslotOpens;
  519. ULONG NumberOfDuplicateMasterAnnouncements;
  520. LARGE_INTEGER NumberOfIllegalDatagrams;
  521. } BOWSER_STATISTICS, *PBOWSER_STATISTICS;
  522. #ifdef __cplusplus
  523. }
  524. #endif
  525. #endif // ifndef _NTDDBROW_