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.

326 lines
9.9 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. NETDFS.IDL
  5. Abstract:
  6. Contains the Netr (Net Remote) RPC interface specification for the
  7. API associated with the Dfs Manager Service. This includes the following
  8. APIs:
  9. NetDfsEnum
  10. Also contains the RPC specific data structures for these API.
  11. Author:
  12. Milan Shah (milans) 08-Jan-1996
  13. Environment:
  14. User Mode - Win32 - MIDL
  15. Revision History:
  16. 08-Jan-1996 Milans Created.
  17. --*/
  18. //
  19. // Interface Attributes
  20. //
  21. [
  22. uuid(4fc742e0-4a10-11cf-8273-00aa004ae673),
  23. version(3.0),
  24. #ifdef __midl
  25. ms_union,
  26. #endif // __midl
  27. pointer_default(unique)
  28. ]
  29. interface netdfs
  30. {
  31. import "import.idl";
  32. #include <lmcons.h>
  33. //
  34. // Data structures used by the public Dfs interface
  35. //
  36. typedef struct _DFS_INFO_1_CONTAINER {
  37. DWORD EntriesRead;
  38. [size_is(EntriesRead)] LPDFS_INFO_1 Buffer;
  39. } DFS_INFO_1_CONTAINER, *LPDFS_INFO_1_CONTAINER;
  40. typedef struct _DFS_INFO_2_CONTAINER {
  41. DWORD EntriesRead;
  42. [size_is(EntriesRead)] LPDFS_INFO_2 Buffer;
  43. } DFS_INFO_2_CONTAINER, *LPDFS_INFO_2_CONTAINER;
  44. typedef struct _DFS_INFO_3_CONTAINER {
  45. DWORD EntriesRead;
  46. [size_is(EntriesRead)] LPDFS_INFO_3 Buffer;
  47. } DFS_INFO_3_CONTAINER, *LPDFS_INFO_3_CONTAINER;
  48. typedef struct _DFS_INFO_4_CONTAINER {
  49. DWORD EntriesRead;
  50. [size_is(EntriesRead)] LPDFS_INFO_4 Buffer;
  51. } DFS_INFO_4_CONTAINER, *LPDFS_INFO_4_CONTAINER;
  52. typedef struct _DFS_INFO_200_CONTAINER {
  53. DWORD EntriesRead;
  54. [size_is(EntriesRead)] LPDFS_INFO_200 Buffer;
  55. } DFS_INFO_200_CONTAINER, *LPDFS_INFO_200_CONTAINER;
  56. typedef struct _DFS_INFO_300_CONTAINER {
  57. DWORD EntriesRead;
  58. [size_is(EntriesRead)] LPDFS_INFO_300 Buffer;
  59. } DFS_INFO_300_CONTAINER, *LPDFS_INFO_300_CONTAINER;
  60. typedef struct _DFS_INFO_ENUM_STRUCT {
  61. DWORD Level;
  62. [switch_is(Level)] union {
  63. [case(1)]
  64. LPDFS_INFO_1_CONTAINER DfsInfo1Container;
  65. [case(2)]
  66. LPDFS_INFO_2_CONTAINER DfsInfo2Container;
  67. [case(3)]
  68. LPDFS_INFO_3_CONTAINER DfsInfo3Container;
  69. [case(4)]
  70. LPDFS_INFO_4_CONTAINER DfsInfo4Container;
  71. [case(200)]
  72. LPDFS_INFO_200_CONTAINER DfsInfo200Container;
  73. [case(300)]
  74. LPDFS_INFO_300_CONTAINER DfsInfo300Container;
  75. } DfsInfoContainer;
  76. } DFS_INFO_ENUM_STRUCT, *LPDFS_INFO_ENUM_STRUCT;
  77. typedef [switch_type(unsigned long)] union _DFS_INFO_STRUCT {
  78. [case(1)]
  79. LPDFS_INFO_1 DfsInfo1;
  80. [case(2)]
  81. LPDFS_INFO_2 DfsInfo2;
  82. [case(3)]
  83. LPDFS_INFO_3 DfsInfo3;
  84. [case(4)]
  85. LPDFS_INFO_4 DfsInfo4;
  86. [case(100)]
  87. LPDFS_INFO_100 DfsInfo100;
  88. [case(101)]
  89. LPDFS_INFO_101 DfsInfo101;
  90. [case(102)]
  91. LPDFS_INFO_102 DfsInfo102;
  92. [default]
  93. ;
  94. } DFS_INFO_STRUCT, *LPDFS_INFO_STRUCT;
  95. //
  96. // Data structures are used by the private Dfs Manager interface
  97. //
  98. typedef struct _DFSM_ENTRY_ID {
  99. GUID idSubordinate;
  100. [string, unique] LPWSTR wszSubordinate;
  101. } DFSM_ENTRY_ID, *LPDFSM_ENTRY_ID;
  102. typedef struct _DFSM_RELATION_INFO {
  103. DWORD cSubordinates;
  104. [size_is(cSubordinates)] DFSM_ENTRY_ID eid[];
  105. } DFSM_RELATION_INFO, *LPDFSM_RELATION_INFO;
  106. typedef struct _DFSM_ROOT_LIST_ENTRY {
  107. [string, unique] LPWSTR ServerShare;
  108. } DFSM_ROOT_LIST_ENTRY, *PDFSM_ROOT_LIST_ENTRY, *LPDFSM_ROOT_LIST_ENTRY;
  109. typedef struct _DFSM_ROOT_LIST {
  110. DWORD cEntries;
  111. [size_is(cEntries)] DFSM_ROOT_LIST_ENTRY Entry[];
  112. } DFSM_ROOT_LIST, *PDFSM_ROOT_LIST, *LPDFSM_ROOT_LIST;
  113. //
  114. // The public Dfs interface methods
  115. //
  116. DWORD NetrDfsManagerGetVersion();
  117. NET_API_STATUS NetrDfsAdd(
  118. [in,string] LPWSTR DfsEntryPath,
  119. [in,string] LPWSTR ServerName,
  120. [in,unique,string] LPWSTR ShareName,
  121. [in,unique,string] LPWSTR Comment,
  122. [in] DWORD Flags);
  123. NET_API_STATUS NetrDfsRemove(
  124. [in,string] LPWSTR DfsEntryPath,
  125. [in,unique,string] LPWSTR ServerName,
  126. [in,unique,string] LPWSTR ShareName);
  127. NET_API_STATUS NetrDfsSetInfo(
  128. [in,string] LPWSTR DfsEntryPath,
  129. [in,unique,string] LPWSTR ServerName,
  130. [in,unique,string] LPWSTR ShareName,
  131. [in] DWORD Level,
  132. [in,switch_is(Level)] LPDFS_INFO_STRUCT DfsInfo);
  133. NET_API_STATUS NetrDfsGetInfo(
  134. [in,string] LPWSTR DfsEntryPath,
  135. [in,unique,string] LPWSTR ServerName,
  136. [in,unique,string] LPWSTR ShareName,
  137. [in] DWORD Level,
  138. [out,switch_is(Level)] LPDFS_INFO_STRUCT DfsInfo);
  139. NET_API_STATUS NetrDfsEnum(
  140. [in] DWORD Level,
  141. [in] DWORD PrefMaxLen,
  142. [in,out,unique] LPDFS_INFO_ENUM_STRUCT DfsEnum,
  143. [in,out,unique] LPDWORD ResumeHandle);
  144. NET_API_STATUS NetrDfsMove(
  145. [in,string] LPWSTR DfsEntryPath,
  146. [in,string] LPWSTR NewDfsEntryPath);
  147. NET_API_STATUS NetrDfsRename(
  148. [in,string] LPWSTR Path,
  149. [in,string] LPWSTR NewPath);
  150. //
  151. // The private Dfs Manager methods
  152. //
  153. NET_API_STATUS NetrDfsManagerGetConfigInfo(
  154. [in, string] LPWSTR wszServer,
  155. [in, string] LPWSTR wszLocalVolumeEntryPath,
  156. [in] GUID idLocalVolume,
  157. [in, out, unique] LPDFSM_RELATION_INFO *ppRelationInfo);
  158. NET_API_STATUS NetrDfsManagerSendSiteInfo(
  159. [in, string] LPWSTR wszServer,
  160. [in] LPDFS_SITELIST_INFO pSiteInfo);
  161. //
  162. // Remote setup/teardown apis
  163. //
  164. NET_API_STATUS NetrDfsAddFtRoot(
  165. [in,string] LPWSTR ServerName,
  166. [in,string] LPWSTR DcName,
  167. [in,string] LPWSTR RootShare,
  168. [in,string] LPWSTR FtDfsName,
  169. [in,string] LPWSTR Comment,
  170. [in,string] LPWSTR ConfigDN,
  171. [in] BOOLEAN NewFtDfs,
  172. [in] DWORD Flags,
  173. [in,out,unique] PDFSM_ROOT_LIST *ppRootList);
  174. NET_API_STATUS NetrDfsRemoveFtRoot(
  175. [in,string] LPWSTR ServerName,
  176. [in,string] LPWSTR DcName,
  177. [in,string] LPWSTR RootShare,
  178. [in,string] LPWSTR FtDfsName,
  179. [in] DWORD Flags,
  180. [in,out,unique] PDFSM_ROOT_LIST *ppRootList);
  181. NET_API_STATUS NetrDfsAddStdRoot(
  182. [in,string] LPWSTR ServerName,
  183. [in,string] LPWSTR RootShare,
  184. [in,string] LPWSTR Comment,
  185. [in] DWORD Flags);
  186. NET_API_STATUS NetrDfsRemoveStdRoot(
  187. [in,string] LPWSTR ServerName,
  188. [in,string] LPWSTR RootShare,
  189. [in] DWORD Flags);
  190. // Reinitialize the Dfs Manager
  191. //
  192. NET_API_STATUS NetrDfsManagerInitialize(
  193. [in,string] LPWSTR ServerName,
  194. [in] DWORD Flags);
  195. //
  196. // Create a root with the share offline
  197. //
  198. NET_API_STATUS NetrDfsAddStdRootForced(
  199. [in,string] LPWSTR ServerName,
  200. [in,string] LPWSTR RootShare,
  201. [in,string] LPWSTR Comment,
  202. [in,string] LPWSTR Share);
  203. //
  204. // Api's for setting up an FtDfs root
  205. //
  206. NET_API_STATUS NetrDfsGetDcAddress(
  207. [in,string] LPWSTR ServerName,
  208. [in,out,string] LPWSTR *DcName,
  209. [in,out] BOOLEAN *IsRoot,
  210. [in,out] ULONG *Timeout);
  211. //
  212. // Api to direct an FtDfs root server to a specific DC
  213. //
  214. NET_API_STATUS NetrDfsSetDcAddress(
  215. [in,string] LPWSTR ServerName,
  216. [in,string] LPWSTR DcName,
  217. [in] DWORD Timeout,
  218. [in] DWORD Flags);
  219. //
  220. // Api to tell a DC to flush an FtDfs entry from its cache
  221. //
  222. NET_API_STATUS NetrDfsFlushFtTable(
  223. [in,string] LPWSTR DcName,
  224. [in,string] LPWSTR wszFtDfsName);
  225. //
  226. // New apis to work with Ft roots
  227. //
  228. NET_API_STATUS NetrDfsAdd2(
  229. [in,string] LPWSTR DfsEntryPath,
  230. [in,string] LPWSTR DcName,
  231. [in,string] LPWSTR ServerName,
  232. [in,unique,string] LPWSTR ShareName,
  233. [in,unique,string] LPWSTR Comment,
  234. [in] DWORD Flags,
  235. [in,out,unique] PDFSM_ROOT_LIST *ppRootList);
  236. NET_API_STATUS NetrDfsRemove2(
  237. [in,string] LPWSTR DfsEntryPath,
  238. [in,string] LPWSTR DcName,
  239. [in,unique,string] LPWSTR ServerName,
  240. [in,unique,string] LPWSTR ShareName,
  241. [in,out,unique] PDFSM_ROOT_LIST *ppRootList);
  242. NET_API_STATUS NetrDfsEnumEx(
  243. [in,string] LPWSTR DfsEntryPath,
  244. [in] DWORD Level,
  245. [in] DWORD PrefMaxLen,
  246. [in,out,unique] LPDFS_INFO_ENUM_STRUCT DfsEnum,
  247. [in,out,unique] LPDWORD ResumeHandle);
  248. NET_API_STATUS NetrDfsSetInfo2(
  249. [in,string] LPWSTR DfsEntryPath,
  250. [in,string] LPWSTR DcName,
  251. [in,unique,string] LPWSTR ServerName,
  252. [in,unique,string] LPWSTR ShareName,
  253. [in] DWORD Level,
  254. [in,switch_is(Level)] LPDFS_INFO_STRUCT pDfsInfo,
  255. [in,out,unique] PDFSM_ROOT_LIST *ppRootList);
  256. }