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.

113 lines
2.5 KiB

  1. #ifndef __DFS_REFERRAL_H__
  2. #define __DFS_REFERRAL_H__
  3. #include "DfsGeneric.hxx"
  4. #include "DfsReferralData.h"
  5. #include "DfsStore.hxx"
  6. #include "DfsRootFolder.hxx"
  7. #include "DfsFolderReferralData.hxx"
  8. typedef struct _REPLICA_COST_INFORMATION_
  9. {
  10. ULONG ReplicaCost;
  11. DfsReplica * pReplica;
  12. }REPLICA_COST_INFORMATION, *PREPLICA_COST_INFORMATION;
  13. typedef struct _REFERRAL_INFORMATION
  14. {
  15. ULONG NumberOfReplicas;
  16. ULONG TotalReplicaStringLength;
  17. PUNICODE_STRING pUseTargetServer;
  18. PUNICODE_STRING pUseTargetFolder;
  19. REPLICA_COST_INFORMATION ReplicaCosts[1];
  20. } REFERRAL_INFORMATION, *PREFERRAL_INFORMATION;
  21. DFSSTATUS
  22. DfsGetRootFolder(
  23. PUNICODE_STRING pNameContext,
  24. PUNICODE_STRING pShareName,
  25. DfsRootFolder **ppRoot );
  26. DFSSTATUS
  27. DfsGetRootFolder(
  28. PUNICODE_STRING pNameContext,
  29. PUNICODE_STRING pShareName,
  30. PUNICODE_STRING pRemains,
  31. DfsRootFolder **ppRoot );
  32. DFSSTATUS
  33. DfsGetOnlyRootFolder(
  34. DfsRootFolder **ppRoot );
  35. DFSSTATUS
  36. DfsLookupFolder(
  37. PUNICODE_STRING pName,
  38. PUNICODE_STRING pRemainingName,
  39. DfsFolder **ppFolder );
  40. DFSSTATUS
  41. DfsGetReferralData(
  42. PUNICODE_STRING pName,
  43. PUNICODE_STRING pRemainingName,
  44. DfsFolderReferralData **ppReferralData,
  45. PBOOLEAN pCachehit );
  46. DFSSTATUS
  47. DfsGenerateReplicaCosts(
  48. DfsFolderReferralData *pReferralData,
  49. REPLICA_COST_INFORMATION **ppReplicaCosts,
  50. ULONG NumReplicasToReturn,
  51. LPWSTR SiteName);
  52. VOID
  53. DfsSortReplicas(
  54. REPLICA_COST_INFORMATION * pReplicaCosts,
  55. ULONG NumReplicas);
  56. ULONG
  57. DfsCalculateReplicaStringLength(
  58. DfsReferralData *pReferralData,
  59. PUNICODE_STRING pUseFolder,
  60. ULONG NumReplicasToReturn);
  61. DFSSTATUS
  62. DfsExtractReferralData(
  63. DfsReferralData *pReferralData,
  64. DWORD NumReplicasToReturn,
  65. ULONG CostLimit,
  66. PUNICODE_STRING Name,
  67. PUNICODE_STRING pUseFolder,
  68. REPLICA_COST_INFORMATION * pReplicaCosts,
  69. REFERRAL_HEADER ** ppReferralHeader);
  70. DFSSTATUS
  71. DfsGenerateReferral(
  72. LPWSTR LinkName,
  73. DfsSite *pSite,
  74. DWORD NumReplicasToReturn,
  75. ULONG CostLimit,
  76. REFERRAL_HEADER ** ppReferralHeader);
  77. VOID
  78. DfsReleaseReferral(
  79. REFERRAL_HEADER *pReferralHeader);
  80. void DfshuffleGroup(
  81. REPLICA_COST_INFORMATION * pReplicaCosts,
  82. ULONG nStart,
  83. ULONG nEnd);
  84. DFSSTATUS
  85. DfsGenerateCompatReferral(
  86. LPWSTR LinkName,
  87. DfsSite *pReferralSite,
  88. REFERRAL_HEADER ** ppReferralHeader);
  89. #endif //__DFS_REFERRAL_H__