2 Unix SMB/Netbios implementation.
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 */
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
39 /* SVC_Q_START_SERVICE */
40 #define MAX_SVC_ARGS 10
41 /* SVC_Q_ENUM_SVCS_STATUS */
42 #define MAX_SERVICES 50
44 /* SVC_Q_OPEN_SC_MAN */
45 typedef struct q_svc_open_sc_man_info
47 uint32 ptr_srv_name
; /* pointer (to server name?) */
48 UNISTR2 uni_srv_name
; /* unicode server name starting with '\\' */
50 uint32 ptr_db_name
; /* pointer (to database name?) */
51 UNISTR2 uni_db_name
; /* unicode database name */
53 uint32 des_access
; /* 0x80000004 - SC_MANAGER_xxxx */
57 /* SVC_R_OPEN_SC_MAN */
58 typedef struct r_svc_open_sc_man_info
61 uint32 status
; /* return status */
65 /* SVC_Q_OPEN_SERVICE */
66 typedef struct q_svc_open_service_info
69 UNISTR2 uni_svc_name
; /* unicode service name */
70 uint32 des_access
; /* 0x8000 0001 */
74 /* SVC_R_OPEN_SERVICE */
75 typedef struct r_svc_open_service_info
78 uint32 status
; /* return status */
82 /* SVC_Q_STOP_SERVICE */
83 typedef struct q_svc_stop_service_info
91 /* SVC_R_STOP_SERVICE */
92 typedef struct r_svc_stop_service_info
94 uint32 unknown0
; /* 0x00000020 */
95 uint32 unknown1
; /* 0x00000001 */
96 uint32 unknown2
; /* 0x00000001 */
97 uint32 unknown3
; /* 0x00000000 */
98 uint32 unknown4
; /* 0x00000000 */
99 uint32 unknown5
; /* 0x00000000 */
100 uint32 unknown6
; /* 0x00000000 */
103 } SVC_R_STOP_SERVICE
;
105 /* SVC_Q_START_SERVICE */
106 typedef struct q_svc_start_service_info
113 uint32 ptr_argv
[MAX_SVC_ARGS
];
114 UNISTR2 argv
[MAX_SVC_ARGS
];
116 } SVC_Q_START_SERVICE
;
118 /* SVC_R_START_SERVICE */
119 typedef struct r_svc_start_service_info
123 } SVC_R_START_SERVICE
;
126 /* QUERY_SERVICE_CONFIG */
127 typedef struct query_service_config_info
131 uint32 error_control
;
132 uint32 ptr_bin_path_name
;
133 uint32 ptr_load_order_grp
;
135 uint32 ptr_dependencies
;
136 uint32 ptr_service_start_name
;
137 uint32 ptr_display_name
;
139 UNISTR2 uni_bin_path_name
;
140 UNISTR2 uni_load_order_grp
;
141 UNISTR2 uni_dependencies
;
142 UNISTR2 uni_service_start_name
;
143 UNISTR2 uni_display_name
;
145 } QUERY_SERVICE_CONFIG
;
148 typedef struct svc_status_info
151 uint32 current_state
;
152 uint32 controls_accepted
;
153 uint32 win32_exit_code
;
154 uint32 svc_specific_exit_code
;
160 /* ENUM_SRVC_STATUS */
161 typedef struct enum_svc_status_info
163 UNISTR uni_srvc_name
;
164 UNISTR uni_disp_name
;
169 /* SVC_Q_ENUM_SVCS_STATUS */
170 typedef struct q_svc_enum_svcs_status_info
173 uint32 service_type
; /* 0x00000030 - win32 | 0x0000000b - driver */
174 uint32 service_state
; /* 0x00000003 - state_all */
175 uint32 buf_size
; /* max service buffer size */
176 ENUM_HND resume_hnd
; /* resume handle */
178 } SVC_Q_ENUM_SVCS_STATUS
;
180 /* SVC_R_ENUM_SVCS_STATUS */
181 typedef struct r_svc_enum_svcs_status_info
183 uint32 buf_size
; /* service buffer size */
184 ENUM_SRVC_STATUS
*svcs
;
185 uint32 more_buf_size
;
187 ENUM_HND resume_hnd
; /* resume handle */
188 uint32 dos_status
; /* return status, DOS error code (wow!) */
190 } SVC_R_ENUM_SVCS_STATUS
;
193 /* SVC_Q_QUERY_SVC_CONFIG */
194 typedef struct q_svc_query_svc_cfg_info
199 } SVC_Q_QUERY_SVC_CONFIG
;
202 /* SVC_R_QUERY_SVC_CONFIG */
203 typedef struct r_svc_query_svc_cfg_info
205 QUERY_SERVICE_CONFIG
*cfg
;
207 uint32 status
; /* return status */
209 } SVC_R_QUERY_SVC_CONFIG
;
212 /* SVC_Q_QUERY_DISP_NAME */
213 typedef struct q_svc_query_disp_name_info
215 POLICY_HND scman_pol
;
216 UNISTR2 uni_svc_name
;
219 } SVC_Q_QUERY_DISP_NAME
;
222 /* SVC_R_QUERY_DISP_NAME */
223 typedef struct r_svc_query_disp_name_info
225 UNISTR2 uni_disp_name
;
229 } SVC_R_QUERY_DISP_NAME
;
233 typedef struct q_svc_close_info
242 typedef struct r_svc_close_info
245 uint32 status
; /* return status */
249 /* SVC_Q_CHANGE_SVC_CONFIG */
250 typedef struct q_svc_change_svc_cfg_info
256 uint32 error_control
;
258 uint32 ptr_bin_path_name
;
259 UNISTR2 uni_bin_path_name
;
261 uint32 ptr_load_order_grp
;
262 UNISTR2 uni_load_order_grp
;
266 uint32 ptr_dependencies
;
267 UNISTR2 uni_dependencies
;
269 uint32 ptr_service_start_name
;
270 UNISTR2 uni_service_start_name
;
273 STRING2 str_password
;
275 uint32 ptr_display_name
;
276 UNISTR2 uni_display_name
;
278 } SVC_Q_CHANGE_SVC_CONFIG
;
280 /* SVC_R_CHANGE_SVC_CONFIG */
281 typedef struct r_svc_change_svc_cfg_info
283 uint32 unknown_0
; /* */
284 uint32 status
; /* return status */
286 } SVC_R_CHANGE_SVC_CONFIG
;
289 #endif /* _RPC_SVCCTL_H */