adding "Service Control Manager" commands to rpcclient.
[amitay/samba.git] / source3 / 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_CLOSE            0x00
32
33
34 /* SVC_Q_OPEN_SC_MAN */
35 typedef struct q_svc_open_sc_man_info
36 {
37         uint32 ptr_srv_name;         /* pointer (to server name?) */
38         UNISTR2 uni_srv_name;        /* unicode server name starting with '\\' */
39
40         uint32 ptr_db_name;         /* pointer (to database name?) */
41         UNISTR2 uni_db_name;        /* unicode database name */
42
43         uint32 des_access;            /* 0x80000004 - SC_MANAGER_xxxx */
44
45 } SVC_Q_OPEN_SC_MAN;
46
47 /* SVC_R_OPEN_SC_MAN */
48 typedef struct r_svc_open_sc_man_info
49 {
50         POLICY_HND pol;
51         uint32 status;             /* return status */
52
53 } SVC_R_OPEN_SC_MAN;
54
55 /* SVC_STATUS */
56 typedef struct svc_status_info
57 {
58         uint32 svc_type;
59         uint32 current_state;
60         uint32 controls_accepted;
61         uint32 win32_exit_code;
62         uint32 svc_specific_exit_code;
63         uint32 check_point;
64         uint32 wait_hint;
65
66 } SVC_STATUS;
67
68 /* ENUM_SVC_STATUS */
69 typedef struct enum_svc_status_info
70 {
71         UNISTR uni_srvc_name;
72         UNISTR uni_disp_name;
73         SVC_STATUS status;
74
75 } ENUM_SVC_STATUS;
76
77 /* SVC_Q_ENUM_SVCS_STATUS */
78 typedef struct q_svc_enum_svcs_status_info
79 {
80         POLICY_HND pol;
81         uint32 service_type; /* 0x00000030 - win32 | 0x0000000b - driver */
82         uint32 service_state; /* 0x00000003 - state_all */
83         uint32 buf_size; /* max service buffer size */
84         ENUM_HND resume_hnd; /* resume handle */
85
86 } SVC_Q_ENUM_SVCS_STATUS;
87
88 /* SVC_R_ENUM_SVCS_STATUS */
89 typedef struct r_svc_enum_svcs_status_info
90 {
91         uint32 buf_size; /* service buffer size */
92         ENUM_SVC_STATUS *svcs;
93         uint32 status;             /* return status */
94
95 } SVC_R_ENUM_SVCS_STATUS;
96
97
98 /* SVC_Q_CLOSE */
99 typedef struct q_svc_close_info
100 {
101         POLICY_HND pol;
102
103 } SVC_Q_CLOSE;
104
105
106
107 /* SVC_R_CLOSE */
108 typedef struct r_svc_close_info
109 {
110         POLICY_HND pol;
111         uint32 status;             /* return status */
112
113 } SVC_R_CLOSE;
114
115
116 #endif /* _RPC_SVCCTL_H */
117