summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-14 12:03:18 +0100
committerGünther Deschner <gd@samba.org>2009-01-08 11:18:57 +0100
commit176bbcf90cd890111177aeebce3f0563ac2da584 (patch)
treea088dd6d474d92eff7c19eeab766dd664dbb58e3 /librpc/gen_ndr
parent550c64bef9cfc3f2aca6edcaeaf5e351aa4d8ee0 (diff)
downloadsamba-176bbcf90cd890111177aeebce3f0563ac2da584.tar.gz
samba-176bbcf90cd890111177aeebce3f0563ac2da584.tar.bz2
samba-176bbcf90cd890111177aeebce3f0563ac2da584.zip
svcctl: add svcctl_ConfigLevel from samba 3.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r--librpc/gen_ndr/cli_svcctl.c4
-rw-r--r--librpc/gen_ndr/cli_svcctl.h4
-rw-r--r--librpc/gen_ndr/ndr_svcctl.c37
-rw-r--r--librpc/gen_ndr/ndr_svcctl.h1
-rw-r--r--librpc/gen_ndr/svcctl.h17
5 files changed, 51 insertions, 12 deletions
diff --git a/librpc/gen_ndr/cli_svcctl.c b/librpc/gen_ndr/cli_svcctl.c
index 5784996f27..175a4fe5c5 100644
--- a/librpc/gen_ndr/cli_svcctl.c
+++ b/librpc/gen_ndr/cli_svcctl.c
@@ -1924,7 +1924,7 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli,
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] */,
@@ -1975,7 +1975,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
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)] */,
diff --git a/librpc/gen_ndr/cli_svcctl.h b/librpc/gen_ndr/cli_svcctl.h
index d56663abae..2dcb7447ea 100644
--- a/librpc/gen_ndr/cli_svcctl.h
+++ b/librpc/gen_ndr/cli_svcctl.h
@@ -283,7 +283,7 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli,
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] */,
@@ -291,7 +291,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
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)] */,
diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c
index cdea71f4d4..afbb4fe39d 100644
--- a/librpc/gen_ndr/ndr_svcctl.c
+++ b/librpc/gen_ndr/ndr_svcctl.c
@@ -591,6 +591,31 @@ _PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG
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));
@@ -5285,7 +5310,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *n
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) {
@@ -5313,7 +5338,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *n
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);
@@ -5347,7 +5372,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const
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--;
}
@@ -5372,7 +5397,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *n
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) {
@@ -5404,7 +5429,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n
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");
@@ -5452,7 +5477,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const
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--;
}
diff --git a/librpc/gen_ndr/ndr_svcctl.h b/librpc/gen_ndr/ndr_svcctl.h
index 6a96531058..3108cbd6e3 100644
--- a/librpc/gen_ndr/ndr_svcctl.h
+++ b/librpc/gen_ndr/ndr_svcctl.h
@@ -113,6 +113,7 @@ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_fl
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);
diff --git a/librpc/gen_ndr/svcctl.h b/librpc/gen_ndr/svcctl.h
index 542bddad8b..66be271383 100644
--- a/librpc/gen_ndr/svcctl.h
+++ b/librpc/gen_ndr/svcctl.h
@@ -128,6 +128,19 @@ struct QUERY_SERVICE_CONFIG {
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
{
@@ -723,7 +736,7 @@ struct svcctl_ChangeServiceConfig2W {
struct svcctl_QueryServiceConfig2A {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t info_level;
+ enum svcctl_ConfigLevel info_level;
uint32_t buf_size;
} in;
@@ -739,7 +752,7 @@ struct svcctl_QueryServiceConfig2A {
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;