| 1 | /*
|
|---|
| 2 | dfs interface definition
|
|---|
| 3 | */
|
|---|
| 4 |
|
|---|
| 5 | import "misc.idl";
|
|---|
| 6 |
|
|---|
| 7 | [ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"),
|
|---|
| 8 | version(3.0),
|
|---|
| 9 | pointer_default(unique),
|
|---|
| 10 | helpstring("Settings for Microsoft Distributed File System"),
|
|---|
| 11 | endpoint("ncacn_np:[\\pipe\\netdfs]", "ncacn_ip_tcp:", "ncalrpc:")
|
|---|
| 12 | ] interface netdfs
|
|---|
| 13 | {
|
|---|
| 14 | /******************/
|
|---|
| 15 | /* Function: 0x00 */
|
|---|
| 16 | typedef [v1_enum] enum {
|
|---|
| 17 | DFS_MANAGER_VERSION_NT4 = 1,
|
|---|
| 18 | DFS_MANAGER_VERSION_W2K = 2,
|
|---|
| 19 | DFS_MANAGER_VERSION_W2K3 = 4,
|
|---|
| 20 | DFS_MANAGER_VERSION_W2K8 = 6
|
|---|
| 21 | } dfs_ManagerVersion;
|
|---|
| 22 |
|
|---|
| 23 | [public] void dfs_GetManagerVersion(
|
|---|
| 24 | [out] dfs_ManagerVersion *version
|
|---|
| 25 | );
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | /******************/
|
|---|
| 29 | /* Function: 0x01 */
|
|---|
| 30 | WERROR dfs_Add (
|
|---|
| 31 | [in] [string,charset(UTF16)] uint16 *path,
|
|---|
| 32 | [in] [string,charset(UTF16)] uint16 *server,
|
|---|
| 33 | [in,unique] [string,charset(UTF16)] uint16 *share,
|
|---|
| 34 | [in,unique] [string,charset(UTF16)] uint16 *comment,
|
|---|
| 35 | [in] uint32 flags
|
|---|
| 36 | );
|
|---|
| 37 |
|
|---|
| 38 | /******************/
|
|---|
| 39 | /* Function: 0x02 */
|
|---|
| 40 | WERROR dfs_Remove (
|
|---|
| 41 | [in] [string,charset(UTF16)] uint16 *dfs_entry_path,
|
|---|
| 42 | [in,unique] [string,charset(UTF16)] uint16 *servername,
|
|---|
| 43 | [in,unique] [string,charset(UTF16)] uint16 *sharename
|
|---|
| 44 | );
|
|---|
| 45 |
|
|---|
| 46 | /******************/
|
|---|
| 47 | /* Function: 0x03 */
|
|---|
| 48 |
|
|---|
| 49 | typedef struct {
|
|---|
| 50 | } dfs_Info0;
|
|---|
| 51 |
|
|---|
| 52 | typedef struct {
|
|---|
| 53 | [string,charset(UTF16)] uint16 *path;
|
|---|
| 54 | } dfs_Info1;
|
|---|
| 55 |
|
|---|
| 56 | typedef [public,bitmap32bit] bitmap {
|
|---|
| 57 | DFS_VOLUME_STATE_OK = 0x1,
|
|---|
| 58 | DFS_VOLUME_STATE_INCONSISTENT = 0x2,
|
|---|
| 59 | DFS_VOLUME_STATE_OFFLINE = 0x3,
|
|---|
| 60 | DFS_VOLUME_STATE_ONLINE = 0x4,
|
|---|
| 61 | DFS_VOLUME_STATE_STANDALONE = DFS_VOLUME_FLAVOR_STANDALONE,
|
|---|
| 62 | DFS_VOLUME_STATE_AD_BLOB = DFS_VOLUME_FLAVOR_AD_BLOB
|
|---|
| 63 | } dfs_VolumeState;
|
|---|
| 64 |
|
|---|
| 65 | typedef struct {
|
|---|
| 66 | [string,charset(UTF16)] uint16 *path;
|
|---|
| 67 | [string,charset(UTF16)] uint16 *comment;
|
|---|
| 68 | dfs_VolumeState state;
|
|---|
| 69 | uint32 num_stores;
|
|---|
| 70 | } dfs_Info2;
|
|---|
| 71 |
|
|---|
| 72 | const int DFS_STORAGE_STATES = 0xf;
|
|---|
| 73 |
|
|---|
| 74 | /* yes, this is a bitmap */
|
|---|
| 75 | typedef [public,bitmap32bit] bitmap {
|
|---|
| 76 | DFS_STORAGE_STATE_OFFLINE = 1,
|
|---|
| 77 | DFS_STORAGE_STATE_ONLINE = 2,
|
|---|
| 78 | DFS_STORAGE_STATE_ACTIVE = 4
|
|---|
| 79 | } dfs_StorageState;
|
|---|
| 80 |
|
|---|
| 81 | typedef struct {
|
|---|
| 82 | dfs_StorageState state;
|
|---|
| 83 | [string,charset(UTF16)] uint16 *server;
|
|---|
| 84 | [string,charset(UTF16)] uint16 *share;
|
|---|
| 85 | } dfs_StorageInfo;
|
|---|
| 86 |
|
|---|
| 87 | typedef struct {
|
|---|
| 88 | [string,charset(UTF16)] uint16 *path;
|
|---|
| 89 | [string,charset(UTF16)] uint16 *comment;
|
|---|
| 90 | dfs_VolumeState state;
|
|---|
| 91 | uint32 num_stores;
|
|---|
| 92 | [size_is(num_stores)] dfs_StorageInfo *stores;
|
|---|
| 93 | } dfs_Info3;
|
|---|
| 94 |
|
|---|
| 95 | typedef struct {
|
|---|
| 96 | [string,charset(UTF16)] uint16 *path;
|
|---|
| 97 | [string,charset(UTF16)] uint16 *comment;
|
|---|
| 98 | dfs_VolumeState state;
|
|---|
| 99 | uint32 timeout;
|
|---|
| 100 | GUID guid;
|
|---|
| 101 | uint32 num_stores;
|
|---|
| 102 | [size_is(num_stores)] dfs_StorageInfo *stores;
|
|---|
| 103 | } dfs_Info4;
|
|---|
| 104 |
|
|---|
| 105 | /* verified with dfsutil */
|
|---|
| 106 | typedef [public,bitmap32bit] bitmap {
|
|---|
| 107 | DFS_PROPERTY_FLAG_INSITE_REFERRALS = 0x01,
|
|---|
| 108 | DFS_PROPERTY_FLAG_ROOT_SCALABILITY = 0x02,
|
|---|
| 109 | DFS_PROPERTY_FLAG_SITE_COSTING = 0x04,
|
|---|
| 110 | DFS_PROPERTY_FLAG_TARGET_FAILBACK = 0x08,
|
|---|
| 111 | DFS_PROPERTY_FLAG_CLUSTER_ENABLED = 0x10 /* untested */
|
|---|
| 112 | } dfs_PropertyFlags;
|
|---|
| 113 |
|
|---|
| 114 | typedef struct {
|
|---|
| 115 | [string,charset(UTF16)] uint16 *path;
|
|---|
| 116 | [string,charset(UTF16)] uint16 *comment;
|
|---|
| 117 | dfs_VolumeState state;
|
|---|
| 118 | uint32 timeout;
|
|---|
| 119 | GUID guid;
|
|---|
| 120 | dfs_PropertyFlags flags;
|
|---|
| 121 | uint32 pktsize;
|
|---|
| 122 | uint32 num_stores;
|
|---|
| 123 | } dfs_Info5;
|
|---|
| 124 |
|
|---|
| 125 | typedef [v1_enum] enum {
|
|---|
| 126 | DFS_INVALID_PRIORITY_CLASS = -1,
|
|---|
| 127 | DFS_SITE_COST_NORMAL_PRIORITY_CLASS = 0,
|
|---|
| 128 | DFS_GLOBAL_HIGH_PRIORITY_CLASS = 1,
|
|---|
| 129 | DFS_SITE_COST_HIGH_PRIORITY_CLASS = 2,
|
|---|
| 130 | DFS_SITE_COST_LOW_PRIORITY_CLASS = 3,
|
|---|
| 131 | DFS_GLOBAL_LOW_PRIORITY_CLASS = 4
|
|---|
| 132 | } dfs_Target_PriorityClass;
|
|---|
| 133 |
|
|---|
| 134 | typedef struct {
|
|---|
| 135 | dfs_Target_PriorityClass target_priority_class;
|
|---|
| 136 | uint16 target_priority_rank;
|
|---|
| 137 | uint16 reserved;
|
|---|
| 138 | } dfs_Target_Priority;
|
|---|
| 139 |
|
|---|
| 140 | typedef struct {
|
|---|
| 141 | dfs_StorageInfo info;
|
|---|
| 142 | dfs_Target_Priority target_priority;
|
|---|
| 143 | } dfs_StorageInfo2;
|
|---|
| 144 |
|
|---|
| 145 | typedef struct {
|
|---|
| 146 | [string,charset(UTF16)] uint16 *entry_path;
|
|---|
| 147 | [string,charset(UTF16)] uint16 *comment;
|
|---|
| 148 | dfs_VolumeState state;
|
|---|
| 149 | uint32 timeout;
|
|---|
| 150 | GUID guid;
|
|---|
| 151 | dfs_PropertyFlags flags;
|
|---|
| 152 | uint32 pktsize;
|
|---|
| 153 | uint16 num_stores;
|
|---|
| 154 | [size_is(num_stores)] dfs_StorageInfo2 *stores;
|
|---|
| 155 | } dfs_Info6;
|
|---|
| 156 |
|
|---|
| 157 | typedef struct {
|
|---|
| 158 | GUID generation_guid;
|
|---|
| 159 | } dfs_Info7;
|
|---|
| 160 |
|
|---|
| 161 | typedef struct {
|
|---|
| 162 | [string,charset(UTF16)] uint16 *comment;
|
|---|
| 163 | } dfs_Info100;
|
|---|
| 164 |
|
|---|
| 165 | typedef struct {
|
|---|
| 166 | dfs_StorageState state;
|
|---|
| 167 | } dfs_Info101;
|
|---|
| 168 |
|
|---|
| 169 | typedef struct {
|
|---|
| 170 | uint32 timeout;
|
|---|
| 171 | } dfs_Info102;
|
|---|
| 172 |
|
|---|
| 173 | typedef struct {
|
|---|
| 174 | dfs_PropertyFlags flags;
|
|---|
| 175 | } dfs_Info103;
|
|---|
| 176 |
|
|---|
| 177 | typedef struct {
|
|---|
| 178 | dfs_Target_Priority priority;
|
|---|
| 179 | } dfs_Info104;
|
|---|
| 180 |
|
|---|
| 181 | typedef struct {
|
|---|
| 182 | [string,charset(UTF16)] uint16 *comment;
|
|---|
| 183 | dfs_VolumeState state;
|
|---|
| 184 | uint32 timeout;
|
|---|
| 185 | uint32 property_flag_mask;
|
|---|
| 186 | uint32 property_flags;
|
|---|
| 187 | } dfs_Info105;
|
|---|
| 188 |
|
|---|
| 189 | typedef struct {
|
|---|
| 190 | dfs_StorageState state;
|
|---|
| 191 | dfs_Target_Priority priority;
|
|---|
| 192 | } dfs_Info106;
|
|---|
| 193 |
|
|---|
| 194 | typedef struct {
|
|---|
| 195 | [string,charset(UTF16)] uint16 *dom_root;
|
|---|
| 196 | } dfs_Info200;
|
|---|
| 197 |
|
|---|
| 198 | typedef enum {
|
|---|
| 199 | DFS_VOLUME_FLAVOR_STANDALONE = 0x100,
|
|---|
| 200 | DFS_VOLUME_FLAVOR_AD_BLOB = 0x200
|
|---|
| 201 | } dfs_VolumeFlavor;
|
|---|
| 202 |
|
|---|
| 203 | typedef struct {
|
|---|
| 204 | dfs_VolumeFlavor flavor;
|
|---|
| 205 | [string,charset(UTF16)] uint16 *dom_root;
|
|---|
| 206 | } dfs_Info300;
|
|---|
| 207 |
|
|---|
| 208 | typedef union {
|
|---|
| 209 | [case(0)] dfs_Info0 *info0;
|
|---|
| 210 | [case(1)] dfs_Info1 *info1;
|
|---|
| 211 | [case(2)] dfs_Info2 *info2;
|
|---|
| 212 | [case(3)] dfs_Info3 *info3;
|
|---|
| 213 | [case(4)] dfs_Info4 *info4;
|
|---|
| 214 | [case(5)] dfs_Info5 *info5;
|
|---|
| 215 | [case(6)] dfs_Info6 *info6;
|
|---|
| 216 | [case(7)] dfs_Info7 *info7;
|
|---|
| 217 | [case(100)] dfs_Info100 *info100;
|
|---|
| 218 | [case(101)] dfs_Info101 *info101;
|
|---|
| 219 | [case(102)] dfs_Info102 *info102;
|
|---|
| 220 | [case(103)] dfs_Info103 *info103;
|
|---|
| 221 | [case(104)] dfs_Info104 *info104;
|
|---|
| 222 | [case(105)] dfs_Info105 *info105;
|
|---|
| 223 | [case(106)] dfs_Info106 *info106;
|
|---|
| 224 | } dfs_Info;
|
|---|
| 225 |
|
|---|
| 226 | WERROR dfs_SetInfo (
|
|---|
| 227 | [in] [string,charset(UTF16)] uint16 dfs_entry_path[],
|
|---|
| 228 | [in,unique] [string,charset(UTF16)] uint16 *servername,
|
|---|
| 229 | [in,unique] [string,charset(UTF16)] uint16 *sharename,
|
|---|
| 230 | [in] uint32 level,
|
|---|
| 231 | [in,ref,switch_is(level)] dfs_Info *info
|
|---|
| 232 | );
|
|---|
| 233 |
|
|---|
| 234 | /******************/
|
|---|
| 235 | /* Function: 0x04 */
|
|---|
| 236 | WERROR dfs_GetInfo (
|
|---|
| 237 | [in] [string,charset(UTF16)] uint16 dfs_entry_path[],
|
|---|
| 238 | [in,unique] [string,charset(UTF16)] uint16 *servername,
|
|---|
| 239 | [in,unique] [string,charset(UTF16)] uint16 *sharename,
|
|---|
| 240 | [in] uint32 level,
|
|---|
| 241 | [out,switch_is(level)] dfs_Info *info
|
|---|
| 242 | );
|
|---|
| 243 |
|
|---|
| 244 | /******************/
|
|---|
| 245 | /* Function: 0x05 */
|
|---|
| 246 |
|
|---|
| 247 | typedef struct {
|
|---|
| 248 | uint32 count;
|
|---|
| 249 | [size_is(count)] dfs_Info1 *s;
|
|---|
| 250 | } dfs_EnumArray1;
|
|---|
| 251 |
|
|---|
| 252 | typedef struct {
|
|---|
| 253 | uint32 count;
|
|---|
| 254 | [size_is(count)] dfs_Info2 *s;
|
|---|
| 255 | } dfs_EnumArray2;
|
|---|
| 256 |
|
|---|
| 257 | typedef struct {
|
|---|
| 258 | uint32 count;
|
|---|
| 259 | [size_is(count)] dfs_Info3 *s;
|
|---|
| 260 | } dfs_EnumArray3;
|
|---|
| 261 |
|
|---|
| 262 | typedef struct {
|
|---|
| 263 | uint32 count;
|
|---|
| 264 | [size_is(count)] dfs_Info4 *s;
|
|---|
| 265 | } dfs_EnumArray4;
|
|---|
| 266 |
|
|---|
| 267 | typedef struct {
|
|---|
| 268 | uint32 count;
|
|---|
| 269 | [size_is(count)] dfs_Info5 *s;
|
|---|
| 270 | } dfs_EnumArray5;
|
|---|
| 271 |
|
|---|
| 272 | typedef struct {
|
|---|
| 273 | uint32 count;
|
|---|
| 274 | [size_is(count)] dfs_Info6 *s;
|
|---|
| 275 | } dfs_EnumArray6;
|
|---|
| 276 |
|
|---|
| 277 | typedef struct {
|
|---|
| 278 | uint32 count;
|
|---|
| 279 | [size_is(count)] dfs_Info200 *s;
|
|---|
| 280 | } dfs_EnumArray200;
|
|---|
| 281 |
|
|---|
| 282 | typedef struct {
|
|---|
| 283 | uint32 count;
|
|---|
| 284 | [size_is(count)] dfs_Info300 *s;
|
|---|
| 285 | } dfs_EnumArray300;
|
|---|
| 286 |
|
|---|
| 287 |
|
|---|
| 288 | typedef union {
|
|---|
| 289 | [case(1)] dfs_EnumArray1 *info1;
|
|---|
| 290 | [case(2)] dfs_EnumArray2 *info2;
|
|---|
| 291 | [case(3)] dfs_EnumArray3 *info3;
|
|---|
| 292 | [case(4)] dfs_EnumArray4 *info4;
|
|---|
| 293 | [case(5)] dfs_EnumArray5 *info5;
|
|---|
| 294 | [case(6)] dfs_EnumArray6 *info6;
|
|---|
| 295 | [case(200)] dfs_EnumArray200 *info200;
|
|---|
| 296 | [case(300)] dfs_EnumArray300 *info300;
|
|---|
| 297 | } dfs_EnumInfo;
|
|---|
| 298 |
|
|---|
| 299 | typedef struct {
|
|---|
| 300 | uint32 level;
|
|---|
| 301 | [switch_is(level)] dfs_EnumInfo e;
|
|---|
| 302 | } dfs_EnumStruct;
|
|---|
| 303 |
|
|---|
| 304 | WERROR dfs_Enum (
|
|---|
| 305 | [in] uint32 level,
|
|---|
| 306 | [in] uint32 bufsize,
|
|---|
| 307 | [in,out,unique] dfs_EnumStruct *info,
|
|---|
| 308 | [in,out,unique] uint32 *total
|
|---|
| 309 | );
|
|---|
| 310 |
|
|---|
| 311 | /* Function 0x06 */
|
|---|
| 312 | [todo] WERROR dfs_Rename();
|
|---|
| 313 |
|
|---|
| 314 | /* Function 0x07 */
|
|---|
| 315 | [todo] WERROR dfs_Move();
|
|---|
| 316 |
|
|---|
| 317 | /* Function 0x08 */
|
|---|
| 318 | [todo] WERROR dfs_ManagerGetConfigInfo();
|
|---|
| 319 |
|
|---|
| 320 | /* Function 0x09 */
|
|---|
| 321 | [todo] WERROR dfs_ManagerSendSiteInfo();
|
|---|
| 322 |
|
|---|
| 323 | /* Function 0x0a */
|
|---|
| 324 | typedef struct {
|
|---|
| 325 | uint32 unknown1;
|
|---|
| 326 | [string,charset(UTF16)] uint16 *unknown2;
|
|---|
| 327 | } dfs_UnknownStruct;
|
|---|
| 328 |
|
|---|
| 329 | WERROR dfs_AddFtRoot(
|
|---|
| 330 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 331 | [in] [string,charset(UTF16)] uint16 dns_servername[],
|
|---|
| 332 | [in] [string,charset(UTF16)] uint16 dfsname[],
|
|---|
| 333 | [in] [string,charset(UTF16)] uint16 rootshare[],
|
|---|
| 334 | [in] [string,charset(UTF16)] uint16 comment[],
|
|---|
| 335 | [in] [string,charset(UTF16)] uint16 dfs_config_dn[],
|
|---|
| 336 | [in] uint8 unknown1,
|
|---|
| 337 | [in] uint32 flags,
|
|---|
| 338 | [in,out,unique] dfs_UnknownStruct **unknown2
|
|---|
| 339 | );
|
|---|
| 340 |
|
|---|
| 341 | /* Function 0x0b */
|
|---|
| 342 | WERROR dfs_RemoveFtRoot(
|
|---|
| 343 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 344 | [in] [string,charset(UTF16)] uint16 dns_servername[],
|
|---|
| 345 | [in] [string,charset(UTF16)] uint16 dfsname[],
|
|---|
| 346 | [in] [string,charset(UTF16)] uint16 rootshare[],
|
|---|
| 347 | [in] uint32 flags,
|
|---|
| 348 | [in,out,unique] dfs_UnknownStruct **unknown
|
|---|
| 349 | );
|
|---|
| 350 |
|
|---|
| 351 | /* Function 0x0c */
|
|---|
| 352 | WERROR dfs_AddStdRoot(
|
|---|
| 353 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 354 | [in] [string,charset(UTF16)] uint16 rootshare[],
|
|---|
| 355 | [in] [string,charset(UTF16)] uint16 comment[],
|
|---|
| 356 | [in] uint32 flags
|
|---|
| 357 | );
|
|---|
| 358 |
|
|---|
| 359 | /* Function 0x0d */
|
|---|
| 360 | WERROR dfs_RemoveStdRoot(
|
|---|
| 361 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 362 | [in] [string,charset(UTF16)] uint16 rootshare[],
|
|---|
| 363 | [in] uint32 flags
|
|---|
| 364 | );
|
|---|
| 365 |
|
|---|
| 366 | /* Function 0x0e */
|
|---|
| 367 | WERROR dfs_ManagerInitialize(
|
|---|
| 368 | [in] [string,charset(UTF16)] uint16 *servername,
|
|---|
| 369 | [in] uint32 flags
|
|---|
| 370 | );
|
|---|
| 371 |
|
|---|
| 372 | /* Function 0x0f */
|
|---|
| 373 | WERROR dfs_AddStdRootForced(
|
|---|
| 374 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 375 | [in] [string,charset(UTF16)] uint16 rootshare[],
|
|---|
| 376 | [in] [string,charset(UTF16)] uint16 comment[],
|
|---|
| 377 | [in] [string,charset(UTF16)] uint16 store[] /* C:\\whatever */
|
|---|
| 378 | );
|
|---|
| 379 |
|
|---|
| 380 | /* Function 0x10 */
|
|---|
| 381 | WERROR dfs_GetDcAddress(
|
|---|
| 382 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 383 | [in,out,ref] [string,charset(UTF16)] uint16 **server_fullname,
|
|---|
| 384 | [in,out,ref] boolean8 *is_root,
|
|---|
| 385 | [in,out,ref] uint32 *ttl
|
|---|
| 386 | );
|
|---|
| 387 |
|
|---|
| 388 | /* Function 0x11 */
|
|---|
| 389 | WERROR dfs_SetDcAddress(
|
|---|
| 390 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 391 | [in] [string,charset(UTF16)] uint16 server_fullname[],
|
|---|
| 392 | [in] uint32 flags,
|
|---|
| 393 | [in] uint32 ttl
|
|---|
| 394 | );
|
|---|
| 395 |
|
|---|
| 396 | /* Function 0x12 */
|
|---|
| 397 | WERROR dfs_FlushFtTable(
|
|---|
| 398 | [in] [string,charset(UTF16)] uint16 servername[],
|
|---|
| 399 | [in] [string,charset(UTF16)] uint16 rootshare[]
|
|---|
| 400 | );
|
|---|
| 401 |
|
|---|
| 402 | /* Function 0x13 */
|
|---|
| 403 | [todo] WERROR dfs_Add2();
|
|---|
| 404 |
|
|---|
| 405 | /* Function 0x14 */
|
|---|
| 406 | [todo] WERROR dfs_Remove2();
|
|---|
| 407 |
|
|---|
| 408 | /* Function 0x15 */
|
|---|
| 409 | [public] WERROR dfs_EnumEx(
|
|---|
| 410 | [in] [string,charset(UTF16)] uint16 dfs_name[],
|
|---|
| 411 | [in] uint32 level,
|
|---|
| 412 | [in] uint32 bufsize,
|
|---|
| 413 | [in,out,unique] dfs_EnumStruct *info,
|
|---|
| 414 | [in,out,unique] uint32 *total
|
|---|
| 415 | );
|
|---|
| 416 |
|
|---|
| 417 | /* Function 0x16 */
|
|---|
| 418 | [todo] WERROR dfs_SetInfo2();
|
|---|
| 419 | }
|
|---|