Leaked source code of windows server 2003
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.

162 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. nlsite.h
  5. Abstract:
  6. Header for routines to handle sites and subnets.
  7. Author:
  8. Cliff Van Dyke (CliffV) 1-May-1997
  9. Revision History:
  10. --*/
  11. //
  12. // Structure defining a site name.
  13. //
  14. // The SiteEntry exists only if it is referenced.
  15. // Site coverage lists each should maintain a reference
  16. // to prevent the entry for a close site from being deleted.
  17. //
  18. typedef struct _NL_SITE_ENTRY {
  19. //
  20. // Link for NlGlobalSiteList
  21. //
  22. LIST_ENTRY Next;
  23. //
  24. // Reference Count.
  25. //
  26. ULONG ReferenceCount;
  27. //
  28. // Name of the site
  29. // Must be last field in struct.
  30. //
  31. UNICODE_STRING SiteNameString;
  32. WCHAR SiteName[ANYSIZE_ARRAY];
  33. } NL_SITE_ENTRY, *PNL_SITE_ENTRY;
  34. //
  35. // Structure defining a covered site.
  36. //
  37. typedef struct _NL_COVERED_SITE {
  38. //
  39. // Pointer to the covered site entry in
  40. // the global list of sites. This entry is
  41. // referenced.
  42. //
  43. PNL_SITE_ENTRY CoveredSite;
  44. BOOLEAN CoveredAuto; // If TRUE, this site is covered automatically
  45. } NL_COVERED_SITE, *PNL_COVERED_SITE;
  46. //
  47. // Procedure Forwards for nlsite.c
  48. //
  49. NET_API_STATUS
  50. NlSiteInitialize(
  51. VOID
  52. );
  53. VOID
  54. NlSiteTerminate(
  55. VOID
  56. );
  57. VOID
  58. NlDerefSiteEntry(
  59. IN PNL_SITE_ENTRY SiteEntry
  60. );
  61. PNL_SITE_ENTRY
  62. NlFindSiteEntry(
  63. IN LPWSTR SiteName
  64. );
  65. PNL_SITE_ENTRY
  66. NlFindSiteEntryBySockAddr(
  67. IN PSOCKADDR SockAddr
  68. );
  69. NET_API_STATUS
  70. NlSitesAddSubnet(
  71. IN LPWSTR SiteName,
  72. IN LPWSTR SubnetName
  73. );
  74. NET_API_STATUS
  75. NlSitesAddSubnetFromDs(
  76. OUT PBOOLEAN SiteNameChanged OPTIONAL
  77. );
  78. VOID
  79. NlSitesEndSubnetEnum(
  80. VOID
  81. );
  82. BOOL
  83. NlCaptureSiteName(
  84. WCHAR CapturedSiteName[NL_MAX_DNS_LABEL_LENGTH+1]
  85. );
  86. NET_API_STATUS
  87. NlSetSiteName(
  88. IN LPWSTR SiteName OPTIONAL,
  89. OUT PBOOLEAN SiteNameChanged OPTIONAL
  90. );
  91. BOOL
  92. NlSitesSetSiteCoverageParam(
  93. IN ULONG ServerRole,
  94. IN LPTSTR_ARRAY NewSiteCoverage OPTIONAL
  95. );
  96. NET_API_STATUS
  97. NlSitesGetCloseSites(
  98. IN PDOMAIN_INFO DomainInfo,
  99. IN ULONG ServerRole,
  100. OUT PNL_SITE_NAME_ARRAY *SiteNames
  101. );
  102. NET_API_STATUS
  103. NlSitesUpdateSiteCoverageForRole(
  104. IN PDOMAIN_INFO DomainInfo,
  105. IN ULONG DomFlags,
  106. IN HANDLE DsHandle,
  107. IN PISM_CONNECTIVITY SiteConnect,
  108. IN LPWSTR ThisSiteName,
  109. IN ULONG ThisSiteIndex,
  110. OUT PBOOLEAN SiteCoverageChanged OPTIONAL
  111. );
  112. NTSTATUS
  113. NlLoadNtDsApiDll(
  114. VOID
  115. );
  116. BOOL
  117. NlSitesGetIsmConnect(
  118. IN LPWSTR SiteName,
  119. OUT PISM_CONNECTIVITY *SiteConnect,
  120. OUT PULONG ThisSite
  121. );