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