r10656: BIG merge from trunk. Features not copied over
[Samba/nascimento.git] / source3 / include / rpc_dfs.h
blob7aee208c14b0fa3d8c333b8a3054e0054375ae5f
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
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.
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.
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.
23 #ifndef _RPC_DFS_H
24 #define _RPC_DFS_H
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
33 /* dfsadd flags */
34 #define DFSFLAG_ADD_VOLUME 0x00000001
35 #define DFSFLAG_RESTORE_VOLUME 0x00000002
37 typedef struct dfs_q_dfs_exist {
38 uint32 dummy;
39 } DFS_Q_DFS_EXIST;
41 /* status == 1 if dfs exists. */
42 typedef struct dfs_r_dfs_exist {
43 uint32 status; /* Not a WERROR or NTSTATUS code */
44 } DFS_R_DFS_EXIST;
46 typedef struct dfs_q_dfs_add {
47 uint32 ptr_DfsEntryPath;
48 UNISTR2 DfsEntryPath;
49 uint32 ptr_ServerName;
50 UNISTR2 ServerName;
51 uint32 ptr_ShareName;
52 UNISTR2 ShareName;
53 uint32 ptr_Comment;
54 UNISTR2 Comment;
55 uint32 Flags;
56 } DFS_Q_DFS_ADD;
58 typedef struct dfs_r_dfs_add {
59 WERROR status;
60 } DFS_R_DFS_ADD;
62 /********************************************/
63 typedef struct dfs_q_dfs_remove {
64 UNISTR2 DfsEntryPath;
65 uint32 ptr_ServerName;
66 UNISTR2 ServerName;
67 uint32 ptr_ShareName;
68 UNISTR2 ShareName;
69 } DFS_Q_DFS_REMOVE;
71 typedef struct dfs_r_dfs_remove {
72 WERROR status;
73 } DFS_R_DFS_REMOVE;
75 /********************************************/
76 typedef struct dfs_info_1 {
77 uint32 ptr_entrypath;
78 UNISTR2 entrypath;
79 } DFS_INFO_1;
81 typedef struct dfs_info_2 {
82 uint32 ptr_entrypath;
83 UNISTR2 entrypath;
84 uint32 ptr_comment;
85 UNISTR2 comment;
86 uint32 state;
87 uint32 num_storages;
88 } DFS_INFO_2;
90 typedef struct dfs_storage_info {
91 uint32 state;
92 uint32 ptr_servername;
93 UNISTR2 servername;
94 uint32 ptr_sharename;
95 UNISTR2 sharename;
96 } DFS_STORAGE_INFO;
98 typedef struct dfs_info_3 {
99 uint32 ptr_entrypath;
100 UNISTR2 entrypath;
101 uint32 ptr_comment;
102 UNISTR2 comment;
103 uint32 state;
104 uint32 num_storages;
105 uint32 ptr_storages;
106 uint32 num_storage_infos;
107 DFS_STORAGE_INFO* storages;
108 } DFS_INFO_3;
110 typedef struct dfs_info_ctr {
111 uint32 switch_value;
112 uint32 num_entries;
113 uint32 ptr_dfs_ctr; /* pointer to dfs info union */
114 union {
115 DFS_INFO_1 *info1;
116 DFS_INFO_2 *info2;
117 DFS_INFO_3 *info3;
118 } dfs;
119 } DFS_INFO_CTR;
121 typedef struct dfs_q_dfs_get_info {
122 UNISTR2 uni_path;
124 uint32 ptr_server;
125 UNISTR2 uni_server;
127 uint32 ptr_share;
128 UNISTR2 uni_share;
130 uint32 level;
131 } DFS_Q_DFS_GET_INFO;
133 typedef struct dfs_r_dfs_get_info {
134 uint32 level;
135 uint32 ptr_ctr;
136 DFS_INFO_CTR ctr;
137 WERROR status;
138 } DFS_R_DFS_GET_INFO;
140 typedef struct dfs_q_dfs_enum {
141 uint32 level;
142 uint32 maxpreflen;
143 uint32 ptr_buffer;
144 uint32 level2;
145 uint32 ptr_num_entries;
146 uint32 num_entries;
147 uint32 ptr_num_entries2;
148 uint32 num_entries2;
149 ENUM_HND reshnd;
150 } DFS_Q_DFS_ENUM;
152 typedef struct dfs_r_dfs_enum {
153 DFS_INFO_CTR *ctr;
154 uint32 ptr_buffer;
155 uint32 level;
156 uint32 level2;
157 uint32 ptr_num_entries;
158 uint32 num_entries;
159 uint32 ptr_num_entries2;
160 uint32 num_entries2;
161 ENUM_HND reshnd;
162 WERROR status;
163 } DFS_R_DFS_ENUM;
164 #endif