preparing for release of alpha.0.0
[Samba.git] / source / include / rpc_svcctl.h
blobecd1188fe82b713525ff102ba91f5ef4dfc4712e
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_OPEN_SC_MAN 0x0f
30 #define SVC_ENUM_SVCS_STATUS 0x0e
31 #define SVC_QUERY_SVC_CONFIG 0x11
32 #define SVC_QUERY_DISP_NAME 0x14
33 #define SVC_CHANGE_SVC_CONFIG 0x0b
34 #define SVC_OPEN_SERVICE 0x10
35 #define SVC_START_SERVICE 0x13
36 #define SVC_STOP_SERVICE 0x01
37 #define SVC_CLOSE 0x00
40 /* SVC_Q_OPEN_SC_MAN */
41 typedef struct q_svc_open_sc_man_info
43 uint32 ptr_srv_name; /* pointer (to server name?) */
44 UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
46 uint32 ptr_db_name; /* pointer (to database name?) */
47 UNISTR2 uni_db_name; /* unicode database name */
49 uint32 des_access; /* 0x80000004 - SC_MANAGER_xxxx */
51 } SVC_Q_OPEN_SC_MAN;
53 /* SVC_R_OPEN_SC_MAN */
54 typedef struct r_svc_open_sc_man_info
56 POLICY_HND pol;
57 uint32 status; /* return status */
59 } SVC_R_OPEN_SC_MAN;
61 /* SVC_Q_OPEN_SERVICE */
62 typedef struct q_svc_open_service_info
64 POLICY_HND scman_pol;
65 UNISTR2 uni_svc_name; /* unicode service name */
66 uint32 des_access; /* 0x8000 0001 */
68 } SVC_Q_OPEN_SERVICE;
70 /* SVC_R_OPEN_SERVICE */
71 typedef struct r_svc_open_service_info
73 POLICY_HND pol;
74 uint32 status; /* return status */
76 } SVC_R_OPEN_SERVICE;
78 #define MAX_SVC_ARGS 10
80 /* SVC_Q_STOP_SERVICE */
81 typedef struct q_svc_stop_service_info
83 POLICY_HND pol;
85 uint32 unknown;
87 } SVC_Q_STOP_SERVICE;
89 /* SVC_R_STOP_SERVICE */
90 typedef struct r_svc_stop_service_info
92 uint32 unknown0; /* 0x00000020 */
93 uint32 unknown1; /* 0x00000001 */
94 uint32 unknown2; /* 0x00000001 */
95 uint32 unknown3; /* 0x00000000 */
96 uint32 unknown4; /* 0x00000000 */
97 uint32 unknown5; /* 0x00000000 */
98 uint32 unknown6; /* 0x00000000 */
99 uint32 status;
101 } SVC_R_STOP_SERVICE;
103 /* SVC_Q_START_SERVICE */
104 typedef struct q_svc_start_service_info
106 POLICY_HND pol;
108 uint32 argc;
109 uint32 ptr_args;
110 uint32 argc2;
111 uint32 ptr_argv[MAX_SVC_ARGS];
112 UNISTR2 argv[MAX_SVC_ARGS];
114 } SVC_Q_START_SERVICE;
116 /* SVC_R_START_SERVICE */
117 typedef struct r_svc_start_service_info
119 uint32 status;
121 } SVC_R_START_SERVICE;
124 /* QUERY_SERVICE_CONFIG */
125 typedef struct query_service_config_info
127 uint32 service_type;
128 uint32 start_type;
129 uint32 error_control;
130 uint32 ptr_bin_path_name;
131 uint32 ptr_load_order_grp;
132 uint32 tag_id;
133 uint32 ptr_dependencies;
134 uint32 ptr_service_start_name;
135 uint32 ptr_display_name;
137 UNISTR2 uni_bin_path_name;
138 UNISTR2 uni_load_order_grp;
139 UNISTR2 uni_dependencies;
140 UNISTR2 uni_service_start_name;
141 UNISTR2 uni_display_name;
143 } QUERY_SERVICE_CONFIG;
145 /* SVC_STATUS */
146 typedef struct svc_status_info
148 uint32 svc_type;
149 uint32 current_state;
150 uint32 controls_accepted;
151 uint32 win32_exit_code;
152 uint32 svc_specific_exit_code;
153 uint32 check_point;
154 uint32 wait_hint;
156 } SVC_STATUS;
158 /* ENUM_SRVC_STATUS */
159 typedef struct enum_svc_status_info
161 UNISTR uni_srvc_name;
162 UNISTR uni_disp_name;
163 SVC_STATUS status;
165 } ENUM_SRVC_STATUS;
167 /* SVC_Q_ENUM_SVCS_STATUS */
168 typedef struct q_svc_enum_svcs_status_info
170 POLICY_HND pol;
171 uint32 service_type; /* 0x00000030 - win32 | 0x0000000b - driver */
172 uint32 service_state; /* 0x00000003 - state_all */
173 uint32 buf_size; /* max service buffer size */
174 ENUM_HND resume_hnd; /* resume handle */
176 } SVC_Q_ENUM_SVCS_STATUS;
178 /* SVC_R_ENUM_SVCS_STATUS */
179 typedef struct r_svc_enum_svcs_status_info
181 uint32 buf_size; /* service buffer size */
182 ENUM_SRVC_STATUS *svcs;
183 uint32 more_buf_size;
184 uint32 num_svcs;
185 ENUM_HND resume_hnd; /* resume handle */
186 uint32 dos_status; /* return status, DOS error code (wow!) */
188 } SVC_R_ENUM_SVCS_STATUS;
191 /* SVC_Q_QUERY_SVC_CONFIG */
192 typedef struct q_svc_query_svc_cfg_info
194 POLICY_HND pol;
195 uint32 buf_size;
197 } SVC_Q_QUERY_SVC_CONFIG;
200 /* SVC_R_QUERY_SVC_CONFIG */
201 typedef struct r_svc_query_svc_cfg_info
203 QUERY_SERVICE_CONFIG *cfg;
204 uint32 buf_size;
205 uint32 status; /* return status */
207 } SVC_R_QUERY_SVC_CONFIG;
210 /* SVC_Q_QUERY_DISP_NAME */
211 typedef struct q_svc_query_disp_name_info
213 POLICY_HND scman_pol;
214 UNISTR2 uni_svc_name;
215 uint32 buf_size;
217 } SVC_Q_QUERY_DISP_NAME;
220 /* SVC_R_QUERY_DISP_NAME */
221 typedef struct r_svc_query_disp_name_info
223 UNISTR2 uni_disp_name;
224 uint32 buf_size;
225 uint32 status;
227 } SVC_R_QUERY_DISP_NAME;
230 /* SVC_Q_CLOSE */
231 typedef struct q_svc_close_info
233 POLICY_HND pol;
235 } SVC_Q_CLOSE;
239 /* SVC_R_CLOSE */
240 typedef struct r_svc_close_info
242 POLICY_HND pol;
243 uint32 status; /* return status */
245 } SVC_R_CLOSE;
247 /* SVC_Q_CHANGE_SVC_CONFIG */
248 typedef struct q_svc_change_svc_cfg_info
250 POLICY_HND pol;
251 uint32 service_type;
252 uint32 start_type;
253 uint32 unknown_0;
254 uint32 error_control;
256 uint32 ptr_bin_path_name;
257 UNISTR2 uni_bin_path_name;
259 uint32 ptr_load_order_grp;
260 UNISTR2 uni_load_order_grp;
262 uint32 tag_id;
264 uint32 ptr_dependencies;
265 UNISTR2 uni_dependencies;
267 uint32 ptr_service_start_name;
268 UNISTR2 uni_service_start_name;
270 uint32 ptr_password;
271 STRING2 str_password;
273 uint32 ptr_display_name;
274 UNISTR2 uni_display_name;
276 } SVC_Q_CHANGE_SVC_CONFIG;
278 /* SVC_R_CHANGE_SVC_CONFIG */
279 typedef struct r_svc_change_svc_cfg_info
281 uint32 unknown_0; /* */
282 uint32 status; /* return status */
284 } SVC_R_CHANGE_SVC_CONFIG;
287 #endif /* _RPC_SVCCTL_H */