NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t info_level /* [in] */,
+ enum svcctl_ConfigLevel info_level /* [in] */,
uint8_t *buffer /* [out] */,
uint32_t buf_size /* [in] */,
uint32_t *bytes_needed /* [out] [ref] */,
NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t info_level /* [in] */,
+ enum svcctl_ConfigLevel info_level /* [in] */,
uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
uint32_t buf_size /* [in] [range(0,8192)] */,
uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t info_level /* [in] */,
+ enum svcctl_ConfigLevel info_level /* [in] */,
uint8_t *buffer /* [out] */,
uint32_t buf_size /* [in] */,
uint32_t *bytes_needed /* [out] [ref] */,
NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t info_level /* [in] */,
+ enum svcctl_ConfigLevel info_level /* [in] */,
uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
uint32_t buf_size /* [in] [range(0,8192)] */,
uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG, ic);
}
+static enum ndr_err_code ndr_push_svcctl_ConfigLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_ConfigLevel r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_svcctl_ConfigLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ConfigLevel *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case SERVICE_CONFIG_DESCRIPTION: val = "SERVICE_CONFIG_DESCRIPTION"; break;
+ case SERVICE_CONFIG_FAILURE_ACTIONS: val = "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_StatusLevel r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
}
if (flags & NDR_OUT) {
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
+ NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
ZERO_STRUCTP(r->out.bytes_needed);
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "info_level", r->in.info_level);
+ ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
ndr->depth--;
}
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
}
if (flags & NDR_OUT) {
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
+ NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
if (r->in.buf_size < 0 || r->in.buf_size > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "info_level", r->in.info_level);
+ ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
ndr->depth--;
}
enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r);
void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r);
size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, struct smb_iconv_convenience *ic, int flags);
+void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r);
void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r);
void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
const char *displayname;/* [unique,range(0,8192),charset(UTF16)] */
}/* [gensize,public] */;
+enum svcctl_ConfigLevel
+#ifndef USE_UINT_ENUMS
+ {
+ SERVICE_CONFIG_DESCRIPTION=0x00000001,
+ SERVICE_CONFIG_FAILURE_ACTIONS=0x00000002
+}
+#else
+ { __donnot_use_enum_svcctl_ConfigLevel=0x7FFFFFFF}
+#define SERVICE_CONFIG_DESCRIPTION ( 0x00000001 )
+#define SERVICE_CONFIG_FAILURE_ACTIONS ( 0x00000002 )
+#endif
+;
+
enum svcctl_StatusLevel
#ifndef USE_UINT_ENUMS
{
struct svcctl_QueryServiceConfig2A {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t info_level;
+ enum svcctl_ConfigLevel info_level;
uint32_t buf_size;
} in;
struct svcctl_QueryServiceConfig2W {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t info_level;
+ enum svcctl_ConfigLevel info_level;
uint32_t buf_size;/* [range(0,8192)] */
} in;
/*****************/
/* Function 0x26 */
+
+ typedef [v1_enum] enum {
+ SERVICE_CONFIG_DESCRIPTION = 0x00000001,
+ SERVICE_CONFIG_FAILURE_ACTIONS = 0x00000002
+ } svcctl_ConfigLevel;
+
WERROR svcctl_QueryServiceConfig2A(
[in,ref] policy_handle *handle,
- [in] uint32 info_level,
+ [in] svcctl_ConfigLevel info_level,
[out] uint8 buffer[buf_size],
[in] uint32 buf_size,
[out,ref] uint32 *bytes_needed
/* Function 0x27 */
WERROR svcctl_QueryServiceConfig2W(
[in,ref] policy_handle *handle,
- [in] uint32 info_level,
+ [in] svcctl_ConfigLevel info_level,
[out,ref,size_is(buf_size)] uint8 *buffer,
[in] [range(0,8192)] uint32 buf_size,
[out,ref] [range(0,8192)] uint32 *bytes_needed
#define SVCCTL_SVC_ERROR_CRITICAL 0x00000002
#define SVCCTL_SVC_ERROR_SEVERE 0x00000003
-/* QueryServiceConfig2 options */
-#define SERVICE_CONFIG_DESCRIPTION 0x00000001
-#define SERVICE_CONFIG_FAILURE_ACTIONS 0x00000002
-
/* Service Config - values for ServiceType field*/
struct policy_handle h, s;
NTSTATUS status;
- uint32_t info_level = 1;
+ uint32_t info_level = SERVICE_CONFIG_DESCRIPTION;
uint8_t *buffer;
uint32_t buf_size = 0;
uint32_t bytes_needed = 0;