winreg: add IDL for winreg_DeleteKeyEx.
[kai/samba.git] / librpc / idl / dfsblobs.idl
1 #include "idl_types.h"
2
3 import "misc.idl";
4 /*
5 dfs blobs interface definition
6 */
7
8
9 [
10         pointer_default(unique),
11         helpstring("dfs referral blobs"),
12         uuid("12345778-1234-abcd-0001-00000003")
13 ]
14
15
16 interface dfsblobs
17 {
18         typedef [bitmap32bit] bitmap {
19                 DFS_HEADER_FLAG_REFERAL_SVR     = 0x00000001,
20                 DFS_HEADER_FLAG_STORAGE_SVR     = 0x00000002,
21                 DFS_HEADER_FLAG_TARGET_BCK      = 0x00000004
22         } DFS_HEADER_FLAG;
23
24         typedef [enum16bit] enum {
25                 DFS_SERVER_NON_ROOT     = 0x0000,
26                 DFS_SERVER_ROOT         = 0x0001
27         } DFS_SERVER_TYPE;
28
29         typedef [enum16bit] enum {
30                 DFS_FLAG_REFERRAL_DOMAIN_RESP           = 0x0002,
31                 DFS_FLAG_REFERRAL_FIRST_TARGET_SET      = 0x0004
32         } DFS_FLAGS_REFERRAL;
33
34         typedef struct {
35                 uint16 size;
36                 uint16 server_type;
37                 uint16 entry_flags;
38                 nstring *share_name;
39         } dfs_referral_v1;
40
41         typedef struct {
42                 uint16 size;
43                 DFS_SERVER_TYPE server_type;
44                 DFS_FLAGS_REFERRAL entry_flags;
45                 uint32 proximity;
46                 uint32 ttl;
47                 [relative_short] nstring *DFS_path;
48                 [relative_short] nstring *DFS_alt_path;
49                 [relative_short] nstring *netw_address;
50         } dfs_referral_v2;
51
52         typedef struct {
53                 [relative_short] nstring *DFS_path;
54                 [relative_short] nstring *DFS_alt_path;
55                 [relative_short] nstring *netw_address;
56                 /* As stated in MS DFSC 2.2.4.3.1 this array was guid but now MUST be 16 null bytes*/
57                 uint8   service_site_guid[16];
58         } dfs_normal_referral;
59
60         typedef struct {
61                 [relative_short] nstring *special_name;
62                 uint16 nb_expanded_names;
63                 [relative_short] [flag(STR_NOTERM|NDR_REMAINING)] string_array *expanded_names;
64                 /*[relative_short] nstring_array expanded_names2;*/
65                 /* As stated in MS DFSC 2.2.4.3.1 this array was guid but now MUST be 16 null bytes*/
66                 uint8   service_site_guid[16];
67         } dfs_domain_referral;
68
69         typedef [nodiscriminant] union {
70                 [case(0)] dfs_normal_referral r1;
71                 [case(2)] dfs_domain_referral r2;
72                 [default];
73         } dfs_referral;
74
75         typedef [flag(NDR_NOALIGN)] struct {
76                 uint16 size;
77                 DFS_SERVER_TYPE server_type;
78                 DFS_FLAGS_REFERRAL entry_flags;
79                 uint32 ttl;
80                 [switch_is(entry_flags & DFS_FLAG_REFERRAL_DOMAIN_RESP)] dfs_referral referrals;
81         } dfs_referral_v3;
82
83         typedef struct {
84                 uint16 size;
85                 DFS_SERVER_TYPE server_type;
86                 DFS_FLAGS_REFERRAL entry_flags;
87                 uint32 ttl;
88                 dfs_normal_referral referrals;
89         } dfs_referral_v4;
90
91         typedef [nodiscriminant] union {
92                 [case(1)] dfs_referral_v1 v1;
93                 [case(2)] dfs_referral_v2 v2;
94                 [case(3)] dfs_referral_v3 v3;
95                 [case(4)] dfs_referral_v4 v4;
96                 [default];
97         } dfs_referral_version;
98
99         typedef [flag(NDR_NOALIGN)] [relative_base] struct {
100                 uint16  version;
101                 [switch_is(version)] dfs_referral_version referral;
102         } dfs_referral_type;
103
104         typedef [public] struct {
105                 uint16  path_consumed;
106                 uint16  nb_referrals;
107                 uint32  header_flags;
108                 dfs_referral_type referral_entries[nb_referrals];
109         } dfs_referral_resp;
110
111         [public] void dfs_GetDFSReferral(
112                 [in]            uint16 max_referral_level,
113                 [in]            nstring servername,
114                 [out,ref]       dfs_referral_resp *resp
115                 );
116 }