This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
[Samba.git] / source / include / rpc_svcctl.h
blobc5c30617d29b59e5e4b4717497caeed0180263c1
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1997
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7 Copyright (C) Paul Ashton 1997
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_SVCCTL_H /* _RPC_SVCCTL_H */
25 #define _RPC_SVCCTL_H
28 /* svcctl pipe */
29 #define SVC_CLOSE 0x00
30 #define SVC_STOP_SERVICE 0x01
31 #define SVC_UNKNOWN_3 0x03
32 #define SVC_OPEN_SC_MAN 0x0f
33 #define SVC_ENUM_SVCS_STATUS 0x0e
34 #define SVC_QUERY_SVC_CONFIG 0x11
35 #define SVC_QUERY_DISP_NAME 0x14
36 #define SVC_CHANGE_SVC_CONFIG 0x0b
37 #define SVC_OPEN_SERVICE 0x10
38 #define SVC_START_SERVICE 0x13
40 /* SVC_Q_START_SERVICE */
41 #define MAX_SVC_ARGS 10
42 /* SVC_Q_ENUM_SVCS_STATUS */
43 #define MAX_SERVICES 50
45 /* SVC_Q_OPEN_SC_MAN */
46 typedef struct q_svc_open_sc_man_info
48 uint32 ptr_srv_name; /* pointer (to server name?) */
49 UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
51 uint32 ptr_db_name; /* pointer (to database name?) */
52 UNISTR2 uni_db_name; /* unicode database name */
54 uint32 des_access; /* 0x80000004 - SC_MANAGER_xxxx */
56 } SVC_Q_OPEN_SC_MAN;
58 /* SVC_R_OPEN_SC_MAN */
59 typedef struct r_svc_open_sc_man_info
61 POLICY_HND pol;
62 uint32 status; /* return status */
64 } SVC_R_OPEN_SC_MAN;
66 /* SVC_Q_OPEN_SERVICE */
67 typedef struct q_svc_open_service_info
69 POLICY_HND scman_pol;
70 UNISTR2 uni_svc_name; /* unicode service name */
71 uint32 des_access; /* 0x8000 0001 */
73 } SVC_Q_OPEN_SERVICE;
75 /* SVC_R_OPEN_SERVICE */
76 typedef struct r_svc_open_service_info
78 POLICY_HND pol;
79 uint32 status; /* return status */
81 } SVC_R_OPEN_SERVICE;
83 /* SVC_Q_STOP_SERVICE */
84 typedef struct q_svc_stop_service_info
86 POLICY_HND pol;
88 uint32 unknown;
90 } SVC_Q_STOP_SERVICE;
92 /* SVC_R_STOP_SERVICE */
93 typedef struct r_svc_stop_service_info
95 uint32 unknown0; /* 0x00000020 */
96 uint32 unknown1; /* 0x00000001 */
97 uint32 unknown2; /* 0x00000001 */
98 uint32 unknown3; /* 0x00000000 */
99 uint32 unknown4; /* 0x00000000 */
100 uint32 unknown5; /* 0x00000000 */
101 uint32 unknown6; /* 0x00000000 */
102 uint32 status;
104 } SVC_R_STOP_SERVICE;
106 /* SVC_Q_START_SERVICE */
107 typedef struct q_svc_start_service_info
109 POLICY_HND pol;
111 uint32 argc;
112 uint32 ptr_args;
113 uint32 argc2;
114 uint32 ptr_argv[MAX_SVC_ARGS];
115 UNISTR2 argv[MAX_SVC_ARGS];
117 } SVC_Q_START_SERVICE;
119 /* SVC_R_START_SERVICE */
120 typedef struct r_svc_start_service_info
122 uint32 status;
124 } SVC_R_START_SERVICE;
127 /* QUERY_SERVICE_CONFIG */
128 typedef struct query_service_config_info
130 uint32 service_type;
131 uint32 start_type;
132 uint32 error_control;
133 uint32 ptr_bin_path_name;
134 uint32 ptr_load_order_grp;
135 uint32 tag_id;
136 uint32 ptr_dependencies;
137 uint32 ptr_service_start_name;
138 uint32 ptr_display_name;
140 UNISTR2 uni_bin_path_name;
141 UNISTR2 uni_load_order_grp;
142 UNISTR2 uni_dependencies;
143 UNISTR2 uni_service_start_name;
144 UNISTR2 uni_display_name;
146 } QUERY_SERVICE_CONFIG;
148 /* SVC_STATUS */
149 typedef struct svc_status_info
151 uint32 svc_type;
152 uint32 current_state;
153 uint32 controls_accepted;
154 uint32 win32_exit_code;
155 uint32 svc_specific_exit_code;
156 uint32 check_point;
157 uint32 wait_hint;
159 } SVC_STATUS;
161 /* ENUM_SRVC_STATUS */
162 typedef struct enum_svc_status_info
164 UNISTR uni_srvc_name;
165 UNISTR uni_disp_name;
166 SVC_STATUS status;
168 } ENUM_SRVC_STATUS;
170 /* SVC_Q_ENUM_SVCS_STATUS */
171 typedef struct q_svc_enum_svcs_status_info
173 POLICY_HND pol;
174 uint32 service_type; /* 0x00000030 - win32 | 0x0000000b - driver */
175 uint32 service_state; /* 0x00000003 - state_all */
176 uint32 buf_size; /* max service buffer size */
177 ENUM_HND resume_hnd; /* resume handle */
179 } SVC_Q_ENUM_SVCS_STATUS;
181 /* SVC_R_ENUM_SVCS_STATUS */
182 typedef struct r_svc_enum_svcs_status_info
184 uint32 buf_size; /* service buffer size */
185 ENUM_SRVC_STATUS *svcs;
186 uint32 more_buf_size;
187 uint32 num_svcs;
188 ENUM_HND resume_hnd; /* resume handle */
189 uint32 dos_status; /* return status, DOS error code (wow!) */
191 } SVC_R_ENUM_SVCS_STATUS;
194 /* SVC_Q_QUERY_SVC_CONFIG */
195 typedef struct q_svc_query_svc_cfg_info
197 POLICY_HND pol;
198 uint32 buf_size;
200 } SVC_Q_QUERY_SVC_CONFIG;
203 /* SVC_R_QUERY_SVC_CONFIG */
204 typedef struct r_svc_query_svc_cfg_info
206 QUERY_SERVICE_CONFIG *cfg;
207 uint32 buf_size;
208 uint32 status; /* return status */
210 } SVC_R_QUERY_SVC_CONFIG;
213 /* SVC_Q_QUERY_DISP_NAME */
214 typedef struct q_svc_query_disp_name_info
216 POLICY_HND scman_pol;
217 UNISTR2 uni_svc_name;
218 uint32 buf_size;
220 } SVC_Q_QUERY_DISP_NAME;
223 /* SVC_R_QUERY_DISP_NAME */
224 typedef struct r_svc_query_disp_name_info
226 UNISTR2 uni_disp_name;
227 uint32 buf_size;
228 uint32 status;
230 } SVC_R_QUERY_DISP_NAME;
233 /* SVC_Q_CLOSE */
234 typedef struct q_svc_close_info
236 POLICY_HND pol;
238 } SVC_Q_CLOSE;
240 /* SVC_R_CLOSE */
241 typedef struct r_svc_close_info
243 POLICY_HND pol;
244 uint32 status; /* return status */
246 } SVC_R_CLOSE;
248 /* SVC_Q_CHANGE_SVC_CONFIG */
249 typedef struct q_svc_change_svc_cfg_info
251 POLICY_HND pol;
252 uint32 service_type;
253 uint32 start_type;
254 uint32 unknown_0;
255 uint32 error_control;
257 uint32 ptr_bin_path_name;
258 UNISTR2 uni_bin_path_name;
260 uint32 ptr_load_order_grp;
261 UNISTR2 uni_load_order_grp;
263 uint32 tag_id;
265 uint32 ptr_dependencies;
266 UNISTR2 uni_dependencies;
268 uint32 ptr_service_start_name;
269 UNISTR2 uni_service_start_name;
271 uint32 ptr_password;
272 STRING2 str_password;
274 uint32 ptr_display_name;
275 UNISTR2 uni_display_name;
277 } SVC_Q_CHANGE_SVC_CONFIG;
279 /* SVC_R_CHANGE_SVC_CONFIG */
280 typedef struct r_svc_change_svc_cfg_info
282 uint32 unknown_0; /* */
283 uint32 status; /* return status */
285 } SVC_R_CHANGE_SVC_CONFIG;
288 /* SVC_Q_UNKNOWN_3 */
289 typedef struct _svc_q_unknown_3
291 POLICY_HND scman_hnd;
292 } SVC_Q_UNKNOWN_3;
294 /* SVC_R_UNKNOWN_3 */
295 typedef struct _svc_r_unknown_3
297 POLICY_HND hnd;
298 uint32 status; /* 0x5 seems to mean access denied... */
299 } SVC_R_UNKNOWN_3;
303 #endif /* _RPC_SVCCTL_H */