summaryrefslogtreecommitdiff
path: root/source3/include/rpc_svcctl.h
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-23 23:26:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:15 -0500
commit5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c (patch)
tree12142ce30c28b602882cb6c3492dfc5811a7eace /source3/include/rpc_svcctl.h
parent920745f0df024741f28e8557c52187a8db01c5d1 (diff)
downloadsamba-5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c.tar.gz
samba-5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c.tar.bz2
samba-5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c.zip
r6014: rather large change set....
pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
Diffstat (limited to 'source3/include/rpc_svcctl.h')
-rw-r--r--source3/include/rpc_svcctl.h243
1 files changed, 243 insertions, 0 deletions
diff --git a/source3/include/rpc_svcctl.h b/source3/include/rpc_svcctl.h
new file mode 100644
index 0000000000..8006ea0091
--- /dev/null
+++ b/source3/include/rpc_svcctl.h
@@ -0,0 +1,243 @@
+/*
+ Unix SMB/CIFS implementation.
+ SMB parameters and setup
+ Copyright (C) Andrew Tridgell 1992-1997,
+ Copyright (C) Gerald (Jerry) Carter 2005
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _RPC_SVCCTL_H /* _RPC_SVCCTL_H */
+#define _RPC_SVCCTL_H
+
+
+/* svcctl pipe */
+
+#define SVCCTL_CLOSE_SERVICE 0x00
+#define SVCCTL_CONTROL_SERVICE 0x01
+#define SVCCTL_QUERY_STATUS 0x06
+#define SVCCTL_ENUM_DEPENDENT_SERVICES_W 0x0d
+#define SVCCTL_ENUM_SERVICES_STATUS_W 0x0e
+#define SVCCTL_OPEN_SCMANAGER_W 0x0f
+#define SVCCTL_OPEN_SERVICE_W 0x10
+#define SVCCTL_QUERY_SERVICE_CONFIG_W 0x11
+#define SVCCTL_START_SERVICE_W 0x13
+#define SVCCTL_GET_DISPLAY_NAME 0x14
+#define SVCCTL_QUERY_SERVICE_CONFIG2_W 0x27
+
+/* ANSI versions not implemented currently
+#define SVCCTL_ENUM_SERVICES_STATUS_A 0x0e
+#define SVCCTL_OPEN_SCMANAGER_A 0x1b
+*/
+
+/* SERVER_STATUS - type */
+
+#define SVCCTL_TYPE_WIN32 0x00000030
+#define SVCCTL_TYPE_DRIVER 0x0000000f
+
+/* SERVER_STATUS - state */
+#define SVCCTL_STATE_ACTIVE 0x00000001
+#define SVCCTL_STATE_INACTIVE 0x00000002
+#define SVCCTL_STATE_ALL ( SVC_STATE_ACTIVE | SVC_STATE_INACTIVE )
+
+/* SERVER_STATUS - CurrentState */
+
+#define SVCCTL_STOPPED 0x00000001
+#define SVCCTL_START_PENDING 0x00000002
+#define SVCCTL_STOP_PENDING 0x00000003
+#define SVCCTL_RUNNING 0x00000004
+#define SVCCTL_CONTINUE_PENDING 0x00000005
+#define SVCCTL_PAUSE_PENDING 0x00000006
+#define SVCCTL_PAUSED 0x00000007
+
+/* SERVER_STATUS - ControlAccepted */
+
+#define SVCCTL_ACCEPT_STOP 0x00000001
+#define SVCCTL_ACCEPT_PAUSE_CONTINUE 0x00000002
+#define SVCCTL_ACCEPT_SHUTDOWN 0x00000004
+#define SVCCTL_ACCEPT_PARAMCHANGE 0x00000008
+#define SVCCTL_ACCEPT_NETBINDCHANGE 0x00000010
+#define SVCCTL_ACCEPT_HARDWAREPROFILECHANGE 0x00000020
+#define SVCCTL_ACCEPT_POWEREVENT 0x00000040
+
+
+/* utility structures for RPCs */
+
+typedef struct {
+ uint32 type;
+ uint32 state;
+ uint32 controls_accepted;
+ uint32 win32_exit_code;
+ uint32 service_exit_code;
+ uint32 check_point;
+ uint32 wait_hint;
+} SERVICE_STATUS;
+
+typedef struct {
+ UNISTR servicename;
+ UNISTR displayname;
+ SERVICE_STATUS status;
+} ENUM_SERVICES_STATUS;
+
+typedef struct {
+ uint32 service_type;
+ uint32 start_type;
+ uint32 error_control;
+ UNISTR2 *executablepath;
+ UNISTR2 *loadordergroup;
+ uint32 tag_id;
+ UNISTR2 *dependencies;
+ UNISTR2 *startname;
+ UNISTR2 *displayname;
+} SERVICE_CONFIG;
+
+
+/* rpc structures */
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+} SVCCTL_Q_CLOSE_SERVICE;
+
+typedef struct {
+ WERROR status;
+} SVCCTL_R_CLOSE_SERVICE;
+
+/**************************/
+
+typedef struct {
+ uint32 ptr_srv;
+ UNISTR2 servername;
+ uint32 ptr_db;
+ UNISTR2 database;
+ uint32 access_mask;
+} SVCCTL_Q_OPEN_SCMANAGER;
+
+typedef struct {
+ POLICY_HND handle;
+ WERROR status;
+} SVCCTL_R_OPEN_SCMANAGER;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+ UNISTR2 servicename;
+ uint32 display_name_len;
+} SVCCTL_Q_GET_DISPLAY_NAME;
+
+typedef struct {
+ UNISTR2 displayname;
+ uint32 display_name_len;
+ WERROR status;
+} SVCCTL_R_GET_DISPLAY_NAME;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+ UNISTR2 servicename;
+ uint32 access_mask;
+} SVCCTL_Q_OPEN_SERVICE;
+
+typedef struct {
+ POLICY_HND handle;
+ WERROR status;
+} SVCCTL_R_OPEN_SERVICE;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+ uint32 parmcount;
+ UNISTR2_ARRAY parameters;
+} SVCCTL_Q_START_SERVICE;
+
+typedef struct {
+ WERROR status;
+} SVCCTL_R_START_SERVICE;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+ uint32 control;
+} SVCCTL_Q_CONTROL_SERVICE;
+
+typedef struct {
+ SERVICE_STATUS svc_status;
+ WERROR status;
+} SVCCTL_R_CONTROL_SERVICE;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+} SVCCTL_Q_QUERY_STATUS;
+
+typedef struct {
+ SERVICE_STATUS svc_status;
+ WERROR status;
+} SVCCTL_R_QUERY_STATUS;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+ uint32 type;
+ uint32 state;
+ uint32 buffer_size;
+ uint32 *resume;
+} SVCCTL_Q_ENUM_SERVICES_STATUS;
+
+typedef struct {
+ RPC_BUFFER buffer;
+ uint32 needed;
+ uint32 returned;
+ uint32 *resume;
+ WERROR status;
+} SVCCTL_R_ENUM_SERVICES_STATUS;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+ uint32 state;
+ uint32 buffer_size;
+} SVCCTL_Q_ENUM_DEPENDENT_SERVICES;
+
+typedef struct {
+ RPC_BUFFER buffer;
+ uint32 needed;
+ uint32 returned;
+ WERROR status;
+} SVCCTL_R_ENUM_DEPENDENT_SERVICES;
+
+/**************************/
+
+typedef struct {
+ POLICY_HND handle;
+ uint32 buffer_size;
+} SVCCTL_Q_QUERY_SERVICE_CONFIG;
+
+typedef struct {
+ SERVICE_CONFIG config;
+ uint32 needed;
+ WERROR status;
+} SVCCTL_R_QUERY_SERVICE_CONFIG;
+
+#endif /* _RPC_SVCCTL_H */
+