]> git.samba.org - tprouty/samba.git/blob - source/include/rpc_svcctl.h
Added SVC_START_SERVICE rpc. An NT PDC will attempt to start the NETLOGON
[tprouty/samba.git] / source / include / rpc_svcctl.h
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
8    
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.
13    
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.
18    
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.
22 */
23
24 #ifndef _RPC_SVCCTL_H /* _RPC_SVCCTL_H */
25 #define _RPC_SVCCTL_H 
26
27
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_OPEN_SERVICE     0x10
34 #define SVC_START_SERVICE    0x13
35 #define SVC_CLOSE            0x00
36
37
38 /* SVC_Q_OPEN_SC_MAN */
39 typedef struct q_svc_open_sc_man_info
40 {
41         uint32 ptr_srv_name;         /* pointer (to server name?) */
42         UNISTR2 uni_srv_name;        /* unicode server name starting with '\\' */
43
44         uint32 ptr_db_name;         /* pointer (to database name?) */
45         UNISTR2 uni_db_name;        /* unicode database name */
46
47         uint32 des_access;            /* 0x80000004 - SC_MANAGER_xxxx */
48
49 } SVC_Q_OPEN_SC_MAN;
50
51 /* SVC_R_OPEN_SC_MAN */
52 typedef struct r_svc_open_sc_man_info
53 {
54         POLICY_HND pol;
55         uint32 status;             /* return status */
56
57 } SVC_R_OPEN_SC_MAN;
58
59 /* SVC_Q_OPEN_SERVICE */
60 typedef struct q_svc_open_service_info
61 {
62         POLICY_HND scman_pol;
63         UNISTR2 uni_svc_name;        /* unicode service name */
64         uint32 des_access;            /* 0x8000 0001 */
65
66 } SVC_Q_OPEN_SERVICE;
67
68 /* SVC_R_OPEN_SERVICE */
69 typedef struct r_svc_open_service_info
70 {
71         POLICY_HND pol;
72         uint32 status;             /* return status */
73
74 } SVC_R_OPEN_SERVICE;
75
76 #define MAX_SVC_ARGS 4
77
78 /* SVC_Q_START_SERVICE */
79 typedef struct q_svc_start_service_info
80 {
81         POLICY_HND pol;
82
83         uint32 argc;
84         uint32 ptr_argv;
85         uint32 argc2;
86         UNISTR2 argv[MAX_SVC_ARGS];
87
88 } SVC_Q_START_SERVICE;
89
90 /* SVC_R_START_SERVICE */
91 typedef struct r_svc_start_service_info
92 {
93         uint32 status;
94
95 } SVC_R_START_SERVICE;
96
97
98 /* QUERY_SERVICE_CONFIG */
99 typedef struct query_service_config_info
100 {
101         uint32 service_type;
102         uint32 start_type;
103         uint32 error_control;
104         uint32 ptr_bin_path_name; 
105         uint32 ptr_load_order_grp; 
106         uint32 tag_id;
107         uint32 ptr_dependencies;
108         uint32 ptr_service_start_name;
109         uint32 ptr_display_name;
110
111         UNISTR2 uni_bin_path_name;
112         UNISTR2 uni_load_order_grp;
113         UNISTR2 uni_dependencies;
114         UNISTR2 uni_service_start_name;
115         UNISTR2 uni_display_name;
116
117 } QUERY_SERVICE_CONFIG;
118
119 /* SVC_STATUS */
120 typedef struct svc_status_info
121 {
122         uint32 svc_type;
123         uint32 current_state;
124         uint32 controls_accepted;
125         uint32 win32_exit_code;
126         uint32 svc_specific_exit_code;
127         uint32 check_point;
128         uint32 wait_hint;
129
130 } SVC_STATUS;
131
132 /* ENUM_SRVC_STATUS */
133 typedef struct enum_svc_status_info
134 {
135         UNISTR uni_srvc_name;
136         UNISTR uni_disp_name;
137         SVC_STATUS status;
138
139 } ENUM_SRVC_STATUS;
140
141 /* SVC_Q_ENUM_SVCS_STATUS */
142 typedef struct q_svc_enum_svcs_status_info
143 {
144         POLICY_HND pol;
145         uint32 service_type; /* 0x00000030 - win32 | 0x0000000b - driver */
146         uint32 service_state; /* 0x00000003 - state_all */
147         uint32 buf_size; /* max service buffer size */
148         ENUM_HND resume_hnd; /* resume handle */
149
150 } SVC_Q_ENUM_SVCS_STATUS;
151
152 /* SVC_R_ENUM_SVCS_STATUS */
153 typedef struct r_svc_enum_svcs_status_info
154 {
155         uint32 buf_size; /* service buffer size */
156         ENUM_SRVC_STATUS *svcs;
157         uint32 more_buf_size;
158         uint32 num_svcs;
159         ENUM_HND resume_hnd; /* resume handle */
160         uint32 dos_status; /* return status, DOS error code (wow!) */
161
162 } SVC_R_ENUM_SVCS_STATUS;
163
164
165 /* SVC_Q_QUERY_SVC_CONFIG */
166 typedef struct q_svc_query_svc_cfg_info
167 {
168         POLICY_HND pol;
169         uint32 buf_size;
170
171 } SVC_Q_QUERY_SVC_CONFIG;
172
173
174 /* SVC_R_QUERY_SVC_CONFIG */
175 typedef struct r_svc_query_svc_cfg_info
176 {
177         QUERY_SERVICE_CONFIG *cfg;
178         uint32 buf_size;
179         uint32 status;             /* return status */
180
181 } SVC_R_QUERY_SVC_CONFIG;
182
183
184 /* SVC_Q_QUERY_DISP_NAME */
185 typedef struct q_svc_query_disp_name_info
186 {
187         POLICY_HND scman_pol;
188         UNISTR2 uni_svc_name;
189         uint32 buf_size;
190
191 } SVC_Q_QUERY_DISP_NAME;
192
193
194 /* SVC_R_QUERY_DISP_NAME */
195 typedef struct r_svc_query_disp_name_info
196 {
197         UNISTR2 uni_disp_name;
198         uint32 buf_size;
199         uint32 status;
200
201 } SVC_R_QUERY_DISP_NAME;
202
203
204 /* SVC_Q_CLOSE */
205 typedef struct q_svc_close_info
206 {
207         POLICY_HND pol;
208
209 } SVC_Q_CLOSE;
210
211
212
213 /* SVC_R_CLOSE */
214 typedef struct r_svc_close_info
215 {
216         POLICY_HND pol;
217         uint32 status;             /* return status */
218
219 } SVC_R_CLOSE;
220
221
222 #endif /* _RPC_SVCCTL_H */
223