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.

302 lines
5.6 KiB

  1. /*++
  2. Copyright (c) 1987-1991 Microsoft Corporation
  3. Module Name:
  4. nlrepl.h
  5. Abstract:
  6. Prototypes of the database replication functions called either from
  7. LSA OR SAM.
  8. Author:
  9. Madan Appiah
  10. Environment:
  11. User mode only.
  12. Contains NT-specific code.
  13. Requires ANSI C extensions: slash-slash comments, long external names.
  14. Revision History:
  15. 14-Apr-1992 (madana)
  16. Created.
  17. --*/
  18. #ifndef _NLREPL_H_
  19. #define _NLREPL_H_
  20. //
  21. // Don't require the DS to include every .h in the world
  22. //
  23. #include <lmcons.h>
  24. #include <dsgetdc.h>
  25. #ifndef _AVOID_REPL_API
  26. NTSTATUS
  27. I_NetNotifyDelta (
  28. IN SECURITY_DB_TYPE DbType,
  29. IN LARGE_INTEGER ModificationCount,
  30. IN SECURITY_DB_DELTA_TYPE DeltaType,
  31. IN SECURITY_DB_OBJECT_TYPE ObjectType,
  32. IN ULONG ObjectRid,
  33. IN PSID ObjectSid,
  34. IN PUNICODE_STRING ObjectName,
  35. IN DWORD ReplicationImmediately,
  36. IN PSAM_DELTA_DATA DeltaData
  37. );
  38. NTSTATUS
  39. I_NetNotifyRole(
  40. IN POLICY_LSA_SERVER_ROLE Role
  41. );
  42. NTSTATUS
  43. I_NetNotifyMachineAccount (
  44. IN ULONG ObjectRid,
  45. IN PSID DomainSid,
  46. IN ULONG OldUserAccountControl,
  47. IN ULONG NewUserAccountControl,
  48. IN PUNICODE_STRING ObjectName
  49. );
  50. NTSTATUS
  51. I_NetNotifyTrustedDomain (
  52. IN PSID HostedDomainSid,
  53. IN PSID TrustedDomainSid,
  54. IN BOOLEAN IsDeletion
  55. );
  56. typedef enum {
  57. //
  58. // Indicates that a subnet object has been added, deleted, renamed, or
  59. // the site containing the subnet has changed.
  60. //
  61. NlSubnetObjectChanged,
  62. //
  63. // Indicates that a site object has been added, deleted or renamed.
  64. //
  65. NlSiteObjectChanged,
  66. //
  67. // Indicates that the site this DC is in has changed.
  68. //
  69. NlSiteChanged,
  70. //
  71. // Indicates that the org tree changed
  72. //
  73. NlOrgChanged,
  74. //
  75. // Indicate that the DC demotion is in progress
  76. //
  77. NlDcDemotionInProgress,
  78. //
  79. // Indicate that the DC demotion is completed
  80. //
  81. NlDcDemotionCompleted,
  82. //
  83. // Indicate that NDNC info has changed
  84. //
  85. NlNdncChanged,
  86. //
  87. // Indicate that DnsRootAlias has changed
  88. //
  89. NlDnsRootAliasChanged
  90. } NL_DS_CHANGE_TYPE, *PNL_DS_CHANGE_TYPE;
  91. NTSTATUS
  92. I_NetNotifyDsChange(
  93. IN NL_DS_CHANGE_TYPE DsChangeType
  94. );
  95. NTSTATUS
  96. I_NetLogonGetSerialNumber (
  97. IN SECURITY_DB_TYPE DbType,
  98. IN PSID DomainSid,
  99. OUT PLARGE_INTEGER SerialNumber
  100. );
  101. NTSTATUS
  102. I_NetLogonReadChangeLog(
  103. IN PVOID InContext,
  104. IN ULONG InContextSize,
  105. IN ULONG ChangeBufferSize,
  106. OUT PVOID *ChangeBuffer,
  107. OUT PULONG BytesRead,
  108. OUT PVOID *OutContext,
  109. OUT PULONG OutContextSize
  110. );
  111. NTSTATUS
  112. I_NetLogonNewChangeLog(
  113. OUT HANDLE *ChangeLogHandle
  114. );
  115. NTSTATUS
  116. I_NetLogonAppendChangeLog(
  117. IN HANDLE ChangeLogHandle,
  118. IN PVOID ChangeBuffer,
  119. IN ULONG ChangeBufferSize
  120. );
  121. NTSTATUS
  122. I_NetLogonCloseChangeLog(
  123. IN HANDLE ChangeLogHandle,
  124. IN BOOLEAN Commit
  125. );
  126. NTSTATUS
  127. I_NetLogonSendToSamOnPdc(
  128. IN LPWSTR DomainName,
  129. IN LPBYTE OpaqueBuffer,
  130. IN ULONG OpaqueBufferSize
  131. );
  132. #endif // _AVOID_REPL_API
  133. NET_API_STATUS
  134. I_DsGetDcCache(
  135. IN LPCWSTR NetbiosDomainName OPTIONAL,
  136. IN LPCWSTR DnsDomainName OPTIONAL,
  137. OUT PBOOLEAN InNt4Domain,
  138. OUT LPDWORD InNt4DomainTime
  139. );
  140. NET_API_STATUS
  141. DsrGetDcName(
  142. IN LPWSTR ComputerName OPTIONAL,
  143. IN LPWSTR DomainName OPTIONAL,
  144. IN GUID *DomainGuid OPTIONAL,
  145. IN GUID *SiteGuid OPTIONAL,
  146. IN ULONG Flags,
  147. OUT PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo
  148. );
  149. NET_API_STATUS
  150. DsrGetDcNameEx2(
  151. IN LPWSTR ComputerName OPTIONAL,
  152. IN LPWSTR AccountName OPTIONAL,
  153. IN ULONG AllowableAccountControlBits,
  154. IN LPWSTR DomainName OPTIONAL,
  155. IN GUID *DomainGuid OPTIONAL,
  156. IN LPWSTR SiteName OPTIONAL,
  157. IN ULONG Flags,
  158. OUT PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo
  159. );
  160. NTSTATUS
  161. I_NetLogonSetServiceBits(
  162. IN DWORD ServiceBitsOfInterest,
  163. IN DWORD ServiceBits
  164. );
  165. NTSTATUS
  166. I_NetLogonLdapLookup(
  167. IN PVOID Filter,
  168. OUT PVOID *Response,
  169. OUT PULONG ResponseSize
  170. );
  171. NTSTATUS
  172. I_NetLogonLdapLookupEx(
  173. IN PVOID Filter,
  174. IN PVOID SockAddr,
  175. OUT PVOID *Response,
  176. OUT PULONG ResponseSize
  177. );
  178. NET_API_STATUS
  179. I_NetLogonGetIpAddresses(
  180. OUT PULONG IpAddressCount,
  181. OUT LPBYTE *IpAddresses
  182. );
  183. NTSTATUS
  184. I_NetLogonGetDirectDomain(
  185. IN LPWSTR HostedDomainName,
  186. IN LPWSTR TrustedDomainName,
  187. OUT LPWSTR *DirectDomainName
  188. );
  189. //
  190. // OS verion number from I_NetLogonGetAuthDataEx
  191. //
  192. typedef enum _NL_OS_VERSION {
  193. NlNt35_or_older = 1,
  194. NlNt351,
  195. NlNt40,
  196. NlWin2000, // NT 5.0
  197. NlWhistler // NT 5.1
  198. } NL_OS_VERSION, *PNL_OS_VERSION;
  199. //
  200. // Flags to I_NetLogonGetAuthDataEx
  201. //
  202. #define NL_DIRECT_TRUST_REQUIRED 0x01
  203. #define NL_RETURN_CLOSEST_HOP 0x02
  204. #define NL_ROLE_PRIMARY_OK 0x04
  205. #define NL_REQUIRE_DOMAIN_IN_FOREST 0x08
  206. NTSTATUS
  207. I_NetLogonGetAuthDataEx(
  208. IN LPWSTR HostedDomainName,
  209. IN LPWSTR TrustedDomainName,
  210. IN BOOLEAN ResetChannel,
  211. IN ULONG Flags,
  212. OUT LPWSTR *ServerName,
  213. OUT PNL_OS_VERSION ServerOsVersion,
  214. OUT LPWSTR *ServerPrincipleName,
  215. OUT PVOID *ClientContext OPTIONAL,
  216. OUT PULONG AuthnLevel
  217. );
  218. NTSTATUS
  219. I_NetNotifyNtdsDsaDeletion (
  220. IN LPWSTR DnsDomainName OPTIONAL,
  221. IN GUID *DomainGuid OPTIONAL,
  222. IN GUID *DsaGuid,
  223. IN LPWSTR DnsHostName
  224. );
  225. VOID
  226. I_NetLogonFree(
  227. IN PVOID Buffer
  228. );
  229. NTSTATUS
  230. I_NetLogonMixedDomain(
  231. OUT PBOOL MixedMode
  232. );
  233. #ifdef _WINSOCK2API_
  234. NET_API_STATUS
  235. I_NetLogonAddressToSiteName(
  236. IN PSOCKET_ADDRESS SocketAddress,
  237. OUT LPWSTR *SiteName
  238. );
  239. #endif
  240. #endif // _NLREPL_H_