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.

134 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1996-1997 Microsoft Corporation
  3. Module Name:
  4. nldns.h
  5. Abstract:
  6. Header for routines to register DNS names.
  7. Author:
  8. Cliff Van Dyke (CliffV) 28-May-1996
  9. Revision History:
  10. --*/
  11. //
  12. // Log file of all names registered in DNS
  13. //
  14. #define NL_DNS_LOG_FILE L"\\system32\\config\\netlogon.dns"
  15. #define NL_DNS_BINARY_LOG_FILE L"\\system32\\config\\netlogon.dnb"
  16. // NL_MAX_DNS_LENGTH for each DNS name plus some slop
  17. #define NL_DNS_RECORD_STRING_SIZE (NL_MAX_DNS_LENGTH*3+30 + 1)
  18. #define NL_DNS_A_RR_VALUE_1 " IN A "
  19. #define NL_DNS_CNAME_RR_VALUE_1 " IN CNAME "
  20. #define NL_DNS_SRV_RR_VALUE_1 " IN SRV "
  21. #define NL_DNS_RR_EOL "\r\n"
  22. //
  23. // Registry key where private data is stored across boots
  24. //
  25. // (This key does NOT have a change notify registered.)
  26. //
  27. #define NL_PRIVATE_KEY "SYSTEM\\CurrentControlSet\\Services\\Netlogon\\Private"
  28. //
  29. // Procedure Forwards for dns.c
  30. //
  31. HKEY
  32. NlOpenNetlogonKey(
  33. LPSTR KeyName
  34. );
  35. NET_API_STATUS
  36. NlGetConfiguredDnsDomainName(
  37. OUT LPWSTR *DnsDomainName
  38. );
  39. NET_API_STATUS
  40. NlDnsInitialize(
  41. VOID
  42. );
  43. VOID
  44. NlDnsScavenge(
  45. IN LPVOID ScavengerParam
  46. );
  47. VOID
  48. NlDnsPnp(
  49. BOOL TransportChanged
  50. );
  51. BOOLEAN
  52. NlDnsHasDnsServers(
  53. VOID
  54. );
  55. NTSTATUS
  56. NlDnsNtdsDsaDeletion (
  57. IN LPWSTR DnsDomainName,
  58. IN GUID *DomainGuid,
  59. IN GUID *DsaGuid,
  60. IN LPWSTR DnsHostName
  61. );
  62. BOOL
  63. NlDnsCheckLastStatus(
  64. VOID
  65. );
  66. //
  67. // Flags for NlDnsRegisterDomain(OnPnp)
  68. //
  69. #define NL_DNSPNP_SITECOV_CHANGE_ONLY 0x01 // Register only if site coverage changes
  70. #define NL_DNSPNP_FORCE_REREGISTER 0x02 // Force re-registration of all previously registered records
  71. NET_API_STATUS
  72. NlDnsRegisterDomain(
  73. IN PDOMAIN_INFO DomainInfo,
  74. IN ULONG Flags
  75. );
  76. NET_API_STATUS
  77. NlDnsRegisterDomainOnPnp(
  78. IN PDOMAIN_INFO DomainInfo,
  79. IN PULONG Flags
  80. );
  81. VOID
  82. NlDnsShutdown(
  83. VOID
  84. );
  85. NET_API_STATUS
  86. NlSetDnsForestName(
  87. PUNICODE_STRING DnsForestName OPTIONAL,
  88. PBOOLEAN DnsForestNameChanged OPTIONAL
  89. );
  90. VOID
  91. NlCaptureDnsForestName(
  92. OUT WCHAR DnsForestName[NL_MAX_DNS_LENGTH+1]
  93. );
  94. BOOL
  95. NlDnsSetAvoidRegisterNameParam(
  96. IN LPTSTR_ARRAY NewDnsAvoidRegisterRecords
  97. );
  98. BOOL
  99. NetpEqualTStrArrays(
  100. LPTSTR_ARRAY TStrArray1 OPTIONAL,
  101. LPTSTR_ARRAY TStrArray2 OPTIONAL
  102. );