import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunk
[metze/old/v3-2-winbind-ndr.git] / source / include / rpc_dfs.h
1 /* 
2    Unix SMB/CIFS implementation.
3    Samba parameters and setup
4    Copyright (C) Andrew Tridgell 1992-2000
5    Copyright (C) Luke Kenneth Casson Leighton 1996 - 2000
6    Copyright (C) Shirish Kalele 2000
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful, 
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef _RPC_DFS_H
24 #define _RPC_DFS_H
25
26 /* NETDFS pipe: calls */
27 #define DFS_EXIST                0x00
28 #define DFS_ADD                  0x01
29 #define DFS_REMOVE               0x02
30 #define DFS_GET_INFO             0x04
31 #define DFS_ENUM                 0x05
32
33 /* dfsadd flags */
34 #define DFSFLAG_ADD_VOLUME           0x00000001
35 #define DFSFLAG_RESTORE_VOLUME       0x00000002
36
37 typedef struct dfs_q_dfs_exist
38 {
39   uint32 dummy;
40 }
41 DFS_Q_DFS_EXIST;
42
43 /* status == 1 if dfs exists. */
44 typedef struct dfs_r_dfs_exist
45 {
46         uint32 status;          /* Not a WERROR or NTSTATUS code */
47 }
48 DFS_R_DFS_EXIST;
49
50 typedef struct dfs_q_dfs_add
51 {
52   uint32 ptr_DfsEntryPath;
53   UNISTR2 DfsEntryPath;
54   uint32 ptr_ServerName;
55   UNISTR2 ServerName;
56   uint32 ptr_ShareName;
57   UNISTR2 ShareName;
58   uint32 ptr_Comment;
59   UNISTR2 Comment;
60   uint32 Flags;
61 }
62 DFS_Q_DFS_ADD;
63
64 typedef struct dfs_r_dfs_add
65 {
66   WERROR status;
67 }
68 DFS_R_DFS_ADD;
69
70 /********************************************/
71 typedef struct dfs_q_dfs_remove
72 {
73   UNISTR2 DfsEntryPath;
74   uint32 ptr_ServerName;
75   UNISTR2 ServerName;
76   uint32 ptr_ShareName;
77   UNISTR2 ShareName;
78 }
79 DFS_Q_DFS_REMOVE;
80
81 typedef struct dfs_r_dfs_remove
82 {
83   WERROR status;
84 }
85 DFS_R_DFS_REMOVE;
86
87 /********************************************/
88 typedef struct dfs_info_1
89 {
90   uint32 ptr_entrypath;
91   UNISTR2 entrypath;
92 }
93 DFS_INFO_1;
94
95 typedef struct dfs_info_2
96 {
97   uint32 ptr_entrypath;
98   UNISTR2 entrypath;
99   uint32 ptr_comment;
100   UNISTR2 comment;
101   uint32 state;
102   uint32 num_storages;
103 }
104 DFS_INFO_2;
105
106 typedef struct dfs_storage_info
107 {
108   uint32 state;
109   uint32 ptr_servername;
110   UNISTR2 servername;
111   uint32 ptr_sharename;
112   UNISTR2 sharename;
113 }
114 DFS_STORAGE_INFO;
115
116 typedef struct dfs_info_3
117 {
118   uint32 ptr_entrypath;
119   UNISTR2 entrypath;
120   uint32 ptr_comment;
121   UNISTR2 comment;
122   uint32 state;
123   uint32 num_storages;
124   uint32 ptr_storages;
125   uint32 num_storage_infos;
126   DFS_STORAGE_INFO* storages;
127 }
128 DFS_INFO_3;
129
130 typedef struct dfs_info_ctr
131 {
132   
133   uint32 switch_value;
134   uint32 num_entries;
135   uint32 ptr_dfs_ctr; /* pointer to dfs info union */
136   union
137   {
138     DFS_INFO_1 *info1;
139     DFS_INFO_2 *info2;
140     DFS_INFO_3 *info3;
141   } dfs;
142 }
143 DFS_INFO_CTR;
144
145 typedef struct dfs_q_dfs_get_info
146 {
147   UNISTR2 uni_path;
148   
149   uint32 ptr_server;
150   UNISTR2 uni_server;
151
152   uint32 ptr_share;
153   UNISTR2 uni_share;
154   
155   uint32 level;
156 }
157 DFS_Q_DFS_GET_INFO;
158
159 typedef struct dfs_r_dfs_get_info
160 {
161   uint32 level;
162   uint32 ptr_ctr;
163   DFS_INFO_CTR ctr;
164   WERROR status;
165 }
166 DFS_R_DFS_GET_INFO;
167
168 typedef struct dfs_q_dfs_enum
169 {
170   uint32 level;
171   uint32 maxpreflen;
172   uint32 ptr_buffer;
173   uint32 level2;
174   uint32 ptr_num_entries;
175   uint32 num_entries;
176   uint32 ptr_num_entries2;
177   uint32 num_entries2;
178   ENUM_HND reshnd;
179 }
180 DFS_Q_DFS_ENUM;
181
182 typedef struct dfs_r_dfs_enum
183 {
184   DFS_INFO_CTR *ctr;
185   uint32 ptr_buffer;
186   uint32 level;
187   uint32 level2;
188   uint32 ptr_num_entries;
189   uint32 num_entries;
190   uint32 ptr_num_entries2;
191   uint32 num_entries2;
192   ENUM_HND reshnd;
193   WERROR status;
194 }
195 DFS_R_DFS_ENUM;
196
197 #endif