summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-09-20 16:32:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:00:51 -0500
commit66c089acaab90569a0b9597fa320d1b8fc944155 (patch)
tree8c4ac9e736a66c9d084d0914df762ef0d84581ba /source3
parent42c5b3b27bf1efb498dbae343bd7807af537df75 (diff)
downloadsamba-66c089acaab90569a0b9597fa320d1b8fc944155.tar.gz
samba-66c089acaab90569a0b9597fa320d1b8fc944155.tar.bz2
samba-66c089acaab90569a0b9597fa320d1b8fc944155.zip
r18713: Autogenerate srvsvc and svcctl interfaces
(This used to be commit a8aa312b7e597c4fc922a6d1783d5b6d43bceecb)
Diffstat (limited to 'source3')
-rw-r--r--source3/librpc/gen_ndr/cli_srvsvc.c1576
-rw-r--r--source3/librpc/gen_ndr/cli_srvsvc.h58
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.c1310
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.h48
-rw-r--r--source3/librpc/gen_ndr/ndr_srvsvc.c19617
-rw-r--r--source3/librpc/gen_ndr/ndr_srvsvc.h312
-rw-r--r--source3/librpc/gen_ndr/ndr_svcctl.c5682
-rw-r--r--source3/librpc/gen_ndr/ndr_svcctl.h154
-rw-r--r--source3/librpc/gen_ndr/srv_srvsvc.c3286
-rw-r--r--source3/librpc/gen_ndr/srv_srvsvc.h60
-rw-r--r--source3/librpc/gen_ndr/srv_svcctl.c2860
-rw-r--r--source3/librpc/gen_ndr/srv_svcctl.h50
-rw-r--r--source3/librpc/gen_ndr/srvsvc.h1753
-rw-r--r--source3/librpc/gen_ndr/svcctl.h738
-rw-r--r--source3/librpc/idl/srvsvc.idl92
-rw-r--r--source3/librpc/idl/svcctl.idl52
16 files changed, 37580 insertions, 68 deletions
diff --git a/source3/librpc/gen_ndr/cli_srvsvc.c b/source3/librpc/gen_ndr/cli_srvsvc.c
new file mode 100644
index 0000000000..2f9f54557c
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_srvsvc.c
@@ -0,0 +1,1576 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_srvsvc.h"
+
+NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetCharDevEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.ctr = ctr;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *ctr = *r.out.ctr;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t level, union srvsvc_NetCharDevInfo *info)
+{
+ struct srvsvc_NetCharDevGetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.device_name = device_name;
+ r.in.level = level;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevGetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t opcode)
+{
+ struct srvsvc_NetCharDevControl r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.device_name = device_name;
+ r.in.opcode = opcode;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVCONTROL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevControl, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevControl);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetCharDevQEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.user = user;
+ r.in.level = level;
+ r.in.ctr = ctr;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *ctr = *r.out.ctr;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *user, uint32_t level, union srvsvc_NetCharDevQInfo *info)
+{
+ struct srvsvc_NetCharDevQGetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.queue_name = queue_name;
+ r.in.user = user;
+ r.in.level = level;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQGetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t *parm_error)
+{
+ struct srvsvc_NetCharDevQSetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.queue_name = queue_name;
+ r.in.level = level;
+ r.in.info = info;
+ r.in.parm_error = parm_error;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQSETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQSetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQSetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *parm_error = *r.out.parm_error;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name)
+{
+ struct srvsvc_NetCharDevQPurge r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.queue_name = queue_name;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQPURGE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQPurge, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQPurge);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *computer_name)
+{
+ struct srvsvc_NetCharDevQPurgeSelf r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.queue_name = queue_name;
+ r.in.computer_name = computer_name;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQPURGESELF, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQPurgeSelf, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQPurgeSelf);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetConnEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.path = path;
+ r.in.level = level;
+ r.in.ctr = ctr;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCONNENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetConnEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetConnEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *ctr = *r.out.ctr;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetFileEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.path = path;
+ r.in.user = user;
+ r.in.level = level;
+ r.in.ctr = ctr;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETFILEENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFileEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFileEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *ctr = *r.out.ctr;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid, uint32_t level, union srvsvc_NetFileInfo *info)
+{
+ struct srvsvc_NetFileGetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.fid = fid;
+ r.in.level = level;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETFILEGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFileGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFileGetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid)
+{
+ struct srvsvc_NetFileClose r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.fid = fid;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETFILECLOSE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFileClose, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFileClose);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetSessEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.client = client;
+ r.in.user = user;
+ r.in.level = level;
+ r.in.ctr = ctr;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSESSENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSessEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSessEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *ctr = *r.out.ctr;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user)
+{
+ struct srvsvc_NetSessDel r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.client = client;
+ r.in.user = user;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSESSDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSessDel, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSessDel);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error)
+{
+ struct srvsvc_NetShareAdd r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.info = info;
+ r.in.parm_error = parm_error;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREADD, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareAdd, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareAdd);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *parm_error = *r.out.parm_error;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetShareEnumAll r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.ctr = ctr;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREENUMALL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareEnumAll, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareEnumAll);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *ctr = *r.out.ctr;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo *info)
+{
+ struct srvsvc_NetShareGetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.share_name = share_name;
+ r.in.level = level;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareGetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error)
+{
+ struct srvsvc_NetShareSetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.share_name = share_name;
+ r.in.level = level;
+ r.in.info = info;
+ r.in.parm_error = parm_error;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHARESETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareSetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareSetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *parm_error = *r.out.parm_error;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved)
+{
+ struct srvsvc_NetShareDel r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.share_name = share_name;
+ r.in.reserved = reserved;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDel, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDel);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved)
+{
+ struct srvsvc_NetShareDelSticky r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.share_name = share_name;
+ r.in.reserved = reserved;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDELSTICKY, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDelSticky, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDelSticky);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, enum srvsvc_ShareType *type)
+{
+ struct srvsvc_NetShareCheck r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.device_name = device_name;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHARECHECK, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareCheck, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareCheck);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *type = *r.out.type;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo *info)
+{
+ struct srvsvc_NetSrvGetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSRVGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvGetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t *parm_error)
+{
+ struct srvsvc_NetSrvSetInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.info = info;
+ r.in.parm_error = parm_error;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSRVSETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvSetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvSetInfo);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *parm_error = *r.out.parm_error;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetDiskEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.info = info;
+ r.in.maxlen = maxlen;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETDISKENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetDiskEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetDiskEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t level, uint32_t options, struct srvsvc_Statistics *stat)
+{
+ struct srvsvc_NetServerStatisticsGet r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.service = service;
+ r.in.level = level;
+ r.in.options = options;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSERVERSTATISTICSGET, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetServerStatisticsGet, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetServerStatisticsGet);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *stat = *r.out.stat;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info)
+{
+ struct srvsvc_NetTransportAdd r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.info = info;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETTRANSPORTADD, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransportAdd, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransportAdd);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetTransportEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.transports = transports;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETTRANSPORTENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransportEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransportEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *transports = *r.out.transports;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t unknown, struct srvsvc_NetTransportInfo0 transport)
+{
+ struct srvsvc_NetTransportDel r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.unknown = unknown;
+ r.in.transport = transport;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETTRANSPORTDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransportDel, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransportDel);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo *info)
+{
+ struct srvsvc_NetRemoteTOD r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETREMOTETOD, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetRemoteTOD, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetRemoteTOD);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *transport, uint32_t servicebits, uint32_t updateimmediately)
+{
+ struct srvsvc_NetSetServiceBits r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.transport = transport;
+ r.in.servicebits = servicebits;
+ r.in.updateimmediately = updateimmediately;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSETSERVICEBITS, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSetServiceBits, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSetServiceBits);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t pathflags, uint32_t *pathtype)
+{
+ struct srvsvc_NetPathType r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.path = path;
+ r.in.pathflags = pathflags;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPathType, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPATHTYPE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPathType, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPathType);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *pathtype = *r.out.pathtype;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t *can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags)
+{
+ struct srvsvc_NetPathCanonicalize r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.path = path;
+ r.in.maxbuf = maxbuf;
+ r.in.prefix = prefix;
+ r.in.pathtype = pathtype;
+ r.in.pathflags = pathflags;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPATHCANONICALIZE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPathCanonicalize, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPathCanonicalize);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *can_path = *r.out.can_path;
+ *pathtype = *r.out.pathtype;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path1, const char *path2, uint32_t pathtype, uint32_t pathflags)
+{
+ struct srvsvc_NetPathCompare r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.path1 = path1;
+ r.in.path2 = path2;
+ r.in.pathtype = pathtype;
+ r.in.pathflags = pathflags;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPATHCOMPARE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPathCompare, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPathCompare);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name, uint32_t name_type, uint32_t flags)
+{
+ struct srvsvc_NetNameValidate r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.name = name;
+ r.in.name_type = name_type;
+ r.in.flags = flags;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETNAMEVALIDATE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetNameValidate, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetNameValidate);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRPRNAMECANONICALIZE r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRPRNAMECANONICALIZE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRPRNAMECANONICALIZE, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRPRNAMECANONICALIZE);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name1, const char *name2, uint32_t name_type, uint32_t flags)
+{
+ struct srvsvc_NetPRNameCompare r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.name1 = name1;
+ r.in.name2 = name2;
+ r.in.name_type = name_type;
+ r.in.flags = flags;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPRNAMECOMPARE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPRNameCompare, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPRNameCompare);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
+{
+ struct srvsvc_NetShareEnum r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.ctr = ctr;
+ r.in.max_buffer = max_buffer;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareEnum);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *level = *r.out.level;
+ *ctr = *r.out.ctr;
+ *totalentries = *r.out.totalentries;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle *hnd)
+{
+ struct srvsvc_NetShareDelStart r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.share = share;
+ r.in.reserved = reserved;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDELSTART, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDelStart, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDelStart);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *hnd = *r.out.hnd;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd)
+{
+ struct srvsvc_NetShareDelCommit r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.hnd = hnd;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDELCOMMIT, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDelCommit, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDelCommit);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *hnd = *r.out.hnd;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf *sd_buf)
+{
+ struct srvsvc_NetGetFileSecurity r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.share = share;
+ r.in.file = file;
+ r.in.securityinformation = securityinformation;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETGETFILESECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetGetFileSecurity, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetGetFileSecurity);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *sd_buf = *r.out.sd_buf;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf sd_buf)
+{
+ struct srvsvc_NetSetFileSecurity r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.share = share;
+ r.in.file = file;
+ r.in.securityinformation = securityinformation;
+ r.in.sd_buf = sd_buf;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSETFILESECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSetFileSecurity, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSetFileSecurity);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info)
+{
+ struct srvsvc_NetServerTransportAddEx r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.level = level;
+ r.in.info = info;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSERVERTRANSPORTADDEX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetServerTransportAddEx, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetServerTransportAddEx);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *emulated_server_unc, const char *transport, uint32_t servicebitsofinterest, uint32_t servicebits, uint32_t updateimmediately)
+{
+ struct srvsvc_NetServerSetServiceBitsEx r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.emulated_server_unc = emulated_server_unc;
+ r.in.transport = transport;
+ r.in.servicebitsofinterest = servicebitsofinterest;
+ r.in.servicebits = servicebits;
+ r.in.updateimmediately = updateimmediately;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSERVERSETSERVICEBITSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetServerSetServiceBitsEx, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetServerSetServiceBitsEx);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSGETVERSION r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSGETVERSION, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSGETVERSION, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSGETVERSION);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSCREATELOCALPARTITION r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSCREATELOCALPARTITION, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSDELETELOCALPARTITION r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSDELETELOCALPARTITION, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSSETLOCALVOLUMESTATE r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSSETLOCALVOLUMESTATE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSSETSERVERINFO r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSSETSERVERINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSSETSERVERINFO, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSSETSERVERINFO);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSCREATEEXITPOINT r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSCREATEEXITPOINT, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSCREATEEXITPOINT);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSDELETEEXITPOINT r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSDELETEEXITPOINT, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSDELETEEXITPOINT);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSMODIFYPREFIX r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSMODIFYPREFIX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSMODIFYPREFIX, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSMODIFYPREFIX);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSFIXLOCALVOLUME r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSFIXLOCALVOLUME, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRDFSMANAGERREPORTSITEINFO r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSMANAGERREPORTSITEINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct srvsvc_NETRSERVERTRANSPORTDELEX r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRSERVERTRANSPORTDELEX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
diff --git a/source3/librpc/gen_ndr/cli_srvsvc.h b/source3/librpc/gen_ndr/cli_srvsvc.h
new file mode 100644
index 0000000000..5bea6a27b1
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_srvsvc.h
@@ -0,0 +1,58 @@
+#include "librpc/gen_ndr/ndr_srvsvc.h"
+#ifndef __CLI_SRVSVC__
+#define __CLI_SRVSVC__
+NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t level, union srvsvc_NetCharDevInfo *info);
+NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t opcode);
+NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *user, uint32_t level, union srvsvc_NetCharDevQInfo *info);
+NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t *parm_error);
+NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name);
+NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *computer_name);
+NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid, uint32_t level, union srvsvc_NetFileInfo *info);
+NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid);
+NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user);
+NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error);
+NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo *info);
+NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error);
+NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved);
+NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved);
+NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, enum srvsvc_ShareType *type);
+NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo *info);
+NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t *parm_error);
+NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t level, uint32_t options, struct srvsvc_Statistics *stat);
+NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info);
+NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t unknown, struct srvsvc_NetTransportInfo0 transport);
+NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo *info);
+NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *transport, uint32_t servicebits, uint32_t updateimmediately);
+NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t pathflags, uint32_t *pathtype);
+NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t *can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags);
+NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path1, const char *path2, uint32_t pathtype, uint32_t pathflags);
+NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name, uint32_t name_type, uint32_t flags);
+NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name1, const char *name2, uint32_t name_type, uint32_t flags);
+NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle *hnd);
+NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd);
+NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf *sd_buf);
+NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf sd_buf);
+NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info);
+NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *emulated_server_unc, const char *transport, uint32_t servicebitsofinterest, uint32_t servicebits, uint32_t updateimmediately);
+NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+#endif /* __CLI_SRVSVC__ */
diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c
new file mode 100644
index 0000000000..dce4c332ee
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_svcctl.c
@@ -0,0 +1,1310 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_svcctl.h"
+
+NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
+{
+ struct svcctl_CloseServiceHandle r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CLOSESERVICEHANDLE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_CloseServiceHandle, (ndr_push_flags_fn_t)ndr_push_svcctl_CloseServiceHandle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *handle = *r.out.handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t control, struct SERVICE_STATUS *status)
+{
+ struct svcctl_ControlService r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.control = control;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CONTROLSERVICE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ControlService, (ndr_push_flags_fn_t)ndr_push_svcctl_ControlService);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *status = *r.out.status;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
+{
+ struct svcctl_DeleteService r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_DELETESERVICE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_DeleteService, (ndr_push_flags_fn_t)ndr_push_svcctl_DeleteService);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct policy_handle *lock)
+{
+ struct svcctl_LockServiceDatabase r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_LOCKSERVICEDATABASE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_LockServiceDatabase, (ndr_push_flags_fn_t)ndr_push_svcctl_LockServiceDatabase);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *lock = *r.out.lock;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct svcctl_QueryServiceObjectSecurity r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceObjectSecurity, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceObjectSecurity);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct svcctl_SetServiceObjectSecurity r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SetServiceObjectSecurity, (ndr_push_flags_fn_t)ndr_push_svcctl_SetServiceObjectSecurity);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct SERVICE_STATUS *status)
+{
+ struct svcctl_QueryServiceStatus r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICESTATUS, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceStatus, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceStatus);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *status = *r.out.status;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct svcctl_SetServiceStatus r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SETSERVICESTATUS, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SetServiceStatus, (ndr_push_flags_fn_t)ndr_push_svcctl_SetServiceStatus);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *lock)
+{
+ struct svcctl_UnlockServiceDatabase r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.lock = lock;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_UNLOCKSERVICEDATABASE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_UnlockServiceDatabase, (ndr_push_flags_fn_t)ndr_push_svcctl_UnlockServiceDatabase);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *lock = *r.out.lock;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct svcctl_NotifyBootConfigStatus r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_NotifyBootConfigStatus, (ndr_push_flags_fn_t)ndr_push_svcctl_NotifyBootConfigStatus);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate)
+{
+ struct svcctl_SCSetServiceBitsW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.bits = bits;
+ r.in.bitson = bitson;
+ r.in.immediate = immediate;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SCSETSERVICEBITSW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SCSetServiceBitsW, (ndr_push_flags_fn_t)ndr_push_svcctl_SCSetServiceBitsW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name)
+{
+ struct svcctl_ChangeServiceConfigW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.type = type;
+ r.in.start = start;
+ r.in.error = error;
+ r.in.binary_path = binary_path;
+ r.in.load_order_group = load_order_group;
+ r.in.dependencies = dependencies;
+ r.in.service_start_name = service_start_name;
+ r.in.password = password;
+ r.in.display_name = display_name;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIGW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfigW, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfigW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *tag_id = *r.out.tag_id;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle)
+{
+ struct svcctl_CreateServiceW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.scmanager_handle = scmanager_handle;
+ r.in.ServiceName = ServiceName;
+ r.in.DisplayName = DisplayName;
+ r.in.desired_access = desired_access;
+ r.in.type = type;
+ r.in.start_type = start_type;
+ r.in.error_control = error_control;
+ r.in.binary_path = binary_path;
+ r.in.LoadOrderGroupKey = LoadOrderGroupKey;
+ r.in.TagId = TagId;
+ r.in.dependencies = dependencies;
+ r.in.dependencies_size = dependencies_size;
+ r.in.service_start_name = service_start_name;
+ r.in.password = password;
+ r.in.password_size = password_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CREATESERVICEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_CreateServiceW, (ndr_push_flags_fn_t)ndr_push_svcctl_CreateServiceW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *TagId = *r.out.TagId;
+ *handle = *r.out.handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
+{
+ struct svcctl_EnumDependentServicesW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.service = service;
+ r.in.state = state;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumDependentServicesW, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumDependentServicesW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *status = *r.out.status;
+ *bytes_needed = *r.out.bytes_needed;
+ *services_returned = *r.out.services_returned;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle)
+{
+ struct svcctl_EnumServicesStatusW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.type = type;
+ r.in.state = state;
+ r.in.buf_size = buf_size;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMSERVICESSTATUSW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumServicesStatusW, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumServicesStatusW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *service = *r.out.service;
+ *bytes_needed = *r.out.bytes_needed;
+ *services_returned = *r.out.services_returned;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle)
+{
+ struct svcctl_OpenSCManagerW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.MachineName = MachineName;
+ r.in.DatabaseName = DatabaseName;
+ r.in.access_mask = access_mask;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSCMANAGERW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenSCManagerW, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenSCManagerW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *handle = *r.out.handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask, struct policy_handle *handle)
+{
+ struct svcctl_OpenServiceW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.scmanager_handle = scmanager_handle;
+ r.in.ServiceName = ServiceName;
+ r.in.access_mask = access_mask;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSERVICEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenServiceW, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenServiceW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *handle = *r.out.handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed)
+{
+ struct svcctl_QueryServiceConfigW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIGW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfigW, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfigW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *query = *r.out.query;
+ *bytes_needed = *r.out.bytes_needed;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size)
+{
+ struct svcctl_QueryServiceLockStatusW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceLockStatusW, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceLockStatusW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *status = *r.out.status;
+ *required_buf_size = *r.out.required_buf_size;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments)
+{
+ struct svcctl_StartServiceW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.NumArgs = NumArgs;
+ r.in.Arguments = Arguments;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_STARTSERVICEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_StartServiceW, (ndr_push_flags_fn_t)ndr_push_svcctl_StartServiceW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length)
+{
+ struct svcctl_GetServiceDisplayNameW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.service_name = service_name;
+ r.in.display_name_length = display_name_length;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceDisplayNameW, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceDisplayNameW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *display_name = *r.out.display_name;
+ *display_name_length = *r.out.display_name_length;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length)
+{
+ struct svcctl_GetServiceKeyNameW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.service_name = service_name;
+ r.in.display_name_length = display_name_length;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEKEYNAMEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceKeyNameW, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceKeyNameW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *key_name = *r.out.key_name;
+ *display_name_length = *r.out.display_name_length;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate)
+{
+ struct svcctl_SCSetServiceBitsA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.bits = bits;
+ r.in.bitson = bitson;
+ r.in.immediate = immediate;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SCSETSERVICEBITSA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SCSetServiceBitsA, (ndr_push_flags_fn_t)ndr_push_svcctl_SCSetServiceBitsA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name)
+{
+ struct svcctl_ChangeServiceConfigA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.type = type;
+ r.in.start = start;
+ r.in.error = error;
+ r.in.binary_path = binary_path;
+ r.in.load_order_group = load_order_group;
+ r.in.dependencies = dependencies;
+ r.in.service_start_name = service_start_name;
+ r.in.password = password;
+ r.in.display_name = display_name;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIGA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfigA, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfigA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *tag_id = *r.out.tag_id;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, const char *dependencies, const char *service_start_name, const char *password)
+{
+ struct svcctl_CreateServiceA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.ServiceName = ServiceName;
+ r.in.DisplayName = DisplayName;
+ r.in.desired_access = desired_access;
+ r.in.type = type;
+ r.in.start_type = start_type;
+ r.in.error_control = error_control;
+ r.in.binary_path = binary_path;
+ r.in.LoadOrderGroupKey = LoadOrderGroupKey;
+ r.in.dependencies = dependencies;
+ r.in.service_start_name = service_start_name;
+ r.in.password = password;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CREATESERVICEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_CreateServiceA, (ndr_push_flags_fn_t)ndr_push_svcctl_CreateServiceA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *TagId = *r.out.TagId;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
+{
+ struct svcctl_EnumDependentServicesA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.service = service;
+ r.in.state = state;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumDependentServicesA, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumDependentServicesA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *status = *r.out.status;
+ *bytes_needed = *r.out.bytes_needed;
+ *services_returned = *r.out.services_returned;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle)
+{
+ struct svcctl_EnumServicesStatusA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.type = type;
+ r.in.state = state;
+ r.in.buf_size = buf_size;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMSERVICESSTATUSA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumServicesStatusA, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumServicesStatusA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *service = *r.out.service;
+ *bytes_needed = *r.out.bytes_needed;
+ *services_returned = *r.out.services_returned;
+ *resume_handle = *r.out.resume_handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle)
+{
+ struct svcctl_OpenSCManagerA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.MachineName = MachineName;
+ r.in.DatabaseName = DatabaseName;
+ r.in.access_mask = access_mask;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSCMANAGERA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenSCManagerA, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenSCManagerA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *handle = *r.out.handle;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask)
+{
+ struct svcctl_OpenServiceA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.scmanager_handle = scmanager_handle;
+ r.in.ServiceName = ServiceName;
+ r.in.access_mask = access_mask;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSERVICEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenServiceA, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenServiceA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed)
+{
+ struct svcctl_QueryServiceConfigA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIGA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfigA, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfigA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *query = *r.out.query;
+ *bytes_needed = *r.out.bytes_needed;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size)
+{
+ struct svcctl_QueryServiceLockStatusA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceLockStatusA, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceLockStatusA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *status = *r.out.status;
+ *required_buf_size = *r.out.required_buf_size;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments)
+{
+ struct svcctl_StartServiceA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.NumArgs = NumArgs;
+ r.in.Arguments = Arguments;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_STARTSERVICEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_StartServiceA, (ndr_push_flags_fn_t)ndr_push_svcctl_StartServiceA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length)
+{
+ struct svcctl_GetServiceDisplayNameA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.service_name = service_name;
+ r.in.display_name_length = display_name_length;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceDisplayNameA, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceDisplayNameA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *display_name = *r.out.display_name;
+ *display_name_length = *r.out.display_name_length;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length)
+{
+ struct svcctl_GetServiceKeyNameA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.service_name = service_name;
+ r.in.display_name_length = display_name_length;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEKEYNAMEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceKeyNameA, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceKeyNameA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *key_name = *r.out.key_name;
+ *display_name_length = *r.out.display_name_length;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct svcctl_GetCurrentGroupeStateW r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETCURRENTGROUPESTATEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetCurrentGroupeStateW, (ndr_push_flags_fn_t)ndr_push_svcctl_GetCurrentGroupeStateW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct svcctl_EnumServiceGroupW r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMSERVICEGROUPW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumServiceGroupW, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumServiceGroupW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info)
+{
+ struct svcctl_ChangeServiceConfig2A r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.info_level = info_level;
+ r.in.info = info;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIG2A, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfig2A, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfig2A);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info)
+{
+ struct svcctl_ChangeServiceConfig2W r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.info_level = info_level;
+ r.in.info = info;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIG2W, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfig2W, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfig2W);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed)
+{
+ struct svcctl_QueryServiceConfig2A r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.info_level = info_level;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIG2A, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfig2A, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfig2A);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *buffer = *r.out.buffer;
+ *bytes_needed = *r.out.bytes_needed;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed)
+{
+ struct svcctl_QueryServiceConfig2W r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.info_level = info_level;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIG2W, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfig2W, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfig2W);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *buffer = *r.out.buffer;
+ *bytes_needed = *r.out.bytes_needed;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed)
+{
+ struct svcctl_QueryServiceStatusEx r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.info_level = info_level;
+ r.in.buf_size = buf_size;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICESTATUSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceStatusEx, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceStatusEx);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *buffer = *r.out.buffer;
+ *bytes_needed = *r.out.bytes_needed;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name)
+{
+ struct EnumServicesStatusExA r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.scmanager = scmanager;
+ r.in.info_level = info_level;
+ r.in.type = type;
+ r.in.state = state;
+ r.in.buf_size = buf_size;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_ENUMSERVICESSTATUSEXA, &r, (ndr_pull_flags_fn_t)ndr_pull_EnumServicesStatusExA, (ndr_push_flags_fn_t)ndr_push_EnumServicesStatusExA);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *services = *r.out.services;
+ *bytes_needed = *r.out.bytes_needed;
+ *service_returned = *r.out.service_returned;
+ *resume_handle = *r.out.resume_handle;
+ *group_name = *r.out.group_name;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name)
+{
+ struct EnumServicesStatusExW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.scmanager = scmanager;
+ r.in.info_level = info_level;
+ r.in.type = type;
+ r.in.state = state;
+ r.in.buf_size = buf_size;
+ r.in.resume_handle = resume_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_ENUMSERVICESSTATUSEXW, &r, (ndr_pull_flags_fn_t)ndr_pull_EnumServicesStatusExW, (ndr_push_flags_fn_t)ndr_push_EnumServicesStatusExW);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *services = *r.out.services;
+ *bytes_needed = *r.out.bytes_needed;
+ *service_returned = *r.out.service_returned;
+ *resume_handle = *r.out.resume_handle;
+ *group_name = *r.out.group_name;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct svcctl_SCSendTSMessage r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SCSENDTSMESSAGE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SCSendTSMessage, (ndr_push_flags_fn_t)ndr_push_svcctl_SCSendTSMessage);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h
new file mode 100644
index 0000000000..0812427b4c
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_svcctl.h
@@ -0,0 +1,48 @@
+#include "librpc/gen_ndr/ndr_svcctl.h"
+#ifndef __CLI_SVCCTL__
+#define __CLI_SVCCTL__
+NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle);
+NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t control, struct SERVICE_STATUS *status);
+NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle);
+NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct policy_handle *lock);
+NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct SERVICE_STATUS *status);
+NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *lock);
+NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate);
+NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name);
+NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle);
+NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
+NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle);
+NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle);
+NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask, struct policy_handle *handle);
+NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed);
+NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size);
+NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments);
+NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length);
+NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length);
+NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate);
+NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name);
+NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, const char *dependencies, const char *service_start_name, const char *password);
+NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
+NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle);
+NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle);
+NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask);
+NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed);
+NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size);
+NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments);
+NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length);
+NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length);
+NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info);
+NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info);
+NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
+NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
+NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
+NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name);
+NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name);
+NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+#endif /* __CLI_SVCCTL__ */
diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c
new file mode 100644
index 0000000000..8af4c483c8
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_srvsvc.c
@@ -0,0 +1,19617 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_srvsvc.h"
+
+#include "librpc/gen_ndr/ndr_security.h"
+#include "librpc/gen_ndr/ndr_svcctl.h"
+NTSTATUS ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo0 *r)
+{
+ uint32_t _ptr_device;
+ TALLOC_CTX *_mem_save_device_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
+ if (_ptr_device) {
+ NDR_PULL_ALLOC(ndr, r->device);
+ } else {
+ r->device = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
+ if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo0");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "device", r->device);
+ ndr->depth++;
+ if (r->device) {
+ ndr_print_string(ndr, "device", r->device);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
+{
+ uint32_t _ptr_device;
+ TALLOC_CTX *_mem_save_device_0;
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_user_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
+ if (_ptr_device) {
+ NDR_PULL_ALLOC(ndr, r->device);
+ } else {
+ r->device = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
+ if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
+ }
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
+ if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo1");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "device", r->device);
+ ndr->depth++;
+ if (r->device) {
+ ndr_print_string(ndr, "device", r->device);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "status", r->status);
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_string(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "time", r->time);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->info0) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
+ }
+ break;
+
+ case 1:
+ if (r->info1) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_info0_0;
+ TALLOC_CTX *_mem_save_info1_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetCharDevInfo", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_info0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
+ if (_ptr_info0) {
+ NDR_PULL_ALLOC(ndr, r->info0);
+ } else {
+ r->info0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_info1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
+ if (_ptr_info1) {
+ NDR_PULL_ALLOC(ndr, r->info1);
+ } else {
+ r->info1 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->info0) {
+ _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->info1) {
+ _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetCharDevInfo");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "info0", r->info0);
+ ndr->depth++;
+ if (r->info0) {
+ ndr_print_srvsvc_NetCharDevInfo0(ndr, "info0", r->info0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "info1", r->info1);
+ ndr->depth++;
+ if (r->info1) {
+ ndr_print_srvsvc_NetCharDevInfo1(ndr, "info1", r->info1);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_ctr0_0;
+ TALLOC_CTX *_mem_save_ctr1_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetCharDevCtr", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_ctr0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
+ if (_ptr_ctr0) {
+ NDR_PULL_ALLOC(ndr, r->ctr0);
+ } else {
+ r->ctr0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_ctr1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
+ if (_ptr_ctr1) {
+ NDR_PULL_ALLOC(ndr, r->ctr1);
+ } else {
+ r->ctr1 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetCharDevCtr");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "ctr0", r->ctr0);
+ ndr->depth++;
+ if (r->ctr0) {
+ ndr_print_srvsvc_NetCharDevCtr0(ndr, "ctr0", r->ctr0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "ctr1", r->ctr1);
+ ndr->depth++;
+ if (r->ctr1) {
+ ndr_print_srvsvc_NetCharDevCtr1(ndr, "ctr1", r->ctr1);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
+{
+ uint32_t _ptr_device;
+ TALLOC_CTX *_mem_save_device_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
+ if (_ptr_device) {
+ NDR_PULL_ALLOC(ndr, r->device);
+ } else {
+ r->device = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
+ if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo0");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "device", r->device);
+ ndr->depth++;
+ if (r->device) {
+ ndr_print_string(ndr, "device", r->device);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->devices) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devices, ndr_charset_length(r->devices, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
+{
+ uint32_t _ptr_device;
+ TALLOC_CTX *_mem_save_device_0;
+ uint32_t _ptr_devices;
+ TALLOC_CTX *_mem_save_devices_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
+ if (_ptr_device) {
+ NDR_PULL_ALLOC(ndr, r->device);
+ } else {
+ r->device = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devices));
+ if (_ptr_devices) {
+ NDR_PULL_ALLOC(ndr, r->devices);
+ } else {
+ r->devices = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->device) {
+ _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
+ if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
+ }
+ if (r->devices) {
+ _mem_save_devices_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->devices, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->devices));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->devices));
+ if (ndr_get_array_length(ndr, &r->devices) > ndr_get_array_size(ndr, &r->devices)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->devices), ndr_get_array_length(ndr, &r->devices));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devices, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devices_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo1");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "device", r->device);
+ ndr->depth++;
+ if (r->device) {
+ ndr_print_string(ndr, "device", r->device);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "priority", r->priority);
+ ndr_print_ptr(ndr, "devices", r->devices);
+ ndr->depth++;
+ if (r->devices) {
+ ndr_print_string(ndr, "devices", r->devices);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "users", r->users);
+ ndr_print_uint32(ndr, "num_ahead", r->num_ahead);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->info0) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
+ }
+ break;
+
+ case 1:
+ if (r->info1) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_info0_0;
+ TALLOC_CTX *_mem_save_info1_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetCharDevQInfo", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_info0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
+ if (_ptr_info0) {
+ NDR_PULL_ALLOC(ndr, r->info0);
+ } else {
+ r->info0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_info1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
+ if (_ptr_info1) {
+ NDR_PULL_ALLOC(ndr, r->info1);
+ } else {
+ r->info1 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->info0) {
+ _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->info1) {
+ _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQInfo");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "info0", r->info0);
+ ndr->depth++;
+ if (r->info0) {
+ ndr_print_srvsvc_NetCharDevQInfo0(ndr, "info0", r->info0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "info1", r->info1);
+ ndr->depth++;
+ if (r->info1) {
+ ndr_print_srvsvc_NetCharDevQInfo1(ndr, "info1", r->info1);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_ctr0_0;
+ TALLOC_CTX *_mem_save_ctr1_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetCharDevQCtr", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_ctr0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
+ if (_ptr_ctr0) {
+ NDR_PULL_ALLOC(ndr, r->ctr0);
+ } else {
+ r->ctr0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_ctr1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
+ if (_ptr_ctr1) {
+ NDR_PULL_ALLOC(ndr, r->ctr1);
+ } else {
+ r->ctr1 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQCtr");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "ctr0", r->ctr0);
+ ndr->depth++;
+ if (r->ctr0) {
+ ndr_print_srvsvc_NetCharDevQCtr0(ndr, "ctr0", r->ctr0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "ctr1", r->ctr1);
+ ndr->depth++;
+ if (r->ctr1) {
+ ndr_print_srvsvc_NetCharDevQCtr1(ndr, "ctr1", r->ctr1);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetConnInfo0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "conn_id", r->conn_id);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->share) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
+{
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_user_0;
+ uint32_t _ptr_share;
+ TALLOC_CTX *_mem_save_share_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_time));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
+ if (_ptr_share) {
+ NDR_PULL_ALLOC(ndr, r->share);
+ } else {
+ r->share = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
+ if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ if (r->share) {
+ _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
+ if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->share), ndr_get_array_length(ndr, &r->share));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetConnInfo1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "conn_id", r->conn_id);
+ ndr_print_uint32(ndr, "conn_type", r->conn_type);
+ ndr_print_uint32(ndr, "num_open", r->num_open);
+ ndr_print_uint32(ndr, "num_users", r->num_users);
+ ndr_print_uint32(ndr, "conn_time", r->conn_time);
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_string(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "share", r->share);
+ ndr->depth++;
+ if (r->share) {
+ ndr_print_string(ndr, "share", r->share);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_ctr0_0;
+ TALLOC_CTX *_mem_save_ctr1_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetConnCtr", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_ctr0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
+ if (_ptr_ctr0) {
+ NDR_PULL_ALLOC(ndr, r->ctr0);
+ } else {
+ r->ctr0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_ctr1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
+ if (_ptr_ctr1) {
+ NDR_PULL_ALLOC(ndr, r->ctr1);
+ } else {
+ r->ctr1 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "ctr0", r->ctr0);
+ ndr->depth++;
+ if (r->ctr0) {
+ ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "ctr1", r->ctr1);
+ ndr->depth++;
+ if (r->ctr1) {
+ ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetFileInfo2");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "fid", r->fid);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
+{
+ uint32_t _ptr_path;
+ TALLOC_CTX *_mem_save_path_0;
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_user_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_locks));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
+ if (_ptr_path) {
+ NDR_PULL_ALLOC(ndr, r->path);
+ } else {
+ r->path = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->path) {
+ _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
+ if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
+ }
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
+ if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetFileInfo3");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "fid", r->fid);
+ ndr_print_uint32(ndr, "permissions", r->permissions);
+ ndr_print_uint32(ndr, "num_locks", r->num_locks);
+ ndr_print_ptr(ndr, "path", r->path);
+ ndr->depth++;
+ if (r->path) {
+ ndr_print_string(ndr, "path", r->path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_string(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 2:
+ if (r->info2) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
+ }
+ break;
+
+ case 3:
+ if (r->info3) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_info2_0;
+ TALLOC_CTX *_mem_save_info3_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetFileInfo", _level);
+ }
+ switch (level) {
+ case 2: {
+ uint32_t _ptr_info2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
+ if (_ptr_info2) {
+ NDR_PULL_ALLOC(ndr, r->info2);
+ } else {
+ r->info2 = NULL;
+ }
+ break; }
+
+ case 3: {
+ uint32_t _ptr_info3;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
+ if (_ptr_info3) {
+ NDR_PULL_ALLOC(ndr, r->info3);
+ } else {
+ r->info3 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 2:
+ if (r->info2) {
+ _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
+ }
+ break;
+
+ case 3:
+ if (r->info3) {
+ _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetFileInfo");
+ switch (level) {
+ case 2:
+ ndr_print_ptr(ndr, "info2", r->info2);
+ ndr->depth++;
+ if (r->info2) {
+ ndr_print_srvsvc_NetFileInfo2(ndr, "info2", r->info2);
+ }
+ ndr->depth--;
+ break;
+
+ case 3:
+ ndr_print_ptr(ndr, "info3", r->info3);
+ ndr->depth++;
+ if (r->info3) {
+ ndr_print_srvsvc_NetFileInfo3(ndr, "info3", r->info3);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 2:
+ if (r->ctr2) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ }
+ break;
+
+ case 3:
+ if (r->ctr3) {
+ NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_ctr2_0;
+ TALLOC_CTX *_mem_save_ctr3_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetFileCtr", _level);
+ }
+ switch (level) {
+ case 2: {
+ uint32_t _ptr_ctr2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
+ if (_ptr_ctr2) {
+ NDR_PULL_ALLOC(ndr, r->ctr2);
+ } else {
+ r->ctr2 = NULL;
+ }
+ break; }
+
+ case 3: {
+ uint32_t _ptr_ctr3;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
+ if (_ptr_ctr3) {
+ NDR_PULL_ALLOC(ndr, r->ctr3);
+ } else {
+ r->ctr3 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 2:
+ if (r->ctr2) {
+ _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
+ }
+ break;
+
+ case 3:
+ if (r->ctr3) {
+ _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr");
+ switch (level) {
+ case 2:
+ ndr_print_ptr(ndr, "ctr2", r->ctr2);
+ ndr->depth++;
+ if (r->ctr2) {
+ ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2);
+ }
+ ndr->depth--;
+ break;
+
+ case 3:
+ ndr_print_ptr(ndr, "ctr3", r->ctr3);
+ ndr->depth++;
+ if (r->ctr3) {
+ ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
+{
+ uint32_t _ptr_client;
+ TALLOC_CTX *_mem_save_client_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
+ if (_ptr_client) {
+ NDR_PULL_ALLOC(ndr, r->client);
+ } else {
+ r->client = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
+ if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSessInfo0");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "client", r->client);
+ ndr->depth++;
+ if (r->client) {
+ ndr_print_string(ndr, "client", r->client);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
+{
+ uint32_t _ptr_client;
+ TALLOC_CTX *_mem_save_client_0;
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_user_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
+ if (_ptr_client) {
+ NDR_PULL_ALLOC(ndr, r->client);
+ } else {
+ r->client = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
+ if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
+ }
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
+ if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSessInfo1");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "client", r->client);
+ ndr->depth++;
+ if (r->client) {
+ ndr_print_string(ndr, "client", r->client);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_string(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "num_open", r->num_open);
+ ndr_print_uint32(ndr, "time", r->time);
+ ndr_print_uint32(ndr, "idle_time", r->idle_time);
+ ndr_print_uint32(ndr, "user_flags", r->user_flags);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->client_type) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
+{
+ uint32_t _ptr_client;
+ TALLOC_CTX *_mem_save_client_0;
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_user_0;
+ uint32_t _ptr_client_type;
+ TALLOC_CTX *_mem_save_client_type_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
+ if (_ptr_client) {
+ NDR_PULL_ALLOC(ndr, r->client);
+ } else {
+ r->client = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
+ if (_ptr_client_type) {
+ NDR_PULL_ALLOC(ndr, r->client_type);
+ } else {
+ r->client_type = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
+ if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
+ }
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
+ if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ if (r->client_type) {
+ _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
+ if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client_type), ndr_get_array_length(ndr, &r->client_type));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSessInfo2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "client", r->client);
+ ndr->depth++;
+ if (r->client) {
+ ndr_print_string(ndr, "client", r->client);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_string(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "num_open", r->num_open);
+ ndr_print_uint32(ndr, "time", r->time);
+ ndr_print_uint32(ndr, "idle_time", r->idle_time);
+ ndr_print_uint32(ndr, "user_flags", r->user_flags);
+ ndr_print_ptr(ndr, "client_type", r->client_type);
+ ndr->depth++;
+ if (r->client_type) {
+ ndr_print_string(ndr, "client_type", r->client_type);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
+{
+ uint32_t _ptr_client;
+ TALLOC_CTX *_mem_save_client_0;
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_user_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
+ if (_ptr_client) {
+ NDR_PULL_ALLOC(ndr, r->client);
+ } else {
+ r->client = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
+ if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
+ }
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
+ if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSessInfo10");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "client", r->client);
+ ndr->depth++;
+ if (r->client) {
+ ndr_print_string(ndr, "client", r->client);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_string(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "time", r->time);
+ ndr_print_uint32(ndr, "idle_time", r->idle_time);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->client_type) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->transport) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport, ndr_charset_length(r->transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
+{
+ uint32_t _ptr_client;
+ TALLOC_CTX *_mem_save_client_0;
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_user_0;
+ uint32_t _ptr_client_type;
+ TALLOC_CTX *_mem_save_client_type_0;
+ uint32_t _ptr_transport;
+ TALLOC_CTX *_mem_save_transport_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
+ if (_ptr_client) {
+ NDR_PULL_ALLOC(ndr, r->client);
+ } else {
+ r->client = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
+ if (_ptr_client_type) {
+ NDR_PULL_ALLOC(ndr, r->client_type);
+ } else {
+ r->client_type = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
+ if (_ptr_transport) {
+ NDR_PULL_ALLOC(ndr, r->transport);
+ } else {
+ r->transport = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->client) {
+ _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
+ if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
+ }
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
+ if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ if (r->client_type) {
+ _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
+ if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client_type), ndr_get_array_length(ndr, &r->client_type));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
+ }
+ if (r->transport) {
+ _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->transport, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->transport));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->transport));
+ if (ndr_get_array_length(ndr, &r->transport) > ndr_get_array_size(ndr, &r->transport)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->transport), ndr_get_array_length(ndr, &r->transport));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSessInfo502");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "client", r->client);
+ ndr->depth++;
+ if (r->client) {
+ ndr_print_string(ndr, "client", r->client);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_string(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "num_open", r->num_open);
+ ndr_print_uint32(ndr, "time", r->time);
+ ndr_print_uint32(ndr, "idle_time", r->idle_time);
+ ndr_print_uint32(ndr, "user_flags", r->user_flags);
+ ndr_print_ptr(ndr, "client_type", r->client_type);
+ ndr->depth++;
+ if (r->client_type) {
+ ndr_print_string(ndr, "client_type", r->client_type);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "transport", r->transport);
+ ndr->depth++;
+ if (r->transport) {
+ ndr_print_string(ndr, "transport", r->transport);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
+ break;
+
+ case 10:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10));
+ break;
+
+ case 502:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ }
+ break;
+
+ case 2:
+ if (r->ctr2) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ }
+ break;
+
+ case 10:
+ if (r->ctr10) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
+ }
+ break;
+
+ case 502:
+ if (r->ctr502) {
+ NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_ctr0_0;
+ TALLOC_CTX *_mem_save_ctr1_0;
+ TALLOC_CTX *_mem_save_ctr2_0;
+ TALLOC_CTX *_mem_save_ctr10_0;
+ TALLOC_CTX *_mem_save_ctr502_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetSessCtr", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_ctr0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
+ if (_ptr_ctr0) {
+ NDR_PULL_ALLOC(ndr, r->ctr0);
+ } else {
+ r->ctr0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_ctr1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
+ if (_ptr_ctr1) {
+ NDR_PULL_ALLOC(ndr, r->ctr1);
+ } else {
+ r->ctr1 = NULL;
+ }
+ break; }
+
+ case 2: {
+ uint32_t _ptr_ctr2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
+ if (_ptr_ctr2) {
+ NDR_PULL_ALLOC(ndr, r->ctr2);
+ } else {
+ r->ctr2 = NULL;
+ }
+ break; }
+
+ case 10: {
+ uint32_t _ptr_ctr10;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr10));
+ if (_ptr_ctr10) {
+ NDR_PULL_ALLOC(ndr, r->ctr10);
+ } else {
+ r->ctr10 = NULL;
+ }
+ break; }
+
+ case 502: {
+ uint32_t _ptr_ctr502;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
+ if (_ptr_ctr502) {
+ NDR_PULL_ALLOC(ndr, r->ctr502);
+ } else {
+ r->ctr502 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
+ }
+ break;
+
+ case 2:
+ if (r->ctr2) {
+ _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
+ }
+ break;
+
+ case 10:
+ if (r->ctr10) {
+ _mem_save_ctr10_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr10, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr10_0, 0);
+ }
+ break;
+
+ case 502:
+ if (r->ctr502) {
+ _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "ctr0", r->ctr0);
+ ndr->depth++;
+ if (r->ctr0) {
+ ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "ctr1", r->ctr1);
+ ndr->depth++;
+ if (r->ctr1) {
+ ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "ctr2", r->ctr2);
+ ndr->depth++;
+ if (r->ctr2) {
+ ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2);
+ }
+ ndr->depth--;
+ break;
+
+ case 10:
+ ndr_print_ptr(ndr, "ctr10", r->ctr10);
+ ndr->depth++;
+ if (r->ctr10) {
+ ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10);
+ }
+ ndr->depth--;
+ break;
+
+ case 502:
+ ndr_print_ptr(ndr, "ctr502", r->ctr502);
+ ndr->depth++;
+ if (r->ctr502) {
+ ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
+{
+ {
+ uint32_t _flags_save_ENUM = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ ndr->flags = _flags_save_ENUM;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
+{
+ uint32_t v;
+ {
+ uint32_t _flags_save_ENUM = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ ndr->flags = _flags_save_ENUM;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r)
+{
+ const char *val = NULL;
+
+ {
+ uint32_t _flags_save_ENUM = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ switch (r) {
+ case STYPE_DISKTREE: val = "STYPE_DISKTREE"; break;
+ case STYPE_DISKTREE_TEMPORARY: val = "STYPE_DISKTREE_TEMPORARY"; break;
+ case STYPE_DISKTREE_HIDDEN: val = "STYPE_DISKTREE_HIDDEN"; break;
+ case STYPE_PRINTQ: val = "STYPE_PRINTQ"; break;
+ case STYPE_PRINTQ_TEMPORARY: val = "STYPE_PRINTQ_TEMPORARY"; break;
+ case STYPE_PRINTQ_HIDDEN: val = "STYPE_PRINTQ_HIDDEN"; break;
+ case STYPE_DEVICE: val = "STYPE_DEVICE"; break;
+ case STYPE_DEVICE_TEMPORARY: val = "STYPE_DEVICE_TEMPORARY"; break;
+ case STYPE_DEVICE_HIDDEN: val = "STYPE_DEVICE_HIDDEN"; break;
+ case STYPE_IPC: val = "STYPE_IPC"; break;
+ case STYPE_IPC_TEMPORARY: val = "STYPE_IPC_TEMPORARY"; break;
+ case STYPE_IPC_HIDDEN: val = "STYPE_IPC_HIDDEN"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+ ndr->flags = _flags_save_ENUM;
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo0");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_srvsvc_ShareType(ndr, "type", r->type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->password) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ uint32_t _ptr_path;
+ TALLOC_CTX *_mem_save_path_0;
+ uint32_t _ptr_password;
+ TALLOC_CTX *_mem_save_password_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
+ if (_ptr_path) {
+ NDR_PULL_ALLOC(ndr, r->path);
+ } else {
+ r->path = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+ if (_ptr_password) {
+ NDR_PULL_ALLOC(ndr, r->password);
+ } else {
+ r->password = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ if (r->path) {
+ _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
+ if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
+ }
+ if (r->password) {
+ _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
+ if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->password), ndr_get_array_length(ndr, &r->password));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_srvsvc_ShareType(ndr, "type", r->type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "permissions", r->permissions);
+ ndr_print_uint32(ndr, "max_users", r->max_users);
+ ndr_print_uint32(ndr, "current_users", r->current_users);
+ ndr_print_ptr(ndr, "path", r->path);
+ ndr->depth++;
+ if (r->path) {
+ ndr_print_string(ndr, "path", r->path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "password", r->password);
+ ndr->depth++;
+ if (r->password) {
+ ndr_print_string(ndr, "password", r->password);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo501");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_srvsvc_ShareType(ndr, "type", r->type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "csc_policy", r->csc_policy);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
+ NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->max_users));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->password) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->sd) {
+ {
+ struct ndr_push *_ndr_sd;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sd, 4, -1));
+ NDR_CHECK(ndr_push_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sd, 4, -1));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ uint32_t _ptr_path;
+ TALLOC_CTX *_mem_save_path_0;
+ uint32_t _ptr_password;
+ TALLOC_CTX *_mem_save_password_0;
+ uint32_t _ptr_sd;
+ TALLOC_CTX *_mem_save_sd_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
+ NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->max_users));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
+ if (_ptr_path) {
+ NDR_PULL_ALLOC(ndr, r->path);
+ } else {
+ r->path = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+ if (_ptr_password) {
+ NDR_PULL_ALLOC(ndr, r->password);
+ } else {
+ r->password = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
+ if (_ptr_sd) {
+ NDR_PULL_ALLOC(ndr, r->sd);
+ } else {
+ r->sd = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ if (r->path) {
+ _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
+ if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
+ }
+ if (r->password) {
+ _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
+ if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->password), ndr_get_array_length(ndr, &r->password));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+ }
+ if (r->sd) {
+ _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
+ {
+ struct ndr_pull *_ndr_sd;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1));
+ NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo502");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_srvsvc_ShareType(ndr, "type", r->type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "permissions", r->permissions);
+ ndr_print_int32(ndr, "max_users", r->max_users);
+ ndr_print_uint32(ndr, "current_users", r->current_users);
+ ndr_print_ptr(ndr, "path", r->path);
+ ndr->depth++;
+ if (r->path) {
+ ndr_print_string(ndr, "path", r->path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "password", r->password);
+ ndr->depth++;
+ if (r->password) {
+ ndr_print_string(ndr, "password", r->password);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown", r->unknown);
+ ndr_print_ptr(ndr, "sd", r->sd);
+ ndr->depth++;
+ if (r->sd) {
+ ndr_print_security_descriptor(ndr, "sd", r->sd);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
+{
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1004");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1004");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_IN_DFS", SHARE_1005_IN_DFS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_DFS_ROOT", SHARE_1005_DFS_ROOT, r);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1005");
+ ndr->depth++;
+ ndr_print_NetShareInfo1005Flags(ndr, "dfs_flags", r->dfs_flags);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1005");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->max_users));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->max_users));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1006");
+ ndr->depth++;
+ ndr_print_int32(ndr, "max_users", r->max_users);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1006");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->alternate_directory_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alternate_directory_name, ndr_charset_length(r->alternate_directory_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
+{
+ uint32_t _ptr_alternate_directory_name;
+ TALLOC_CTX *_mem_save_alternate_directory_name_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alternate_directory_name));
+ if (_ptr_alternate_directory_name) {
+ NDR_PULL_ALLOC(ndr, r->alternate_directory_name);
+ } else {
+ r->alternate_directory_name = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->alternate_directory_name) {
+ _mem_save_alternate_directory_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->alternate_directory_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->alternate_directory_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->alternate_directory_name));
+ if (ndr_get_array_length(ndr, &r->alternate_directory_name) > ndr_get_array_size(ndr, &r->alternate_directory_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alternate_directory_name), ndr_get_array_length(ndr, &r->alternate_directory_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alternate_directory_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alternate_directory_name, ndr_get_array_length(ndr, &r->alternate_directory_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alternate_directory_name_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1007");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", r->flags);
+ ndr_print_ptr(ndr, "alternate_directory_name", r->alternate_directory_name);
+ ndr->depth++;
+ if (r->alternate_directory_name) {
+ ndr_print_string(ndr, "alternate_directory_name", r->alternate_directory_name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1007");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1501");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
+ break;
+
+ case 501:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501));
+ break;
+
+ case 502:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
+ break;
+
+ case 1004:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004));
+ break;
+
+ case 1005:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
+ break;
+
+ case 1006:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006));
+ break;
+
+ case 1007:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007));
+ break;
+
+ case 1501:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->info0) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
+ }
+ break;
+
+ case 1:
+ if (r->info1) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ }
+ break;
+
+ case 2:
+ if (r->info2) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
+ }
+ break;
+
+ case 501:
+ if (r->info501) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
+ }
+ break;
+
+ case 502:
+ if (r->info502) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
+ }
+ break;
+
+ case 1004:
+ if (r->info1004) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
+ }
+ break;
+
+ case 1005:
+ if (r->info1005) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
+ }
+ break;
+
+ case 1006:
+ if (r->info1006) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
+ }
+ break;
+
+ case 1007:
+ if (r->info1007) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
+ }
+ break;
+
+ case 1501:
+ if (r->info1501) {
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_info0_0;
+ TALLOC_CTX *_mem_save_info1_0;
+ TALLOC_CTX *_mem_save_info2_0;
+ TALLOC_CTX *_mem_save_info501_0;
+ TALLOC_CTX *_mem_save_info502_0;
+ TALLOC_CTX *_mem_save_info1004_0;
+ TALLOC_CTX *_mem_save_info1005_0;
+ TALLOC_CTX *_mem_save_info1006_0;
+ TALLOC_CTX *_mem_save_info1007_0;
+ TALLOC_CTX *_mem_save_info1501_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetShareInfo", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_info0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
+ if (_ptr_info0) {
+ NDR_PULL_ALLOC(ndr, r->info0);
+ } else {
+ r->info0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_info1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
+ if (_ptr_info1) {
+ NDR_PULL_ALLOC(ndr, r->info1);
+ } else {
+ r->info1 = NULL;
+ }
+ break; }
+
+ case 2: {
+ uint32_t _ptr_info2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
+ if (_ptr_info2) {
+ NDR_PULL_ALLOC(ndr, r->info2);
+ } else {
+ r->info2 = NULL;
+ }
+ break; }
+
+ case 501: {
+ uint32_t _ptr_info501;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info501));
+ if (_ptr_info501) {
+ NDR_PULL_ALLOC(ndr, r->info501);
+ } else {
+ r->info501 = NULL;
+ }
+ break; }
+
+ case 502: {
+ uint32_t _ptr_info502;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
+ if (_ptr_info502) {
+ NDR_PULL_ALLOC(ndr, r->info502);
+ } else {
+ r->info502 = NULL;
+ }
+ break; }
+
+ case 1004: {
+ uint32_t _ptr_info1004;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1004));
+ if (_ptr_info1004) {
+ NDR_PULL_ALLOC(ndr, r->info1004);
+ } else {
+ r->info1004 = NULL;
+ }
+ break; }
+
+ case 1005: {
+ uint32_t _ptr_info1005;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
+ if (_ptr_info1005) {
+ NDR_PULL_ALLOC(ndr, r->info1005);
+ } else {
+ r->info1005 = NULL;
+ }
+ break; }
+
+ case 1006: {
+ uint32_t _ptr_info1006;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1006));
+ if (_ptr_info1006) {
+ NDR_PULL_ALLOC(ndr, r->info1006);
+ } else {
+ r->info1006 = NULL;
+ }
+ break; }
+
+ case 1007: {
+ uint32_t _ptr_info1007;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1007));
+ if (_ptr_info1007) {
+ NDR_PULL_ALLOC(ndr, r->info1007);
+ } else {
+ r->info1007 = NULL;
+ }
+ break; }
+
+ case 1501: {
+ uint32_t _ptr_info1501;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
+ if (_ptr_info1501) {
+ NDR_PULL_ALLOC(ndr, r->info1501);
+ } else {
+ r->info1501 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->info0) {
+ _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->info1) {
+ _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
+ }
+ break;
+
+ case 2:
+ if (r->info2) {
+ _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
+ }
+ break;
+
+ case 501:
+ if (r->info501) {
+ _mem_save_info501_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info501, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info501_0, 0);
+ }
+ break;
+
+ case 502:
+ if (r->info502) {
+ _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
+ }
+ break;
+
+ case 1004:
+ if (r->info1004) {
+ _mem_save_info1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1004, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1004_0, 0);
+ }
+ break;
+
+ case 1005:
+ if (r->info1005) {
+ _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
+ }
+ break;
+
+ case 1006:
+ if (r->info1006) {
+ _mem_save_info1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1006, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1006_0, 0);
+ }
+ break;
+
+ case 1007:
+ if (r->info1007) {
+ _mem_save_info1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1007, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1007_0, 0);
+ }
+ break;
+
+ case 1501:
+ if (r->info1501) {
+ _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetShareInfo");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "info0", r->info0);
+ ndr->depth++;
+ if (r->info0) {
+ ndr_print_srvsvc_NetShareInfo0(ndr, "info0", r->info0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "info1", r->info1);
+ ndr->depth++;
+ if (r->info1) {
+ ndr_print_srvsvc_NetShareInfo1(ndr, "info1", r->info1);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "info2", r->info2);
+ ndr->depth++;
+ if (r->info2) {
+ ndr_print_srvsvc_NetShareInfo2(ndr, "info2", r->info2);
+ }
+ ndr->depth--;
+ break;
+
+ case 501:
+ ndr_print_ptr(ndr, "info501", r->info501);
+ ndr->depth++;
+ if (r->info501) {
+ ndr_print_srvsvc_NetShareInfo501(ndr, "info501", r->info501);
+ }
+ ndr->depth--;
+ break;
+
+ case 502:
+ ndr_print_ptr(ndr, "info502", r->info502);
+ ndr->depth++;
+ if (r->info502) {
+ ndr_print_srvsvc_NetShareInfo502(ndr, "info502", r->info502);
+ }
+ ndr->depth--;
+ break;
+
+ case 1004:
+ ndr_print_ptr(ndr, "info1004", r->info1004);
+ ndr->depth++;
+ if (r->info1004) {
+ ndr_print_srvsvc_NetShareInfo1004(ndr, "info1004", r->info1004);
+ }
+ ndr->depth--;
+ break;
+
+ case 1005:
+ ndr_print_ptr(ndr, "info1005", r->info1005);
+ ndr->depth++;
+ if (r->info1005) {
+ ndr_print_srvsvc_NetShareInfo1005(ndr, "info1005", r->info1005);
+ }
+ ndr->depth--;
+ break;
+
+ case 1006:
+ ndr_print_ptr(ndr, "info1006", r->info1006);
+ ndr->depth++;
+ if (r->info1006) {
+ ndr_print_srvsvc_NetShareInfo1006(ndr, "info1006", r->info1006);
+ }
+ ndr->depth--;
+ break;
+
+ case 1007:
+ ndr_print_ptr(ndr, "info1007", r->info1007);
+ ndr->depth++;
+ if (r->info1007) {
+ ndr_print_srvsvc_NetShareInfo1007(ndr, "info1007", r->info1007);
+ }
+ ndr->depth--;
+ break;
+
+ case 1501:
+ ndr_print_ptr(ndr, "info1501", r->info1501);
+ ndr->depth++;
+ if (r->info1501) {
+ ndr_print_sec_desc_buf(ndr, "info1501", r->info1501);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
+ break;
+
+ case 501:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501));
+ break;
+
+ case 502:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
+ break;
+
+ case 1004:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004));
+ break;
+
+ case 1005:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005));
+ break;
+
+ case 1006:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006));
+ break;
+
+ case 1007:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007));
+ break;
+
+ case 1501:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ }
+ break;
+
+ case 2:
+ if (r->ctr2) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ }
+ break;
+
+ case 501:
+ if (r->ctr501) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
+ }
+ break;
+
+ case 502:
+ if (r->ctr502) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
+ }
+ break;
+
+ case 1004:
+ if (r->ctr1004) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
+ }
+ break;
+
+ case 1005:
+ if (r->ctr1005) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
+ }
+ break;
+
+ case 1006:
+ if (r->ctr1006) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
+ }
+ break;
+
+ case 1007:
+ if (r->ctr1007) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
+ }
+ break;
+
+ case 1501:
+ if (r->ctr1501) {
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_ctr0_0;
+ TALLOC_CTX *_mem_save_ctr1_0;
+ TALLOC_CTX *_mem_save_ctr2_0;
+ TALLOC_CTX *_mem_save_ctr501_0;
+ TALLOC_CTX *_mem_save_ctr502_0;
+ TALLOC_CTX *_mem_save_ctr1004_0;
+ TALLOC_CTX *_mem_save_ctr1005_0;
+ TALLOC_CTX *_mem_save_ctr1006_0;
+ TALLOC_CTX *_mem_save_ctr1007_0;
+ TALLOC_CTX *_mem_save_ctr1501_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetShareCtr", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_ctr0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
+ if (_ptr_ctr0) {
+ NDR_PULL_ALLOC(ndr, r->ctr0);
+ } else {
+ r->ctr0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_ctr1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
+ if (_ptr_ctr1) {
+ NDR_PULL_ALLOC(ndr, r->ctr1);
+ } else {
+ r->ctr1 = NULL;
+ }
+ break; }
+
+ case 2: {
+ uint32_t _ptr_ctr2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
+ if (_ptr_ctr2) {
+ NDR_PULL_ALLOC(ndr, r->ctr2);
+ } else {
+ r->ctr2 = NULL;
+ }
+ break; }
+
+ case 501: {
+ uint32_t _ptr_ctr501;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr501));
+ if (_ptr_ctr501) {
+ NDR_PULL_ALLOC(ndr, r->ctr501);
+ } else {
+ r->ctr501 = NULL;
+ }
+ break; }
+
+ case 502: {
+ uint32_t _ptr_ctr502;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
+ if (_ptr_ctr502) {
+ NDR_PULL_ALLOC(ndr, r->ctr502);
+ } else {
+ r->ctr502 = NULL;
+ }
+ break; }
+
+ case 1004: {
+ uint32_t _ptr_ctr1004;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1004));
+ if (_ptr_ctr1004) {
+ NDR_PULL_ALLOC(ndr, r->ctr1004);
+ } else {
+ r->ctr1004 = NULL;
+ }
+ break; }
+
+ case 1005: {
+ uint32_t _ptr_ctr1005;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1005));
+ if (_ptr_ctr1005) {
+ NDR_PULL_ALLOC(ndr, r->ctr1005);
+ } else {
+ r->ctr1005 = NULL;
+ }
+ break; }
+
+ case 1006: {
+ uint32_t _ptr_ctr1006;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1006));
+ if (_ptr_ctr1006) {
+ NDR_PULL_ALLOC(ndr, r->ctr1006);
+ } else {
+ r->ctr1006 = NULL;
+ }
+ break; }
+
+ case 1007: {
+ uint32_t _ptr_ctr1007;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1007));
+ if (_ptr_ctr1007) {
+ NDR_PULL_ALLOC(ndr, r->ctr1007);
+ } else {
+ r->ctr1007 = NULL;
+ }
+ break; }
+
+ case 1501: {
+ uint32_t _ptr_ctr1501;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1501));
+ if (_ptr_ctr1501) {
+ NDR_PULL_ALLOC(ndr, r->ctr1501);
+ } else {
+ r->ctr1501 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
+ }
+ break;
+
+ case 2:
+ if (r->ctr2) {
+ _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
+ }
+ break;
+
+ case 501:
+ if (r->ctr501) {
+ _mem_save_ctr501_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr501, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr501_0, 0);
+ }
+ break;
+
+ case 502:
+ if (r->ctr502) {
+ _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
+ }
+ break;
+
+ case 1004:
+ if (r->ctr1004) {
+ _mem_save_ctr1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1004, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1004_0, 0);
+ }
+ break;
+
+ case 1005:
+ if (r->ctr1005) {
+ _mem_save_ctr1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1005, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1005_0, 0);
+ }
+ break;
+
+ case 1006:
+ if (r->ctr1006) {
+ _mem_save_ctr1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1006, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1006_0, 0);
+ }
+ break;
+
+ case 1007:
+ if (r->ctr1007) {
+ _mem_save_ctr1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1007, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1007_0, 0);
+ }
+ break;
+
+ case 1501:
+ if (r->ctr1501) {
+ _mem_save_ctr1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1501, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1501_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetShareCtr");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "ctr0", r->ctr0);
+ ndr->depth++;
+ if (r->ctr0) {
+ ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "ctr1", r->ctr1);
+ ndr->depth++;
+ if (r->ctr1) {
+ ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "ctr2", r->ctr2);
+ ndr->depth++;
+ if (r->ctr2) {
+ ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2);
+ }
+ ndr->depth--;
+ break;
+
+ case 501:
+ ndr_print_ptr(ndr, "ctr501", r->ctr501);
+ ndr->depth++;
+ if (r->ctr501) {
+ ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501);
+ }
+ ndr->depth--;
+ break;
+
+ case 502:
+ ndr_print_ptr(ndr, "ctr502", r->ctr502);
+ ndr->depth++;
+ if (r->ctr502) {
+ ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502);
+ }
+ ndr->depth--;
+ break;
+
+ case 1004:
+ ndr_print_ptr(ndr, "ctr1004", r->ctr1004);
+ ndr->depth++;
+ if (r->ctr1004) {
+ ndr_print_srvsvc_NetShareCtr1004(ndr, "ctr1004", r->ctr1004);
+ }
+ ndr->depth--;
+ break;
+
+ case 1005:
+ ndr_print_ptr(ndr, "ctr1005", r->ctr1005);
+ ndr->depth++;
+ if (r->ctr1005) {
+ ndr_print_srvsvc_NetShareCtr1005(ndr, "ctr1005", r->ctr1005);
+ }
+ ndr->depth--;
+ break;
+
+ case 1006:
+ ndr_print_ptr(ndr, "ctr1006", r->ctr1006);
+ ndr->depth++;
+ if (r->ctr1006) {
+ ndr_print_srvsvc_NetShareCtr1006(ndr, "ctr1006", r->ctr1006);
+ }
+ ndr->depth--;
+ break;
+
+ case 1007:
+ ndr_print_ptr(ndr, "ctr1007", r->ctr1007);
+ ndr->depth++;
+ if (r->ctr1007) {
+ ndr_print_srvsvc_NetShareCtr1007(ndr, "ctr1007", r->ctr1007);
+ }
+ ndr->depth--;
+ break;
+
+ case 1501:
+ ndr_print_ptr(ndr, "ctr1501", r->ctr1501);
+ ndr->depth++;
+ if (r->ctr1501) {
+ ndr_print_srvsvc_NetShareCtr1501(ndr, "ctr1501", r->ctr1501);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+_PUBLIC_ NTSTATUS ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case PLATFORM_ID_DOS: val = "PLATFORM_ID_DOS"; break;
+ case PLATFORM_ID_OS2: val = "PLATFORM_ID_OS2"; break;
+ case PLATFORM_ID_NT: val = "PLATFORM_ID_NT"; break;
+ case PLATFORM_ID_OSF: val = "PLATFORM_ID_OSF"; break;
+ case PLATFORM_ID_VMS: val = "PLATFORM_ID_VMS"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->server_name);
+ } else {
+ r->server_name = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
+ if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo100");
+ ndr->depth++;
+ ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
+ ndr_print_ptr(ndr, "server_name", r->server_name);
+ ndr->depth++;
+ if (r->server_name) {
+ ndr_print_string(ndr, "server_name", r->server_name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
+ NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->server_name);
+ } else {
+ r->server_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
+ NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
+ if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo101");
+ ndr->depth++;
+ ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
+ ndr_print_ptr(ndr, "server_name", r->server_name);
+ ndr->depth++;
+ if (r->server_name) {
+ ndr_print_string(ndr, "server_name", r->server_name);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "version_major", r->version_major);
+ ndr_print_uint32(ndr, "version_minor", r->version_minor);
+ ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
+ NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->userpath) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->userpath, ndr_charset_length(r->userpath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ uint32_t _ptr_userpath;
+ TALLOC_CTX *_mem_save_userpath_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->server_name);
+ } else {
+ r->server_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
+ NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->licenses));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_userpath));
+ if (_ptr_userpath) {
+ NDR_PULL_ALLOC(ndr, r->userpath);
+ } else {
+ r->userpath = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
+ if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ if (r->userpath) {
+ _mem_save_userpath_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->userpath, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->userpath));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->userpath));
+ if (ndr_get_array_length(ndr, &r->userpath) > ndr_get_array_size(ndr, &r->userpath)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->userpath), ndr_get_array_length(ndr, &r->userpath));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->userpath, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userpath_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo102");
+ ndr->depth++;
+ ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
+ ndr_print_ptr(ndr, "server_name", r->server_name);
+ ndr->depth++;
+ if (r->server_name) {
+ ndr_print_string(ndr, "server_name", r->server_name);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "version_major", r->version_major);
+ ndr_print_uint32(ndr, "version_minor", r->version_minor);
+ ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "users", r->users);
+ ndr_print_uint32(ndr, "disc", r->disc);
+ ndr_print_uint32(ndr, "hidden", r->hidden);
+ ndr_print_uint32(ndr, "announce", r->announce);
+ ndr_print_uint32(ndr, "anndelta", r->anndelta);
+ ndr_print_uint32(ndr, "licenses", r->licenses);
+ ndr_print_ptr(ndr, "userpath", r->userpath);
+ ndr->depth++;
+ if (r->userpath) {
+ ndr_print_string(ndr, "userpath", r->userpath);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->alerts) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->guestaccount) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->srvheuristics) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
+{
+ uint32_t _ptr_alerts;
+ TALLOC_CTX *_mem_save_alerts_0;
+ uint32_t _ptr_guestaccount;
+ TALLOC_CTX *_mem_save_guestaccount_0;
+ uint32_t _ptr_srvheuristics;
+ TALLOC_CTX *_mem_save_srvheuristics_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
+ if (_ptr_alerts) {
+ NDR_PULL_ALLOC(ndr, r->alerts);
+ } else {
+ r->alerts = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
+ if (_ptr_guestaccount) {
+ NDR_PULL_ALLOC(ndr, r->guestaccount);
+ } else {
+ r->guestaccount = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
+ if (_ptr_srvheuristics) {
+ NDR_PULL_ALLOC(ndr, r->srvheuristics);
+ } else {
+ r->srvheuristics = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->alerts) {
+ _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
+ if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alerts), ndr_get_array_length(ndr, &r->alerts));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
+ }
+ if (r->guestaccount) {
+ _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
+ if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->guestaccount), ndr_get_array_length(ndr, &r->guestaccount));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
+ }
+ if (r->srvheuristics) {
+ _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
+ if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->srvheuristics), ndr_get_array_length(ndr, &r->srvheuristics));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo402");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
+ ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
+ ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
+ ndr_print_ptr(ndr, "alerts", r->alerts);
+ ndr->depth++;
+ if (r->alerts) {
+ ndr_print_string(ndr, "alerts", r->alerts);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "security", r->security);
+ ndr_print_uint32(ndr, "numadmin", r->numadmin);
+ ndr_print_uint32(ndr, "lanmask", r->lanmask);
+ ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
+ ndr->depth++;
+ if (r->guestaccount) {
+ ndr_print_string(ndr, "guestaccount", r->guestaccount);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "chdevs", r->chdevs);
+ ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
+ ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
+ ndr_print_uint32(ndr, "connections", r->connections);
+ ndr_print_uint32(ndr, "shares", r->shares);
+ ndr_print_uint32(ndr, "openfiles", r->openfiles);
+ ndr_print_uint32(ndr, "sessopen", r->sessopen);
+ ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
+ ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
+ ndr_print_uint32(ndr, "opensearch", r->opensearch);
+ ndr_print_uint32(ndr, "activelocks", r->activelocks);
+ ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
+ ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
+ ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
+ ndr_print_uint32(ndr, "alertsched", r->alertsched);
+ ndr_print_uint32(ndr, "erroralert", r->erroralert);
+ ndr_print_uint32(ndr, "logonalert", r->logonalert);
+ ndr_print_uint32(ndr, "accessalert", r->accessalert);
+ ndr_print_uint32(ndr, "diskalert", r->diskalert);
+ ndr_print_uint32(ndr, "netioalert", r->netioalert);
+ ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
+ ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
+ ndr->depth++;
+ if (r->srvheuristics) {
+ ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eroralert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->alerts) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->guestaccount) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->srvheuristics) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->autopath) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->autopath, ndr_charset_length(r->autopath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
+{
+ uint32_t _ptr_alerts;
+ TALLOC_CTX *_mem_save_alerts_0;
+ uint32_t _ptr_guestaccount;
+ TALLOC_CTX *_mem_save_guestaccount_0;
+ uint32_t _ptr_srvheuristics;
+ TALLOC_CTX *_mem_save_srvheuristics_0;
+ uint32_t _ptr_autopath;
+ TALLOC_CTX *_mem_save_autopath_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
+ if (_ptr_alerts) {
+ NDR_PULL_ALLOC(ndr, r->alerts);
+ } else {
+ r->alerts = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
+ if (_ptr_guestaccount) {
+ NDR_PULL_ALLOC(ndr, r->guestaccount);
+ } else {
+ r->guestaccount = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eroralert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
+ if (_ptr_srvheuristics) {
+ NDR_PULL_ALLOC(ndr, r->srvheuristics);
+ } else {
+ r->srvheuristics = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditedevents));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditprofile));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_autopath));
+ if (_ptr_autopath) {
+ NDR_PULL_ALLOC(ndr, r->autopath);
+ } else {
+ r->autopath = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->alerts) {
+ _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
+ if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alerts), ndr_get_array_length(ndr, &r->alerts));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
+ }
+ if (r->guestaccount) {
+ _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
+ if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->guestaccount), ndr_get_array_length(ndr, &r->guestaccount));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
+ }
+ if (r->srvheuristics) {
+ _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
+ if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->srvheuristics), ndr_get_array_length(ndr, &r->srvheuristics));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
+ }
+ if (r->autopath) {
+ _mem_save_autopath_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->autopath, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->autopath));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->autopath));
+ if (ndr_get_array_length(ndr, &r->autopath) > ndr_get_array_size(ndr, &r->autopath)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->autopath), ndr_get_array_length(ndr, &r->autopath));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->autopath, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_autopath_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo403");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
+ ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
+ ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
+ ndr_print_ptr(ndr, "alerts", r->alerts);
+ ndr->depth++;
+ if (r->alerts) {
+ ndr_print_string(ndr, "alerts", r->alerts);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "security", r->security);
+ ndr_print_uint32(ndr, "numadmin", r->numadmin);
+ ndr_print_uint32(ndr, "lanmask", r->lanmask);
+ ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
+ ndr->depth++;
+ if (r->guestaccount) {
+ ndr_print_string(ndr, "guestaccount", r->guestaccount);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "chdevs", r->chdevs);
+ ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
+ ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
+ ndr_print_uint32(ndr, "connections", r->connections);
+ ndr_print_uint32(ndr, "shares", r->shares);
+ ndr_print_uint32(ndr, "openfiles", r->openfiles);
+ ndr_print_uint32(ndr, "sessopen", r->sessopen);
+ ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
+ ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
+ ndr_print_uint32(ndr, "opensearch", r->opensearch);
+ ndr_print_uint32(ndr, "activelocks", r->activelocks);
+ ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
+ ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
+ ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
+ ndr_print_uint32(ndr, "alertsched", r->alertsched);
+ ndr_print_uint32(ndr, "eroralert", r->eroralert);
+ ndr_print_uint32(ndr, "logonalert", r->logonalert);
+ ndr_print_uint32(ndr, "accessalert", r->accessalert);
+ ndr_print_uint32(ndr, "diskalert", r->diskalert);
+ ndr_print_uint32(ndr, "netioalert", r->netioalert);
+ ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
+ ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
+ ndr->depth++;
+ if (r->srvheuristics) {
+ ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "auditedevents", r->auditedevents);
+ ndr_print_uint32(ndr, "auditprofile", r->auditprofile);
+ ndr_print_ptr(ndr, "autopath", r->autopath);
+ ndr->depth++;
+ if (r->autopath) {
+ ndr_print_string(ndr, "autopath", r->autopath);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo502");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sessopen", r->sessopen);
+ ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
+ ndr_print_uint32(ndr, "opensearch", r->opensearch);
+ ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
+ ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
+ ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
+ ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
+ ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
+ ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
+ ndr_print_uint32(ndr, "sessusers", r->sessusers);
+ ndr_print_uint32(ndr, "sessconns", r->sessconns);
+ ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
+ ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
+ ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
+ ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
+ ndr_print_uint32(ndr, "timesource", r->timesource);
+ ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
+ ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
+{
+ uint32_t _ptr_domain;
+ TALLOC_CTX *_mem_save_domain_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo503");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sessopen", r->sessopen);
+ ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
+ ndr_print_uint32(ndr, "opensearch", r->opensearch);
+ ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
+ ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
+ ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
+ ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
+ ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
+ ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
+ ndr_print_uint32(ndr, "sessusers", r->sessusers);
+ ndr_print_uint32(ndr, "sessconns", r->sessconns);
+ ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
+ ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
+ ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
+ ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
+ ndr_print_uint32(ndr, "timesource", r->timesource);
+ ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
+ ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
+ ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
+ ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
+ ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
+ ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
+ ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
+ ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
+ ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
+ ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
+ ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
+ ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
+ ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
+ ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
+ ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
+ ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
+ ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
+ ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
+ ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
+ ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
+ ndr_print_uint32(ndr, "enableraw", r->enableraw);
+ ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
+ ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
+ ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
+{
+ uint32_t _ptr_domain;
+ TALLOC_CTX *_mem_save_domain_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo599");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sessopen", r->sessopen);
+ ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
+ ndr_print_uint32(ndr, "opensearch", r->opensearch);
+ ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
+ ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
+ ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
+ ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
+ ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
+ ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
+ ndr_print_uint32(ndr, "sessusers", r->sessusers);
+ ndr_print_uint32(ndr, "sessconns", r->sessconns);
+ ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
+ ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
+ ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
+ ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
+ ndr_print_uint32(ndr, "timesource", r->timesource);
+ ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
+ ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
+ ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
+ ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
+ ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
+ ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
+ ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
+ ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
+ ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
+ ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
+ ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
+ ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
+ ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
+ ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
+ ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
+ ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
+ ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
+ ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
+ ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
+ ndr_print_uint32(ndr, "enableraw", r->enableraw);
+ ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
+ ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
+ ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
+ ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
+ ndr_print_uint32(ndr, "initconntable", r->initconntable);
+ ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
+ ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
+ ndr_print_uint32(ndr, "alertsched", r->alertsched);
+ ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
+ ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
+ ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
+ ndr_print_uint32(ndr, "reserved", r->reserved);
+ ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
+ ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
+ ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
+ ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
+ ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
+{
+ uint32_t _ptr_comment;
+ TALLOC_CTX *_mem_save_comment_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+ if (_ptr_comment) {
+ NDR_PULL_ALLOC(ndr, r->comment);
+ } else {
+ r->comment = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->comment) {
+ _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
+ if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1005");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "comment", r->comment);
+ ndr->depth++;
+ if (r->comment) {
+ ndr_print_string(ndr, "comment", r->comment);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1010");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "disc", r->disc);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1016");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "hidden", r->hidden);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1017");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "announce", r->announce);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1018");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "anndelta", r->anndelta);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1107");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "users", r->users);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1501");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sessopens", r->sessopens);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessvcs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessvcs));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1502");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sessvcs", r->sessvcs);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1503");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "opensearch", r->opensearch);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1506");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1509");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1510");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sessusers", r->sessusers);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesscons));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesscons));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1511");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sesscons", r->sesscons);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1512");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1513");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1514");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1515");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1516");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "timesource", r->timesource);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1518");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1520");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1521");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1522");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1523");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1524");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1525");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1528");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1529");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1530");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1533");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1534");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1535");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1536");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1537");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1538");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1539");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "enableraw", r->enableraw);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1540");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1541");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1542");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1543");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1544");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "initconntable", r->initconntable);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1545");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1546");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1547");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "alertsched", r->alertsched);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1548");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1549");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1550");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1552");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1553");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1554");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1555");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1556");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 100:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
+ break;
+
+ case 101:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
+ break;
+
+ case 102:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
+ break;
+
+ case 402:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info402));
+ break;
+
+ case 403:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info403));
+ break;
+
+ case 502:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
+ break;
+
+ case 503:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info503));
+ break;
+
+ case 599:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info599));
+ break;
+
+ case 1005:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
+ break;
+
+ case 1010:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010));
+ break;
+
+ case 1016:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1016));
+ break;
+
+ case 1017:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1017));
+ break;
+
+ case 1018:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018));
+ break;
+
+ case 1107:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1107));
+ break;
+
+ case 1501:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
+ break;
+
+ case 1502:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1502));
+ break;
+
+ case 1503:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1503));
+ break;
+
+ case 1506:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1506));
+ break;
+
+ case 1509:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1509));
+ break;
+
+ case 1510:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1510));
+ break;
+
+ case 1511:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1511));
+ break;
+
+ case 1512:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1512));
+ break;
+
+ case 1513:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1513));
+ break;
+
+ case 1514:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1514));
+ break;
+
+ case 1515:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1515));
+ break;
+
+ case 1516:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1516));
+ break;
+
+ case 1518:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1518));
+ break;
+
+ case 1520:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1520));
+ break;
+
+ case 1521:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1521));
+ break;
+
+ case 1522:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1522));
+ break;
+
+ case 1523:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1523));
+ break;
+
+ case 1524:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1524));
+ break;
+
+ case 1525:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1525));
+ break;
+
+ case 1528:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1528));
+ break;
+
+ case 1529:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1529));
+ break;
+
+ case 1530:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1530));
+ break;
+
+ case 1533:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1533));
+ break;
+
+ case 1534:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1534));
+ break;
+
+ case 1535:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1535));
+ break;
+
+ case 1536:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1536));
+ break;
+
+ case 1537:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1537));
+ break;
+
+ case 1538:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1538));
+ break;
+
+ case 1539:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1539));
+ break;
+
+ case 1540:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1540));
+ break;
+
+ case 1541:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1541));
+ break;
+
+ case 1542:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1542));
+ break;
+
+ case 1543:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1543));
+ break;
+
+ case 1544:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1544));
+ break;
+
+ case 1545:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1545));
+ break;
+
+ case 1546:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1546));
+ break;
+
+ case 1547:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1547));
+ break;
+
+ case 1548:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1548));
+ break;
+
+ case 1549:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1549));
+ break;
+
+ case 1550:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1550));
+ break;
+
+ case 1552:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1552));
+ break;
+
+ case 1553:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1553));
+ break;
+
+ case 1554:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1554));
+ break;
+
+ case 1555:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1555));
+ break;
+
+ case 1556:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1556));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 100:
+ if (r->info100) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
+ }
+ break;
+
+ case 101:
+ if (r->info101) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
+ }
+ break;
+
+ case 102:
+ if (r->info102) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
+ }
+ break;
+
+ case 402:
+ if (r->info402) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
+ }
+ break;
+
+ case 403:
+ if (r->info403) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
+ }
+ break;
+
+ case 502:
+ if (r->info502) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
+ }
+ break;
+
+ case 503:
+ if (r->info503) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
+ }
+ break;
+
+ case 599:
+ if (r->info599) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
+ }
+ break;
+
+ case 1005:
+ if (r->info1005) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
+ }
+ break;
+
+ case 1010:
+ if (r->info1010) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
+ }
+ break;
+
+ case 1016:
+ if (r->info1016) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
+ }
+ break;
+
+ case 1017:
+ if (r->info1017) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
+ }
+ break;
+
+ case 1018:
+ if (r->info1018) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
+ }
+ break;
+
+ case 1107:
+ if (r->info1107) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
+ }
+ break;
+
+ case 1501:
+ if (r->info1501) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
+ }
+ break;
+
+ case 1502:
+ if (r->info1502) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
+ }
+ break;
+
+ case 1503:
+ if (r->info1503) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
+ }
+ break;
+
+ case 1506:
+ if (r->info1506) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
+ }
+ break;
+
+ case 1509:
+ if (r->info1509) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
+ }
+ break;
+
+ case 1510:
+ if (r->info1510) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
+ }
+ break;
+
+ case 1511:
+ if (r->info1511) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
+ }
+ break;
+
+ case 1512:
+ if (r->info1512) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
+ }
+ break;
+
+ case 1513:
+ if (r->info1513) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
+ }
+ break;
+
+ case 1514:
+ if (r->info1514) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
+ }
+ break;
+
+ case 1515:
+ if (r->info1515) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
+ }
+ break;
+
+ case 1516:
+ if (r->info1516) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
+ }
+ break;
+
+ case 1518:
+ if (r->info1518) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
+ }
+ break;
+
+ case 1520:
+ if (r->info1520) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
+ }
+ break;
+
+ case 1521:
+ if (r->info1521) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
+ }
+ break;
+
+ case 1522:
+ if (r->info1522) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
+ }
+ break;
+
+ case 1523:
+ if (r->info1523) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
+ }
+ break;
+
+ case 1524:
+ if (r->info1524) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
+ }
+ break;
+
+ case 1525:
+ if (r->info1525) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
+ }
+ break;
+
+ case 1528:
+ if (r->info1528) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
+ }
+ break;
+
+ case 1529:
+ if (r->info1529) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
+ }
+ break;
+
+ case 1530:
+ if (r->info1530) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
+ }
+ break;
+
+ case 1533:
+ if (r->info1533) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
+ }
+ break;
+
+ case 1534:
+ if (r->info1534) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
+ }
+ break;
+
+ case 1535:
+ if (r->info1535) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
+ }
+ break;
+
+ case 1536:
+ if (r->info1536) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
+ }
+ break;
+
+ case 1537:
+ if (r->info1537) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
+ }
+ break;
+
+ case 1538:
+ if (r->info1538) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
+ }
+ break;
+
+ case 1539:
+ if (r->info1539) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
+ }
+ break;
+
+ case 1540:
+ if (r->info1540) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
+ }
+ break;
+
+ case 1541:
+ if (r->info1541) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
+ }
+ break;
+
+ case 1542:
+ if (r->info1542) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
+ }
+ break;
+
+ case 1543:
+ if (r->info1543) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
+ }
+ break;
+
+ case 1544:
+ if (r->info1544) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
+ }
+ break;
+
+ case 1545:
+ if (r->info1545) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
+ }
+ break;
+
+ case 1546:
+ if (r->info1546) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
+ }
+ break;
+
+ case 1547:
+ if (r->info1547) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
+ }
+ break;
+
+ case 1548:
+ if (r->info1548) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
+ }
+ break;
+
+ case 1549:
+ if (r->info1549) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
+ }
+ break;
+
+ case 1550:
+ if (r->info1550) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
+ }
+ break;
+
+ case 1552:
+ if (r->info1552) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
+ }
+ break;
+
+ case 1553:
+ if (r->info1553) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
+ }
+ break;
+
+ case 1554:
+ if (r->info1554) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
+ }
+ break;
+
+ case 1555:
+ if (r->info1555) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
+ }
+ break;
+
+ case 1556:
+ if (r->info1556) {
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_info100_0;
+ TALLOC_CTX *_mem_save_info101_0;
+ TALLOC_CTX *_mem_save_info102_0;
+ TALLOC_CTX *_mem_save_info402_0;
+ TALLOC_CTX *_mem_save_info403_0;
+ TALLOC_CTX *_mem_save_info502_0;
+ TALLOC_CTX *_mem_save_info503_0;
+ TALLOC_CTX *_mem_save_info599_0;
+ TALLOC_CTX *_mem_save_info1005_0;
+ TALLOC_CTX *_mem_save_info1010_0;
+ TALLOC_CTX *_mem_save_info1016_0;
+ TALLOC_CTX *_mem_save_info1017_0;
+ TALLOC_CTX *_mem_save_info1018_0;
+ TALLOC_CTX *_mem_save_info1107_0;
+ TALLOC_CTX *_mem_save_info1501_0;
+ TALLOC_CTX *_mem_save_info1502_0;
+ TALLOC_CTX *_mem_save_info1503_0;
+ TALLOC_CTX *_mem_save_info1506_0;
+ TALLOC_CTX *_mem_save_info1509_0;
+ TALLOC_CTX *_mem_save_info1510_0;
+ TALLOC_CTX *_mem_save_info1511_0;
+ TALLOC_CTX *_mem_save_info1512_0;
+ TALLOC_CTX *_mem_save_info1513_0;
+ TALLOC_CTX *_mem_save_info1514_0;
+ TALLOC_CTX *_mem_save_info1515_0;
+ TALLOC_CTX *_mem_save_info1516_0;
+ TALLOC_CTX *_mem_save_info1518_0;
+ TALLOC_CTX *_mem_save_info1520_0;
+ TALLOC_CTX *_mem_save_info1521_0;
+ TALLOC_CTX *_mem_save_info1522_0;
+ TALLOC_CTX *_mem_save_info1523_0;
+ TALLOC_CTX *_mem_save_info1524_0;
+ TALLOC_CTX *_mem_save_info1525_0;
+ TALLOC_CTX *_mem_save_info1528_0;
+ TALLOC_CTX *_mem_save_info1529_0;
+ TALLOC_CTX *_mem_save_info1530_0;
+ TALLOC_CTX *_mem_save_info1533_0;
+ TALLOC_CTX *_mem_save_info1534_0;
+ TALLOC_CTX *_mem_save_info1535_0;
+ TALLOC_CTX *_mem_save_info1536_0;
+ TALLOC_CTX *_mem_save_info1537_0;
+ TALLOC_CTX *_mem_save_info1538_0;
+ TALLOC_CTX *_mem_save_info1539_0;
+ TALLOC_CTX *_mem_save_info1540_0;
+ TALLOC_CTX *_mem_save_info1541_0;
+ TALLOC_CTX *_mem_save_info1542_0;
+ TALLOC_CTX *_mem_save_info1543_0;
+ TALLOC_CTX *_mem_save_info1544_0;
+ TALLOC_CTX *_mem_save_info1545_0;
+ TALLOC_CTX *_mem_save_info1546_0;
+ TALLOC_CTX *_mem_save_info1547_0;
+ TALLOC_CTX *_mem_save_info1548_0;
+ TALLOC_CTX *_mem_save_info1549_0;
+ TALLOC_CTX *_mem_save_info1550_0;
+ TALLOC_CTX *_mem_save_info1552_0;
+ TALLOC_CTX *_mem_save_info1553_0;
+ TALLOC_CTX *_mem_save_info1554_0;
+ TALLOC_CTX *_mem_save_info1555_0;
+ TALLOC_CTX *_mem_save_info1556_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetSrvInfo", _level);
+ }
+ switch (level) {
+ case 100: {
+ uint32_t _ptr_info100;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
+ if (_ptr_info100) {
+ NDR_PULL_ALLOC(ndr, r->info100);
+ } else {
+ r->info100 = NULL;
+ }
+ break; }
+
+ case 101: {
+ uint32_t _ptr_info101;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
+ if (_ptr_info101) {
+ NDR_PULL_ALLOC(ndr, r->info101);
+ } else {
+ r->info101 = NULL;
+ }
+ break; }
+
+ case 102: {
+ uint32_t _ptr_info102;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
+ if (_ptr_info102) {
+ NDR_PULL_ALLOC(ndr, r->info102);
+ } else {
+ r->info102 = NULL;
+ }
+ break; }
+
+ case 402: {
+ uint32_t _ptr_info402;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info402));
+ if (_ptr_info402) {
+ NDR_PULL_ALLOC(ndr, r->info402);
+ } else {
+ r->info402 = NULL;
+ }
+ break; }
+
+ case 403: {
+ uint32_t _ptr_info403;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info403));
+ if (_ptr_info403) {
+ NDR_PULL_ALLOC(ndr, r->info403);
+ } else {
+ r->info403 = NULL;
+ }
+ break; }
+
+ case 502: {
+ uint32_t _ptr_info502;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
+ if (_ptr_info502) {
+ NDR_PULL_ALLOC(ndr, r->info502);
+ } else {
+ r->info502 = NULL;
+ }
+ break; }
+
+ case 503: {
+ uint32_t _ptr_info503;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info503));
+ if (_ptr_info503) {
+ NDR_PULL_ALLOC(ndr, r->info503);
+ } else {
+ r->info503 = NULL;
+ }
+ break; }
+
+ case 599: {
+ uint32_t _ptr_info599;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info599));
+ if (_ptr_info599) {
+ NDR_PULL_ALLOC(ndr, r->info599);
+ } else {
+ r->info599 = NULL;
+ }
+ break; }
+
+ case 1005: {
+ uint32_t _ptr_info1005;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
+ if (_ptr_info1005) {
+ NDR_PULL_ALLOC(ndr, r->info1005);
+ } else {
+ r->info1005 = NULL;
+ }
+ break; }
+
+ case 1010: {
+ uint32_t _ptr_info1010;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1010));
+ if (_ptr_info1010) {
+ NDR_PULL_ALLOC(ndr, r->info1010);
+ } else {
+ r->info1010 = NULL;
+ }
+ break; }
+
+ case 1016: {
+ uint32_t _ptr_info1016;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1016));
+ if (_ptr_info1016) {
+ NDR_PULL_ALLOC(ndr, r->info1016);
+ } else {
+ r->info1016 = NULL;
+ }
+ break; }
+
+ case 1017: {
+ uint32_t _ptr_info1017;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1017));
+ if (_ptr_info1017) {
+ NDR_PULL_ALLOC(ndr, r->info1017);
+ } else {
+ r->info1017 = NULL;
+ }
+ break; }
+
+ case 1018: {
+ uint32_t _ptr_info1018;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1018));
+ if (_ptr_info1018) {
+ NDR_PULL_ALLOC(ndr, r->info1018);
+ } else {
+ r->info1018 = NULL;
+ }
+ break; }
+
+ case 1107: {
+ uint32_t _ptr_info1107;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1107));
+ if (_ptr_info1107) {
+ NDR_PULL_ALLOC(ndr, r->info1107);
+ } else {
+ r->info1107 = NULL;
+ }
+ break; }
+
+ case 1501: {
+ uint32_t _ptr_info1501;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
+ if (_ptr_info1501) {
+ NDR_PULL_ALLOC(ndr, r->info1501);
+ } else {
+ r->info1501 = NULL;
+ }
+ break; }
+
+ case 1502: {
+ uint32_t _ptr_info1502;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1502));
+ if (_ptr_info1502) {
+ NDR_PULL_ALLOC(ndr, r->info1502);
+ } else {
+ r->info1502 = NULL;
+ }
+ break; }
+
+ case 1503: {
+ uint32_t _ptr_info1503;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1503));
+ if (_ptr_info1503) {
+ NDR_PULL_ALLOC(ndr, r->info1503);
+ } else {
+ r->info1503 = NULL;
+ }
+ break; }
+
+ case 1506: {
+ uint32_t _ptr_info1506;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1506));
+ if (_ptr_info1506) {
+ NDR_PULL_ALLOC(ndr, r->info1506);
+ } else {
+ r->info1506 = NULL;
+ }
+ break; }
+
+ case 1509: {
+ uint32_t _ptr_info1509;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1509));
+ if (_ptr_info1509) {
+ NDR_PULL_ALLOC(ndr, r->info1509);
+ } else {
+ r->info1509 = NULL;
+ }
+ break; }
+
+ case 1510: {
+ uint32_t _ptr_info1510;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1510));
+ if (_ptr_info1510) {
+ NDR_PULL_ALLOC(ndr, r->info1510);
+ } else {
+ r->info1510 = NULL;
+ }
+ break; }
+
+ case 1511: {
+ uint32_t _ptr_info1511;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1511));
+ if (_ptr_info1511) {
+ NDR_PULL_ALLOC(ndr, r->info1511);
+ } else {
+ r->info1511 = NULL;
+ }
+ break; }
+
+ case 1512: {
+ uint32_t _ptr_info1512;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1512));
+ if (_ptr_info1512) {
+ NDR_PULL_ALLOC(ndr, r->info1512);
+ } else {
+ r->info1512 = NULL;
+ }
+ break; }
+
+ case 1513: {
+ uint32_t _ptr_info1513;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1513));
+ if (_ptr_info1513) {
+ NDR_PULL_ALLOC(ndr, r->info1513);
+ } else {
+ r->info1513 = NULL;
+ }
+ break; }
+
+ case 1514: {
+ uint32_t _ptr_info1514;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1514));
+ if (_ptr_info1514) {
+ NDR_PULL_ALLOC(ndr, r->info1514);
+ } else {
+ r->info1514 = NULL;
+ }
+ break; }
+
+ case 1515: {
+ uint32_t _ptr_info1515;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1515));
+ if (_ptr_info1515) {
+ NDR_PULL_ALLOC(ndr, r->info1515);
+ } else {
+ r->info1515 = NULL;
+ }
+ break; }
+
+ case 1516: {
+ uint32_t _ptr_info1516;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1516));
+ if (_ptr_info1516) {
+ NDR_PULL_ALLOC(ndr, r->info1516);
+ } else {
+ r->info1516 = NULL;
+ }
+ break; }
+
+ case 1518: {
+ uint32_t _ptr_info1518;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1518));
+ if (_ptr_info1518) {
+ NDR_PULL_ALLOC(ndr, r->info1518);
+ } else {
+ r->info1518 = NULL;
+ }
+ break; }
+
+ case 1520: {
+ uint32_t _ptr_info1520;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1520));
+ if (_ptr_info1520) {
+ NDR_PULL_ALLOC(ndr, r->info1520);
+ } else {
+ r->info1520 = NULL;
+ }
+ break; }
+
+ case 1521: {
+ uint32_t _ptr_info1521;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1521));
+ if (_ptr_info1521) {
+ NDR_PULL_ALLOC(ndr, r->info1521);
+ } else {
+ r->info1521 = NULL;
+ }
+ break; }
+
+ case 1522: {
+ uint32_t _ptr_info1522;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1522));
+ if (_ptr_info1522) {
+ NDR_PULL_ALLOC(ndr, r->info1522);
+ } else {
+ r->info1522 = NULL;
+ }
+ break; }
+
+ case 1523: {
+ uint32_t _ptr_info1523;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1523));
+ if (_ptr_info1523) {
+ NDR_PULL_ALLOC(ndr, r->info1523);
+ } else {
+ r->info1523 = NULL;
+ }
+ break; }
+
+ case 1524: {
+ uint32_t _ptr_info1524;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1524));
+ if (_ptr_info1524) {
+ NDR_PULL_ALLOC(ndr, r->info1524);
+ } else {
+ r->info1524 = NULL;
+ }
+ break; }
+
+ case 1525: {
+ uint32_t _ptr_info1525;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1525));
+ if (_ptr_info1525) {
+ NDR_PULL_ALLOC(ndr, r->info1525);
+ } else {
+ r->info1525 = NULL;
+ }
+ break; }
+
+ case 1528: {
+ uint32_t _ptr_info1528;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1528));
+ if (_ptr_info1528) {
+ NDR_PULL_ALLOC(ndr, r->info1528);
+ } else {
+ r->info1528 = NULL;
+ }
+ break; }
+
+ case 1529: {
+ uint32_t _ptr_info1529;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1529));
+ if (_ptr_info1529) {
+ NDR_PULL_ALLOC(ndr, r->info1529);
+ } else {
+ r->info1529 = NULL;
+ }
+ break; }
+
+ case 1530: {
+ uint32_t _ptr_info1530;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1530));
+ if (_ptr_info1530) {
+ NDR_PULL_ALLOC(ndr, r->info1530);
+ } else {
+ r->info1530 = NULL;
+ }
+ break; }
+
+ case 1533: {
+ uint32_t _ptr_info1533;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1533));
+ if (_ptr_info1533) {
+ NDR_PULL_ALLOC(ndr, r->info1533);
+ } else {
+ r->info1533 = NULL;
+ }
+ break; }
+
+ case 1534: {
+ uint32_t _ptr_info1534;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1534));
+ if (_ptr_info1534) {
+ NDR_PULL_ALLOC(ndr, r->info1534);
+ } else {
+ r->info1534 = NULL;
+ }
+ break; }
+
+ case 1535: {
+ uint32_t _ptr_info1535;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1535));
+ if (_ptr_info1535) {
+ NDR_PULL_ALLOC(ndr, r->info1535);
+ } else {
+ r->info1535 = NULL;
+ }
+ break; }
+
+ case 1536: {
+ uint32_t _ptr_info1536;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1536));
+ if (_ptr_info1536) {
+ NDR_PULL_ALLOC(ndr, r->info1536);
+ } else {
+ r->info1536 = NULL;
+ }
+ break; }
+
+ case 1537: {
+ uint32_t _ptr_info1537;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1537));
+ if (_ptr_info1537) {
+ NDR_PULL_ALLOC(ndr, r->info1537);
+ } else {
+ r->info1537 = NULL;
+ }
+ break; }
+
+ case 1538: {
+ uint32_t _ptr_info1538;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1538));
+ if (_ptr_info1538) {
+ NDR_PULL_ALLOC(ndr, r->info1538);
+ } else {
+ r->info1538 = NULL;
+ }
+ break; }
+
+ case 1539: {
+ uint32_t _ptr_info1539;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1539));
+ if (_ptr_info1539) {
+ NDR_PULL_ALLOC(ndr, r->info1539);
+ } else {
+ r->info1539 = NULL;
+ }
+ break; }
+
+ case 1540: {
+ uint32_t _ptr_info1540;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1540));
+ if (_ptr_info1540) {
+ NDR_PULL_ALLOC(ndr, r->info1540);
+ } else {
+ r->info1540 = NULL;
+ }
+ break; }
+
+ case 1541: {
+ uint32_t _ptr_info1541;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1541));
+ if (_ptr_info1541) {
+ NDR_PULL_ALLOC(ndr, r->info1541);
+ } else {
+ r->info1541 = NULL;
+ }
+ break; }
+
+ case 1542: {
+ uint32_t _ptr_info1542;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1542));
+ if (_ptr_info1542) {
+ NDR_PULL_ALLOC(ndr, r->info1542);
+ } else {
+ r->info1542 = NULL;
+ }
+ break; }
+
+ case 1543: {
+ uint32_t _ptr_info1543;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1543));
+ if (_ptr_info1543) {
+ NDR_PULL_ALLOC(ndr, r->info1543);
+ } else {
+ r->info1543 = NULL;
+ }
+ break; }
+
+ case 1544: {
+ uint32_t _ptr_info1544;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1544));
+ if (_ptr_info1544) {
+ NDR_PULL_ALLOC(ndr, r->info1544);
+ } else {
+ r->info1544 = NULL;
+ }
+ break; }
+
+ case 1545: {
+ uint32_t _ptr_info1545;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1545));
+ if (_ptr_info1545) {
+ NDR_PULL_ALLOC(ndr, r->info1545);
+ } else {
+ r->info1545 = NULL;
+ }
+ break; }
+
+ case 1546: {
+ uint32_t _ptr_info1546;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1546));
+ if (_ptr_info1546) {
+ NDR_PULL_ALLOC(ndr, r->info1546);
+ } else {
+ r->info1546 = NULL;
+ }
+ break; }
+
+ case 1547: {
+ uint32_t _ptr_info1547;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1547));
+ if (_ptr_info1547) {
+ NDR_PULL_ALLOC(ndr, r->info1547);
+ } else {
+ r->info1547 = NULL;
+ }
+ break; }
+
+ case 1548: {
+ uint32_t _ptr_info1548;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1548));
+ if (_ptr_info1548) {
+ NDR_PULL_ALLOC(ndr, r->info1548);
+ } else {
+ r->info1548 = NULL;
+ }
+ break; }
+
+ case 1549: {
+ uint32_t _ptr_info1549;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1549));
+ if (_ptr_info1549) {
+ NDR_PULL_ALLOC(ndr, r->info1549);
+ } else {
+ r->info1549 = NULL;
+ }
+ break; }
+
+ case 1550: {
+ uint32_t _ptr_info1550;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1550));
+ if (_ptr_info1550) {
+ NDR_PULL_ALLOC(ndr, r->info1550);
+ } else {
+ r->info1550 = NULL;
+ }
+ break; }
+
+ case 1552: {
+ uint32_t _ptr_info1552;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1552));
+ if (_ptr_info1552) {
+ NDR_PULL_ALLOC(ndr, r->info1552);
+ } else {
+ r->info1552 = NULL;
+ }
+ break; }
+
+ case 1553: {
+ uint32_t _ptr_info1553;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1553));
+ if (_ptr_info1553) {
+ NDR_PULL_ALLOC(ndr, r->info1553);
+ } else {
+ r->info1553 = NULL;
+ }
+ break; }
+
+ case 1554: {
+ uint32_t _ptr_info1554;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1554));
+ if (_ptr_info1554) {
+ NDR_PULL_ALLOC(ndr, r->info1554);
+ } else {
+ r->info1554 = NULL;
+ }
+ break; }
+
+ case 1555: {
+ uint32_t _ptr_info1555;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1555));
+ if (_ptr_info1555) {
+ NDR_PULL_ALLOC(ndr, r->info1555);
+ } else {
+ r->info1555 = NULL;
+ }
+ break; }
+
+ case 1556: {
+ uint32_t _ptr_info1556;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1556));
+ if (_ptr_info1556) {
+ NDR_PULL_ALLOC(ndr, r->info1556);
+ } else {
+ r->info1556 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 100:
+ if (r->info100) {
+ _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
+ }
+ break;
+
+ case 101:
+ if (r->info101) {
+ _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
+ }
+ break;
+
+ case 102:
+ if (r->info102) {
+ _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
+ }
+ break;
+
+ case 402:
+ if (r->info402) {
+ _mem_save_info402_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info402, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info402_0, 0);
+ }
+ break;
+
+ case 403:
+ if (r->info403) {
+ _mem_save_info403_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info403, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info403_0, 0);
+ }
+ break;
+
+ case 502:
+ if (r->info502) {
+ _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
+ }
+ break;
+
+ case 503:
+ if (r->info503) {
+ _mem_save_info503_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info503, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info503_0, 0);
+ }
+ break;
+
+ case 599:
+ if (r->info599) {
+ _mem_save_info599_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info599, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info599_0, 0);
+ }
+ break;
+
+ case 1005:
+ if (r->info1005) {
+ _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
+ }
+ break;
+
+ case 1010:
+ if (r->info1010) {
+ _mem_save_info1010_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1010, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1010_0, 0);
+ }
+ break;
+
+ case 1016:
+ if (r->info1016) {
+ _mem_save_info1016_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1016, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1016_0, 0);
+ }
+ break;
+
+ case 1017:
+ if (r->info1017) {
+ _mem_save_info1017_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1017, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1017_0, 0);
+ }
+ break;
+
+ case 1018:
+ if (r->info1018) {
+ _mem_save_info1018_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1018, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1018_0, 0);
+ }
+ break;
+
+ case 1107:
+ if (r->info1107) {
+ _mem_save_info1107_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1107, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1107_0, 0);
+ }
+ break;
+
+ case 1501:
+ if (r->info1501) {
+ _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
+ }
+ break;
+
+ case 1502:
+ if (r->info1502) {
+ _mem_save_info1502_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1502, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1502_0, 0);
+ }
+ break;
+
+ case 1503:
+ if (r->info1503) {
+ _mem_save_info1503_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1503, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1503_0, 0);
+ }
+ break;
+
+ case 1506:
+ if (r->info1506) {
+ _mem_save_info1506_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1506, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1506_0, 0);
+ }
+ break;
+
+ case 1509:
+ if (r->info1509) {
+ _mem_save_info1509_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1509, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1509_0, 0);
+ }
+ break;
+
+ case 1510:
+ if (r->info1510) {
+ _mem_save_info1510_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1510, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1510_0, 0);
+ }
+ break;
+
+ case 1511:
+ if (r->info1511) {
+ _mem_save_info1511_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1511, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1511_0, 0);
+ }
+ break;
+
+ case 1512:
+ if (r->info1512) {
+ _mem_save_info1512_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1512, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1512_0, 0);
+ }
+ break;
+
+ case 1513:
+ if (r->info1513) {
+ _mem_save_info1513_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1513, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1513_0, 0);
+ }
+ break;
+
+ case 1514:
+ if (r->info1514) {
+ _mem_save_info1514_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1514, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1514_0, 0);
+ }
+ break;
+
+ case 1515:
+ if (r->info1515) {
+ _mem_save_info1515_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1515, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1515_0, 0);
+ }
+ break;
+
+ case 1516:
+ if (r->info1516) {
+ _mem_save_info1516_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1516, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1516_0, 0);
+ }
+ break;
+
+ case 1518:
+ if (r->info1518) {
+ _mem_save_info1518_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1518, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1518_0, 0);
+ }
+ break;
+
+ case 1520:
+ if (r->info1520) {
+ _mem_save_info1520_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1520, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1520_0, 0);
+ }
+ break;
+
+ case 1521:
+ if (r->info1521) {
+ _mem_save_info1521_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1521, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1521_0, 0);
+ }
+ break;
+
+ case 1522:
+ if (r->info1522) {
+ _mem_save_info1522_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1522, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1522_0, 0);
+ }
+ break;
+
+ case 1523:
+ if (r->info1523) {
+ _mem_save_info1523_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1523, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1523_0, 0);
+ }
+ break;
+
+ case 1524:
+ if (r->info1524) {
+ _mem_save_info1524_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1524, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1524_0, 0);
+ }
+ break;
+
+ case 1525:
+ if (r->info1525) {
+ _mem_save_info1525_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1525, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1525_0, 0);
+ }
+ break;
+
+ case 1528:
+ if (r->info1528) {
+ _mem_save_info1528_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1528, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1528_0, 0);
+ }
+ break;
+
+ case 1529:
+ if (r->info1529) {
+ _mem_save_info1529_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1529, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1529_0, 0);
+ }
+ break;
+
+ case 1530:
+ if (r->info1530) {
+ _mem_save_info1530_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1530, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1530_0, 0);
+ }
+ break;
+
+ case 1533:
+ if (r->info1533) {
+ _mem_save_info1533_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1533, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1533_0, 0);
+ }
+ break;
+
+ case 1534:
+ if (r->info1534) {
+ _mem_save_info1534_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1534, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1534_0, 0);
+ }
+ break;
+
+ case 1535:
+ if (r->info1535) {
+ _mem_save_info1535_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1535, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1535_0, 0);
+ }
+ break;
+
+ case 1536:
+ if (r->info1536) {
+ _mem_save_info1536_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1536, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1536_0, 0);
+ }
+ break;
+
+ case 1537:
+ if (r->info1537) {
+ _mem_save_info1537_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1537, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1537_0, 0);
+ }
+ break;
+
+ case 1538:
+ if (r->info1538) {
+ _mem_save_info1538_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1538, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1538_0, 0);
+ }
+ break;
+
+ case 1539:
+ if (r->info1539) {
+ _mem_save_info1539_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1539, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1539_0, 0);
+ }
+ break;
+
+ case 1540:
+ if (r->info1540) {
+ _mem_save_info1540_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1540, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1540_0, 0);
+ }
+ break;
+
+ case 1541:
+ if (r->info1541) {
+ _mem_save_info1541_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1541, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1541_0, 0);
+ }
+ break;
+
+ case 1542:
+ if (r->info1542) {
+ _mem_save_info1542_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1542, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1542_0, 0);
+ }
+ break;
+
+ case 1543:
+ if (r->info1543) {
+ _mem_save_info1543_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1543, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1543_0, 0);
+ }
+ break;
+
+ case 1544:
+ if (r->info1544) {
+ _mem_save_info1544_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1544, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1544_0, 0);
+ }
+ break;
+
+ case 1545:
+ if (r->info1545) {
+ _mem_save_info1545_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1545, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1545_0, 0);
+ }
+ break;
+
+ case 1546:
+ if (r->info1546) {
+ _mem_save_info1546_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1546, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1546_0, 0);
+ }
+ break;
+
+ case 1547:
+ if (r->info1547) {
+ _mem_save_info1547_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1547, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1547_0, 0);
+ }
+ break;
+
+ case 1548:
+ if (r->info1548) {
+ _mem_save_info1548_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1548, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1548_0, 0);
+ }
+ break;
+
+ case 1549:
+ if (r->info1549) {
+ _mem_save_info1549_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1549, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1549_0, 0);
+ }
+ break;
+
+ case 1550:
+ if (r->info1550) {
+ _mem_save_info1550_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1550, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1550_0, 0);
+ }
+ break;
+
+ case 1552:
+ if (r->info1552) {
+ _mem_save_info1552_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1552, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1552_0, 0);
+ }
+ break;
+
+ case 1553:
+ if (r->info1553) {
+ _mem_save_info1553_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1553, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1553_0, 0);
+ }
+ break;
+
+ case 1554:
+ if (r->info1554) {
+ _mem_save_info1554_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1554, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1554_0, 0);
+ }
+ break;
+
+ case 1555:
+ if (r->info1555) {
+ _mem_save_info1555_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1555, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1555_0, 0);
+ }
+ break;
+
+ case 1556:
+ if (r->info1556) {
+ _mem_save_info1556_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info1556, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1556_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetSrvInfo");
+ switch (level) {
+ case 100:
+ ndr_print_ptr(ndr, "info100", r->info100);
+ ndr->depth++;
+ if (r->info100) {
+ ndr_print_srvsvc_NetSrvInfo100(ndr, "info100", r->info100);
+ }
+ ndr->depth--;
+ break;
+
+ case 101:
+ ndr_print_ptr(ndr, "info101", r->info101);
+ ndr->depth++;
+ if (r->info101) {
+ ndr_print_srvsvc_NetSrvInfo101(ndr, "info101", r->info101);
+ }
+ ndr->depth--;
+ break;
+
+ case 102:
+ ndr_print_ptr(ndr, "info102", r->info102);
+ ndr->depth++;
+ if (r->info102) {
+ ndr_print_srvsvc_NetSrvInfo102(ndr, "info102", r->info102);
+ }
+ ndr->depth--;
+ break;
+
+ case 402:
+ ndr_print_ptr(ndr, "info402", r->info402);
+ ndr->depth++;
+ if (r->info402) {
+ ndr_print_srvsvc_NetSrvInfo402(ndr, "info402", r->info402);
+ }
+ ndr->depth--;
+ break;
+
+ case 403:
+ ndr_print_ptr(ndr, "info403", r->info403);
+ ndr->depth++;
+ if (r->info403) {
+ ndr_print_srvsvc_NetSrvInfo403(ndr, "info403", r->info403);
+ }
+ ndr->depth--;
+ break;
+
+ case 502:
+ ndr_print_ptr(ndr, "info502", r->info502);
+ ndr->depth++;
+ if (r->info502) {
+ ndr_print_srvsvc_NetSrvInfo502(ndr, "info502", r->info502);
+ }
+ ndr->depth--;
+ break;
+
+ case 503:
+ ndr_print_ptr(ndr, "info503", r->info503);
+ ndr->depth++;
+ if (r->info503) {
+ ndr_print_srvsvc_NetSrvInfo503(ndr, "info503", r->info503);
+ }
+ ndr->depth--;
+ break;
+
+ case 599:
+ ndr_print_ptr(ndr, "info599", r->info599);
+ ndr->depth++;
+ if (r->info599) {
+ ndr_print_srvsvc_NetSrvInfo599(ndr, "info599", r->info599);
+ }
+ ndr->depth--;
+ break;
+
+ case 1005:
+ ndr_print_ptr(ndr, "info1005", r->info1005);
+ ndr->depth++;
+ if (r->info1005) {
+ ndr_print_srvsvc_NetSrvInfo1005(ndr, "info1005", r->info1005);
+ }
+ ndr->depth--;
+ break;
+
+ case 1010:
+ ndr_print_ptr(ndr, "info1010", r->info1010);
+ ndr->depth++;
+ if (r->info1010) {
+ ndr_print_srvsvc_NetSrvInfo1010(ndr, "info1010", r->info1010);
+ }
+ ndr->depth--;
+ break;
+
+ case 1016:
+ ndr_print_ptr(ndr, "info1016", r->info1016);
+ ndr->depth++;
+ if (r->info1016) {
+ ndr_print_srvsvc_NetSrvInfo1016(ndr, "info1016", r->info1016);
+ }
+ ndr->depth--;
+ break;
+
+ case 1017:
+ ndr_print_ptr(ndr, "info1017", r->info1017);
+ ndr->depth++;
+ if (r->info1017) {
+ ndr_print_srvsvc_NetSrvInfo1017(ndr, "info1017", r->info1017);
+ }
+ ndr->depth--;
+ break;
+
+ case 1018:
+ ndr_print_ptr(ndr, "info1018", r->info1018);
+ ndr->depth++;
+ if (r->info1018) {
+ ndr_print_srvsvc_NetSrvInfo1018(ndr, "info1018", r->info1018);
+ }
+ ndr->depth--;
+ break;
+
+ case 1107:
+ ndr_print_ptr(ndr, "info1107", r->info1107);
+ ndr->depth++;
+ if (r->info1107) {
+ ndr_print_srvsvc_NetSrvInfo1107(ndr, "info1107", r->info1107);
+ }
+ ndr->depth--;
+ break;
+
+ case 1501:
+ ndr_print_ptr(ndr, "info1501", r->info1501);
+ ndr->depth++;
+ if (r->info1501) {
+ ndr_print_srvsvc_NetSrvInfo1501(ndr, "info1501", r->info1501);
+ }
+ ndr->depth--;
+ break;
+
+ case 1502:
+ ndr_print_ptr(ndr, "info1502", r->info1502);
+ ndr->depth++;
+ if (r->info1502) {
+ ndr_print_srvsvc_NetSrvInfo1502(ndr, "info1502", r->info1502);
+ }
+ ndr->depth--;
+ break;
+
+ case 1503:
+ ndr_print_ptr(ndr, "info1503", r->info1503);
+ ndr->depth++;
+ if (r->info1503) {
+ ndr_print_srvsvc_NetSrvInfo1503(ndr, "info1503", r->info1503);
+ }
+ ndr->depth--;
+ break;
+
+ case 1506:
+ ndr_print_ptr(ndr, "info1506", r->info1506);
+ ndr->depth++;
+ if (r->info1506) {
+ ndr_print_srvsvc_NetSrvInfo1506(ndr, "info1506", r->info1506);
+ }
+ ndr->depth--;
+ break;
+
+ case 1509:
+ ndr_print_ptr(ndr, "info1509", r->info1509);
+ ndr->depth++;
+ if (r->info1509) {
+ ndr_print_srvsvc_NetSrvInfo1509(ndr, "info1509", r->info1509);
+ }
+ ndr->depth--;
+ break;
+
+ case 1510:
+ ndr_print_ptr(ndr, "info1510", r->info1510);
+ ndr->depth++;
+ if (r->info1510) {
+ ndr_print_srvsvc_NetSrvInfo1510(ndr, "info1510", r->info1510);
+ }
+ ndr->depth--;
+ break;
+
+ case 1511:
+ ndr_print_ptr(ndr, "info1511", r->info1511);
+ ndr->depth++;
+ if (r->info1511) {
+ ndr_print_srvsvc_NetSrvInfo1511(ndr, "info1511", r->info1511);
+ }
+ ndr->depth--;
+ break;
+
+ case 1512:
+ ndr_print_ptr(ndr, "info1512", r->info1512);
+ ndr->depth++;
+ if (r->info1512) {
+ ndr_print_srvsvc_NetSrvInfo1512(ndr, "info1512", r->info1512);
+ }
+ ndr->depth--;
+ break;
+
+ case 1513:
+ ndr_print_ptr(ndr, "info1513", r->info1513);
+ ndr->depth++;
+ if (r->info1513) {
+ ndr_print_srvsvc_NetSrvInfo1513(ndr, "info1513", r->info1513);
+ }
+ ndr->depth--;
+ break;
+
+ case 1514:
+ ndr_print_ptr(ndr, "info1514", r->info1514);
+ ndr->depth++;
+ if (r->info1514) {
+ ndr_print_srvsvc_NetSrvInfo1514(ndr, "info1514", r->info1514);
+ }
+ ndr->depth--;
+ break;
+
+ case 1515:
+ ndr_print_ptr(ndr, "info1515", r->info1515);
+ ndr->depth++;
+ if (r->info1515) {
+ ndr_print_srvsvc_NetSrvInfo1515(ndr, "info1515", r->info1515);
+ }
+ ndr->depth--;
+ break;
+
+ case 1516:
+ ndr_print_ptr(ndr, "info1516", r->info1516);
+ ndr->depth++;
+ if (r->info1516) {
+ ndr_print_srvsvc_NetSrvInfo1516(ndr, "info1516", r->info1516);
+ }
+ ndr->depth--;
+ break;
+
+ case 1518:
+ ndr_print_ptr(ndr, "info1518", r->info1518);
+ ndr->depth++;
+ if (r->info1518) {
+ ndr_print_srvsvc_NetSrvInfo1518(ndr, "info1518", r->info1518);
+ }
+ ndr->depth--;
+ break;
+
+ case 1520:
+ ndr_print_ptr(ndr, "info1520", r->info1520);
+ ndr->depth++;
+ if (r->info1520) {
+ ndr_print_srvsvc_NetSrvInfo1520(ndr, "info1520", r->info1520);
+ }
+ ndr->depth--;
+ break;
+
+ case 1521:
+ ndr_print_ptr(ndr, "info1521", r->info1521);
+ ndr->depth++;
+ if (r->info1521) {
+ ndr_print_srvsvc_NetSrvInfo1521(ndr, "info1521", r->info1521);
+ }
+ ndr->depth--;
+ break;
+
+ case 1522:
+ ndr_print_ptr(ndr, "info1522", r->info1522);
+ ndr->depth++;
+ if (r->info1522) {
+ ndr_print_srvsvc_NetSrvInfo1522(ndr, "info1522", r->info1522);
+ }
+ ndr->depth--;
+ break;
+
+ case 1523:
+ ndr_print_ptr(ndr, "info1523", r->info1523);
+ ndr->depth++;
+ if (r->info1523) {
+ ndr_print_srvsvc_NetSrvInfo1523(ndr, "info1523", r->info1523);
+ }
+ ndr->depth--;
+ break;
+
+ case 1524:
+ ndr_print_ptr(ndr, "info1524", r->info1524);
+ ndr->depth++;
+ if (r->info1524) {
+ ndr_print_srvsvc_NetSrvInfo1524(ndr, "info1524", r->info1524);
+ }
+ ndr->depth--;
+ break;
+
+ case 1525:
+ ndr_print_ptr(ndr, "info1525", r->info1525);
+ ndr->depth++;
+ if (r->info1525) {
+ ndr_print_srvsvc_NetSrvInfo1525(ndr, "info1525", r->info1525);
+ }
+ ndr->depth--;
+ break;
+
+ case 1528:
+ ndr_print_ptr(ndr, "info1528", r->info1528);
+ ndr->depth++;
+ if (r->info1528) {
+ ndr_print_srvsvc_NetSrvInfo1528(ndr, "info1528", r->info1528);
+ }
+ ndr->depth--;
+ break;
+
+ case 1529:
+ ndr_print_ptr(ndr, "info1529", r->info1529);
+ ndr->depth++;
+ if (r->info1529) {
+ ndr_print_srvsvc_NetSrvInfo1529(ndr, "info1529", r->info1529);
+ }
+ ndr->depth--;
+ break;
+
+ case 1530:
+ ndr_print_ptr(ndr, "info1530", r->info1530);
+ ndr->depth++;
+ if (r->info1530) {
+ ndr_print_srvsvc_NetSrvInfo1530(ndr, "info1530", r->info1530);
+ }
+ ndr->depth--;
+ break;
+
+ case 1533:
+ ndr_print_ptr(ndr, "info1533", r->info1533);
+ ndr->depth++;
+ if (r->info1533) {
+ ndr_print_srvsvc_NetSrvInfo1533(ndr, "info1533", r->info1533);
+ }
+ ndr->depth--;
+ break;
+
+ case 1534:
+ ndr_print_ptr(ndr, "info1534", r->info1534);
+ ndr->depth++;
+ if (r->info1534) {
+ ndr_print_srvsvc_NetSrvInfo1534(ndr, "info1534", r->info1534);
+ }
+ ndr->depth--;
+ break;
+
+ case 1535:
+ ndr_print_ptr(ndr, "info1535", r->info1535);
+ ndr->depth++;
+ if (r->info1535) {
+ ndr_print_srvsvc_NetSrvInfo1535(ndr, "info1535", r->info1535);
+ }
+ ndr->depth--;
+ break;
+
+ case 1536:
+ ndr_print_ptr(ndr, "info1536", r->info1536);
+ ndr->depth++;
+ if (r->info1536) {
+ ndr_print_srvsvc_NetSrvInfo1536(ndr, "info1536", r->info1536);
+ }
+ ndr->depth--;
+ break;
+
+ case 1537:
+ ndr_print_ptr(ndr, "info1537", r->info1537);
+ ndr->depth++;
+ if (r->info1537) {
+ ndr_print_srvsvc_NetSrvInfo1537(ndr, "info1537", r->info1537);
+ }
+ ndr->depth--;
+ break;
+
+ case 1538:
+ ndr_print_ptr(ndr, "info1538", r->info1538);
+ ndr->depth++;
+ if (r->info1538) {
+ ndr_print_srvsvc_NetSrvInfo1538(ndr, "info1538", r->info1538);
+ }
+ ndr->depth--;
+ break;
+
+ case 1539:
+ ndr_print_ptr(ndr, "info1539", r->info1539);
+ ndr->depth++;
+ if (r->info1539) {
+ ndr_print_srvsvc_NetSrvInfo1539(ndr, "info1539", r->info1539);
+ }
+ ndr->depth--;
+ break;
+
+ case 1540:
+ ndr_print_ptr(ndr, "info1540", r->info1540);
+ ndr->depth++;
+ if (r->info1540) {
+ ndr_print_srvsvc_NetSrvInfo1540(ndr, "info1540", r->info1540);
+ }
+ ndr->depth--;
+ break;
+
+ case 1541:
+ ndr_print_ptr(ndr, "info1541", r->info1541);
+ ndr->depth++;
+ if (r->info1541) {
+ ndr_print_srvsvc_NetSrvInfo1541(ndr, "info1541", r->info1541);
+ }
+ ndr->depth--;
+ break;
+
+ case 1542:
+ ndr_print_ptr(ndr, "info1542", r->info1542);
+ ndr->depth++;
+ if (r->info1542) {
+ ndr_print_srvsvc_NetSrvInfo1542(ndr, "info1542", r->info1542);
+ }
+ ndr->depth--;
+ break;
+
+ case 1543:
+ ndr_print_ptr(ndr, "info1543", r->info1543);
+ ndr->depth++;
+ if (r->info1543) {
+ ndr_print_srvsvc_NetSrvInfo1543(ndr, "info1543", r->info1543);
+ }
+ ndr->depth--;
+ break;
+
+ case 1544:
+ ndr_print_ptr(ndr, "info1544", r->info1544);
+ ndr->depth++;
+ if (r->info1544) {
+ ndr_print_srvsvc_NetSrvInfo1544(ndr, "info1544", r->info1544);
+ }
+ ndr->depth--;
+ break;
+
+ case 1545:
+ ndr_print_ptr(ndr, "info1545", r->info1545);
+ ndr->depth++;
+ if (r->info1545) {
+ ndr_print_srvsvc_NetSrvInfo1545(ndr, "info1545", r->info1545);
+ }
+ ndr->depth--;
+ break;
+
+ case 1546:
+ ndr_print_ptr(ndr, "info1546", r->info1546);
+ ndr->depth++;
+ if (r->info1546) {
+ ndr_print_srvsvc_NetSrvInfo1546(ndr, "info1546", r->info1546);
+ }
+ ndr->depth--;
+ break;
+
+ case 1547:
+ ndr_print_ptr(ndr, "info1547", r->info1547);
+ ndr->depth++;
+ if (r->info1547) {
+ ndr_print_srvsvc_NetSrvInfo1547(ndr, "info1547", r->info1547);
+ }
+ ndr->depth--;
+ break;
+
+ case 1548:
+ ndr_print_ptr(ndr, "info1548", r->info1548);
+ ndr->depth++;
+ if (r->info1548) {
+ ndr_print_srvsvc_NetSrvInfo1548(ndr, "info1548", r->info1548);
+ }
+ ndr->depth--;
+ break;
+
+ case 1549:
+ ndr_print_ptr(ndr, "info1549", r->info1549);
+ ndr->depth++;
+ if (r->info1549) {
+ ndr_print_srvsvc_NetSrvInfo1549(ndr, "info1549", r->info1549);
+ }
+ ndr->depth--;
+ break;
+
+ case 1550:
+ ndr_print_ptr(ndr, "info1550", r->info1550);
+ ndr->depth++;
+ if (r->info1550) {
+ ndr_print_srvsvc_NetSrvInfo1550(ndr, "info1550", r->info1550);
+ }
+ ndr->depth--;
+ break;
+
+ case 1552:
+ ndr_print_ptr(ndr, "info1552", r->info1552);
+ ndr->depth++;
+ if (r->info1552) {
+ ndr_print_srvsvc_NetSrvInfo1552(ndr, "info1552", r->info1552);
+ }
+ ndr->depth--;
+ break;
+
+ case 1553:
+ ndr_print_ptr(ndr, "info1553", r->info1553);
+ ndr->depth++;
+ if (r->info1553) {
+ ndr_print_srvsvc_NetSrvInfo1553(ndr, "info1553", r->info1553);
+ }
+ ndr->depth--;
+ break;
+
+ case 1554:
+ ndr_print_ptr(ndr, "info1554", r->info1554);
+ ndr->depth++;
+ if (r->info1554) {
+ ndr_print_srvsvc_NetSrvInfo1554(ndr, "info1554", r->info1554);
+ }
+ ndr->depth--;
+ break;
+
+ case 1555:
+ ndr_print_ptr(ndr, "info1555", r->info1555);
+ ndr->depth++;
+ if (r->info1555) {
+ ndr_print_srvsvc_NetSrvInfo1555(ndr, "info1555", r->info1555);
+ }
+ ndr->depth--;
+ break;
+
+ case 1556:
+ ndr_print_ptr(ndr, "info1556", r->info1556);
+ ndr->depth++;
+ if (r->info1556) {
+ ndr_print_srvsvc_NetSrvInfo1556(ndr, "info1556", r->info1556);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->disk));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->disk));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo0");
+ ndr->depth++;
+ ndr_print_string(ndr, "disk", r->disk);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
+{
+ uint32_t cntr_disks_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->disks));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->disks) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
+{
+ uint32_t _ptr_disks;
+ uint32_t cntr_disks_1;
+ TALLOC_CTX *_mem_save_disks_0;
+ TALLOC_CTX *_mem_save_disks_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disks));
+ if (_ptr_disks) {
+ NDR_PULL_ALLOC(ndr, r->disks);
+ } else {
+ r->disks = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->disks) {
+ _mem_save_disks_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->disks));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->disks));
+ if (ndr_get_array_length(ndr, &r->disks) > ndr_get_array_size(ndr, &r->disks)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->disks), ndr_get_array_length(ndr, &r->disks));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->disks, ndr_get_array_size(ndr, &r->disks));
+ _mem_save_disks_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
+ for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_0, 0);
+ }
+ if (r->disks) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->disks, r->count));
+ }
+ if (r->disks) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->disks, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r)
+{
+ uint32_t cntr_disks_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "disks", r->disks);
+ ndr->depth++;
+ if (r->disks) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "disks", r->count);
+ ndr->depth++;
+ for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_disks_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->devopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->jobsqueued));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sopens));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stimeouts));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serrorout));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwerrors));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permerrors));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->syserrors));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_low));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_high));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_low));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_high));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->avresponse));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reqbufneed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bigbufneed));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->devopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->jobsqueued));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sopens));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stimeouts));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serrorout));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwerrors));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permerrors));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->syserrors));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_low));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_high));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_low));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_high));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->avresponse));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reqbufneed));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bigbufneed));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_Statistics");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "start", r->start);
+ ndr_print_uint32(ndr, "fopens", r->fopens);
+ ndr_print_uint32(ndr, "devopens", r->devopens);
+ ndr_print_uint32(ndr, "jobsqueued", r->jobsqueued);
+ ndr_print_uint32(ndr, "sopens", r->sopens);
+ ndr_print_uint32(ndr, "stimeouts", r->stimeouts);
+ ndr_print_uint32(ndr, "serrorout", r->serrorout);
+ ndr_print_uint32(ndr, "pwerrors", r->pwerrors);
+ ndr_print_uint32(ndr, "permerrors", r->permerrors);
+ ndr_print_uint32(ndr, "syserrors", r->syserrors);
+ ndr_print_uint32(ndr, "bytessent_low", r->bytessent_low);
+ ndr_print_uint32(ndr, "bytessent_high", r->bytessent_high);
+ ndr_print_uint32(ndr, "bytesrcvd_low", r->bytesrcvd_low);
+ ndr_print_uint32(ndr, "bytesrcvd_high", r->bytesrcvd_high);
+ ndr_print_uint32(ndr, "avresponse", r->avresponse);
+ ndr_print_uint32(ndr, "reqbufneed", r->reqbufneed);
+ ndr_print_uint32(ndr, "bigbufneed", r->bigbufneed);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
+ }
+ if (r->net_addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_addr;
+ TALLOC_CTX *_mem_save_addr_0;
+ uint32_t _ptr_net_addr;
+ TALLOC_CTX *_mem_save_net_addr_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
+ if (_ptr_addr) {
+ NDR_PULL_ALLOC(ndr, r->addr);
+ } else {
+ r->addr = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
+ if (_ptr_net_addr) {
+ NDR_PULL_ALLOC(ndr, r->net_addr);
+ } else {
+ r->net_addr = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->addr) {
+ _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
+ NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
+ }
+ if (r->net_addr) {
+ _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
+ if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "vcs", r->vcs);
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "addr", r->addr);
+ ndr->depth++;
+ if (r->addr) {
+ ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "addr_len", r->addr_len);
+ ndr_print_ptr(ndr, "net_addr", r->net_addr);
+ ndr->depth++;
+ if (r->net_addr) {
+ ndr_print_string(ndr, "net_addr", r->net_addr);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr0");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
+ }
+ if (r->net_addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_addr;
+ TALLOC_CTX *_mem_save_addr_0;
+ uint32_t _ptr_net_addr;
+ TALLOC_CTX *_mem_save_net_addr_0;
+ uint32_t _ptr_domain;
+ TALLOC_CTX *_mem_save_domain_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
+ if (_ptr_addr) {
+ NDR_PULL_ALLOC(ndr, r->addr);
+ } else {
+ r->addr = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
+ if (_ptr_net_addr) {
+ NDR_PULL_ALLOC(ndr, r->net_addr);
+ } else {
+ r->net_addr = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->addr) {
+ _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
+ NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
+ }
+ if (r->net_addr) {
+ _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
+ if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
+ }
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "vcs", r->vcs);
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "addr", r->addr);
+ ndr->depth++;
+ if (r->addr) {
+ ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "addr_len", r->addr_len);
+ ndr_print_ptr(ndr, "net_addr", r->net_addr);
+ ndr->depth++;
+ if (r->net_addr) {
+ ndr_print_string(ndr, "net_addr", r->net_addr);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
+ }
+ if (r->net_addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_addr;
+ TALLOC_CTX *_mem_save_addr_0;
+ uint32_t _ptr_net_addr;
+ TALLOC_CTX *_mem_save_net_addr_0;
+ uint32_t _ptr_domain;
+ TALLOC_CTX *_mem_save_domain_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
+ if (_ptr_addr) {
+ NDR_PULL_ALLOC(ndr, r->addr);
+ } else {
+ r->addr = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
+ if (_ptr_net_addr) {
+ NDR_PULL_ALLOC(ndr, r->net_addr);
+ } else {
+ r->net_addr = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->addr) {
+ _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
+ NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
+ }
+ if (r->net_addr) {
+ _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
+ if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
+ }
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo2");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "vcs", r->vcs);
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "addr", r->addr);
+ ndr->depth++;
+ if (r->addr) {
+ ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "addr_len", r->addr_len);
+ ndr_print_ptr(ndr, "net_addr", r->net_addr);
+ ndr->depth++;
+ if (r->net_addr) {
+ ndr_print_string(ndr, "net_addr", r->net_addr);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown", r->unknown);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr2");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
+ }
+ if (r->net_addr) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_name_0;
+ uint32_t _ptr_addr;
+ TALLOC_CTX *_mem_save_addr_0;
+ uint32_t _ptr_net_addr;
+ TALLOC_CTX *_mem_save_net_addr_0;
+ uint32_t _ptr_domain;
+ TALLOC_CTX *_mem_save_domain_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
+ if (_ptr_addr) {
+ NDR_PULL_ALLOC(ndr, r->addr);
+ } else {
+ r->addr = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
+ if (_ptr_net_addr) {
+ NDR_PULL_ALLOC(ndr, r->net_addr);
+ } else {
+ r->net_addr = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
+ if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ if (r->addr) {
+ _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
+ NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
+ }
+ if (r->net_addr) {
+ _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
+ if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
+ }
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ if (r->addr) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo3");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "vcs", r->vcs);
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "addr", r->addr);
+ ndr->depth++;
+ if (r->addr) {
+ ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "addr_len", r->addr_len);
+ ndr_print_ptr(ndr, "net_addr", r->net_addr);
+ ndr->depth++;
+ if (r->net_addr) {
+ ndr_print_string(ndr, "net_addr", r->net_addr);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown1", r->unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->unknown2);
+ ndr_print_array_uint8(ndr, "unknown3", r->unknown3, 256);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
+{
+ uint32_t cntr_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
+{
+ uint32_t _ptr_array;
+ uint32_t cntr_array_1;
+ TALLOC_CTX *_mem_save_array_0;
+ TALLOC_CTX *_mem_save_array_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
+ if (_ptr_array) {
+ NDR_PULL_ALLOC(ndr, r->array);
+ } else {
+ r->array = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->array) {
+ _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
+ NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
+ _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
+ }
+ for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
+ }
+ if (r->array) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r)
+{
+ uint32_t cntr_array_1;
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr3");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr_print_ptr(ndr, "array", r->array);
+ ndr->depth++;
+ if (r->array) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
+ ndr->depth++;
+ for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_array_1);
+ if (idx_1) {
+ ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ }
+ break;
+
+ case 2:
+ if (r->ctr2) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ }
+ break;
+
+ case 3:
+ if (r->ctr3) {
+ NDR_CHECK(ndr_push_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_ctr0_0;
+ TALLOC_CTX *_mem_save_ctr1_0;
+ TALLOC_CTX *_mem_save_ctr2_0;
+ TALLOC_CTX *_mem_save_ctr3_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetTransportCtr", _level);
+ }
+ switch (level) {
+ case 0: {
+ uint32_t _ptr_ctr0;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
+ if (_ptr_ctr0) {
+ NDR_PULL_ALLOC(ndr, r->ctr0);
+ } else {
+ r->ctr0 = NULL;
+ }
+ break; }
+
+ case 1: {
+ uint32_t _ptr_ctr1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
+ if (_ptr_ctr1) {
+ NDR_PULL_ALLOC(ndr, r->ctr1);
+ } else {
+ r->ctr1 = NULL;
+ }
+ break; }
+
+ case 2: {
+ uint32_t _ptr_ctr2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
+ if (_ptr_ctr2) {
+ NDR_PULL_ALLOC(ndr, r->ctr2);
+ } else {
+ r->ctr2 = NULL;
+ }
+ break; }
+
+ case 3: {
+ uint32_t _ptr_ctr3;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
+ if (_ptr_ctr3) {
+ NDR_PULL_ALLOC(ndr, r->ctr3);
+ } else {
+ r->ctr3 = NULL;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ if (r->ctr0) {
+ _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
+ }
+ break;
+
+ case 1:
+ if (r->ctr1) {
+ _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
+ }
+ break;
+
+ case 2:
+ if (r->ctr2) {
+ _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
+ }
+ break;
+
+ case 3:
+ if (r->ctr3) {
+ _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
+ }
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetTransportCtr");
+ switch (level) {
+ case 0:
+ ndr_print_ptr(ndr, "ctr0", r->ctr0);
+ ndr->depth++;
+ if (r->ctr0) {
+ ndr_print_srvsvc_NetTransportCtr0(ndr, "ctr0", r->ctr0);
+ }
+ ndr->depth--;
+ break;
+
+ case 1:
+ ndr_print_ptr(ndr, "ctr1", r->ctr1);
+ ndr->depth++;
+ if (r->ctr1) {
+ ndr_print_srvsvc_NetTransportCtr1(ndr, "ctr1", r->ctr1);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "ctr2", r->ctr2);
+ ndr->depth++;
+ if (r->ctr2) {
+ ndr_print_srvsvc_NetTransportCtr2(ndr, "ctr2", r->ctr2);
+ }
+ ndr->depth--;
+ break;
+
+ case 3:
+ ndr_print_ptr(ndr, "ctr3", r->ctr3);
+ ndr->depth++;
+ if (r->ctr3) {
+ ndr_print_srvsvc_NetTransportCtr3(ndr, "ctr3", r->ctr3);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->elapsed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->msecs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hours));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mins));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hunds));
+ NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->timezone));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tinterval));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->day));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->month));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->year));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weekday));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->elapsed));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->msecs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hours));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mins));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secs));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hunds));
+ NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->timezone));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tinterval));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->day));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->month));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->year));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weekday));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetRemoteTODInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "elapsed", r->elapsed);
+ ndr_print_uint32(ndr, "msecs", r->msecs);
+ ndr_print_uint32(ndr, "hours", r->hours);
+ ndr_print_uint32(ndr, "mins", r->mins);
+ ndr_print_uint32(ndr, "secs", r->secs);
+ ndr_print_uint32(ndr, "hunds", r->hunds);
+ ndr_print_int32(ndr, "timezone", r->timezone);
+ ndr_print_uint32(ndr, "tinterval", r->tinterval);
+ ndr_print_uint32(ndr, "day", r->day);
+ ndr_print_uint32(ndr, "month", r->month);
+ ndr_print_uint32(ndr, "year", r->year);
+ ndr_print_uint32(ndr, "weekday", r->weekday);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
+{
+ int level;
+ uint32_t _level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for srvsvc_NetTransportInfo", _level);
+ }
+ switch (level) {
+ case 0: {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ case 2: {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
+ break; }
+
+ case 3: {
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "srvsvc_NetTransportInfo");
+ switch (level) {
+ case 0:
+ ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", &r->info0);
+ break;
+
+ case 1:
+ ndr_print_srvsvc_NetTransportInfo1(ndr, "info1", &r->info1);
+ break;
+
+ case 2:
+ ndr_print_srvsvc_NetTransportInfo2(ndr, "info2", &r->info2);
+ break;
+
+ case 3:
+ ndr_print_srvsvc_NetTransportInfo3(ndr, "info3", &r->info3);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
+ ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
+ ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.device_name, ndr_charset_length(r->in.device_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
+ if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevGetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "device_name", r->in.device_name);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_srvsvc_NetCharDevInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.device_name, ndr_charset_length(r->in.device_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.opcode));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
+ if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.opcode));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevControl");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevControl");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "device_name", r->in.device_name);
+ ndr_print_uint32(ndr, "opcode", r->in.opcode);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevControl");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
+ if (r->in.user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_user;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_user_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->in.user);
+ } else {
+ r->in.user = NULL;
+ }
+ if (r->in.user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
+ if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->in.user);
+ ndr->depth++;
+ if (r->in.user) {
+ ndr_print_string(ndr, "user", r->in.user);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
+ ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
+ ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
+ if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
+ if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQGetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "queue_name", r->in.queue_name);
+ ndr_print_string(ndr, "user", r->in.user);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
+ if (r->in.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
+ if (r->out.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_parm_error;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_parm_error_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
+ if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->in.parm_error);
+ } else {
+ r->in.parm_error = NULL;
+ }
+ if (r->in.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->out.parm_error);
+ } else {
+ r->out.parm_error = NULL;
+ }
+ if (r->out.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQSetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQSetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "queue_name", r->in.queue_name);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
+ ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", &r->in.info);
+ ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
+ ndr->depth++;
+ if (r->in.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQSetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
+ ndr->depth++;
+ if (r->out.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
+ if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurge");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurge");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "queue_name", r->in.queue_name);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurge");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
+ if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurgeSelf");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurgeSelf");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "queue_name", r->in.queue_name);
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurgeSelf");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
+ if (r->in.path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_path;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_path_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
+ if (_ptr_path) {
+ NDR_PULL_ALLOC(ndr, r->in.path);
+ } else {
+ r->in.path = NULL;
+ }
+ if (r->in.path) {
+ _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
+ if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetConnEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetConnEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "path", r->in.path);
+ ndr->depth++;
+ if (r->in.path) {
+ ndr_print_string(ndr, "path", r->in.path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
+ ndr_print_srvsvc_NetConnCtr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetConnEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
+ ndr_print_srvsvc_NetConnCtr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
+ if (r->in.path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
+ if (r->in.user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_path;
+ uint32_t _ptr_user;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_path_0;
+ TALLOC_CTX *_mem_save_user_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
+ if (_ptr_path) {
+ NDR_PULL_ALLOC(ndr, r->in.path);
+ } else {
+ r->in.path = NULL;
+ }
+ if (r->in.path) {
+ _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
+ if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->in.user);
+ } else {
+ r->in.user = NULL;
+ }
+ if (r->in.user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
+ if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetFileEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetFileEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "path", r->in.path);
+ ndr->depth++;
+ if (r->in.path) {
+ ndr_print_string(ndr, "path", r->in.path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->in.user);
+ ndr->depth++;
+ if (r->in.user) {
+ ndr_print_string(ndr, "user", r->in.user);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
+ ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
+ ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetFileGetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetFileGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "fid", r->in.fid);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetFileGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_srvsvc_NetFileInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetFileClose");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetFileClose");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "fid", r->in.fid);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetFileClose");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
+ if (r->in.client) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
+ if (r->in.user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_client;
+ uint32_t _ptr_user;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_client_0;
+ TALLOC_CTX *_mem_save_user_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
+ if (_ptr_client) {
+ NDR_PULL_ALLOC(ndr, r->in.client);
+ } else {
+ r->in.client = NULL;
+ }
+ if (r->in.client) {
+ _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
+ if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.client), ndr_get_array_length(ndr, &r->in.client));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->in.user);
+ } else {
+ r->in.user = NULL;
+ }
+ if (r->in.user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
+ if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSessEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetSessEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "client", r->in.client);
+ ndr->depth++;
+ if (r->in.client) {
+ ndr_print_string(ndr, "client", r->in.client);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->in.user);
+ ndr->depth++;
+ if (r->in.user) {
+ ndr_print_string(ndr, "user", r->in.user);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
+ ndr_print_srvsvc_NetSessCtr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetSessEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
+ ndr_print_srvsvc_NetSessCtr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
+ if (r->in.client) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
+ if (r->in.user) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_client;
+ uint32_t _ptr_user;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_client_0;
+ TALLOC_CTX *_mem_save_user_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
+ if (_ptr_client) {
+ NDR_PULL_ALLOC(ndr, r->in.client);
+ } else {
+ r->in.client = NULL;
+ }
+ if (r->in.client) {
+ _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
+ if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.client), ndr_get_array_length(ndr, &r->in.client));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->in.user);
+ } else {
+ r->in.user = NULL;
+ }
+ if (r->in.user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
+ if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSessDel");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetSessDel");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "client", r->in.client);
+ ndr->depth++;
+ if (r->in.client) {
+ ndr_print_string(ndr, "client", r->in.client);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user", r->in.user);
+ ndr->depth++;
+ if (r->in.user) {
+ ndr_print_string(ndr, "user", r->in.user);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetSessDel");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
+ if (r->in.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
+ if (r->out.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_parm_error;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_parm_error_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->in.parm_error);
+ } else {
+ r->in.parm_error = NULL;
+ }
+ if (r->in.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->out.parm_error);
+ } else {
+ r->out.parm_error = NULL;
+ }
+ if (r->out.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareAdd");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareAdd");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
+ ndr_print_srvsvc_NetShareInfo(ndr, "info", &r->in.info);
+ ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
+ ndr->depth++;
+ if (r->in.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareAdd");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
+ ndr->depth++;
+ if (r->out.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareEnumAll");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
+ ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
+ ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
+ if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareGetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "share_name", r->in.share_name);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_srvsvc_NetShareInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
+ if (r->in.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
+ if (r->out.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_parm_error;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_parm_error_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
+ if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->in.parm_error);
+ } else {
+ r->in.parm_error = NULL;
+ }
+ if (r->in.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->out.parm_error);
+ } else {
+ r->out.parm_error = NULL;
+ }
+ if (r->out.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareSetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareSetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "share_name", r->in.share_name);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
+ ndr_print_srvsvc_NetShareInfo(ndr, "info", &r->in.info);
+ ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
+ ndr->depth++;
+ if (r->in.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareSetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
+ ndr->depth++;
+ if (r->out.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
+ if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareDel");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareDel");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "share_name", r->in.share_name);
+ ndr_print_uint32(ndr, "reserved", r->in.reserved);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareDel");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
+ if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareDelSticky");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareDelSticky");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "share_name", r->in.share_name);
+ ndr_print_uint32(ndr, "reserved", r->in.reserved);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareDelSticky");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.device_name, ndr_charset_length(r->in.device_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.type == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, *r->out.type));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_type_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
+ if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_ALLOC(ndr, r->out.type);
+ ZERO_STRUCTP(r->out.type);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.type);
+ }
+ _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, r->out.type));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareCheck");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareCheck");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "device_name", r->in.device_name);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareCheck");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "type", r->out.type);
+ ndr->depth++;
+ ndr_print_srvsvc_ShareType(ndr, "type", *r->out.type);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvGetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetSrvGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetSrvGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
+ if (r->in.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
+ if (r->out.parm_error) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_parm_error;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_parm_error_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->in.parm_error);
+ } else {
+ r->in.parm_error = NULL;
+ }
+ if (r->in.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
+ if (_ptr_parm_error) {
+ NDR_PULL_ALLOC(ndr, r->out.parm_error);
+ } else {
+ r->out.parm_error = NULL;
+ }
+ if (r->out.parm_error) {
+ _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSrvSetInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetSrvSetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
+ ndr_print_srvsvc_NetSrvInfo(ndr, "info", &r->in.info);
+ ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
+ ndr->depth++;
+ if (r->in.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetSrvSetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
+ ndr->depth++;
+ if (r->out.parm_error) {
+ ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxlen));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxlen));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ *r->out.info = *r->in.info;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetDiskEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->in.info);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "maxlen", r->in.maxlen);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetDiskEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service));
+ if (r->in.service) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service, ndr_charset_length(r->in.service, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.stat == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, r->out.stat));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_service;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_service_0;
+ TALLOC_CTX *_mem_save_stat_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service));
+ if (_ptr_service) {
+ NDR_PULL_ALLOC(ndr, r->in.service);
+ } else {
+ r->in.service = NULL;
+ }
+ if (r->in.service) {
+ _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service));
+ if (ndr_get_array_length(ndr, &r->in.service) > ndr_get_array_size(ndr, &r->in.service)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service), ndr_get_array_length(ndr, &r->in.service));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
+ NDR_PULL_ALLOC(ndr, r->out.stat);
+ ZERO_STRUCTP(r->out.stat);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.stat);
+ }
+ _mem_save_stat_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.stat, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_srvsvc_Statistics(ndr, NDR_SCALARS, r->out.stat));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stat_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetServerStatisticsGet");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetServerStatisticsGet");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service", r->in.service);
+ ndr->depth++;
+ if (r->in.service) {
+ ndr_print_string(ndr, "service", r->in.service);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_uint32(ndr, "options", r->in.options);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetServerStatisticsGet");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "stat", r->out.stat);
+ ndr->depth++;
+ ndr_print_srvsvc_Statistics(ndr, "stat", r->out.stat);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportAdd");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetTransportAdd");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
+ ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetTransportAdd");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.transports == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.transports, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.transports == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.transports, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_transports_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.transports);
+ }
+ _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.transports, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.transports, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.transports);
+ *r->out.transports = *r->in.transports;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.transports);
+ }
+ _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.transports, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.transports, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetTransportEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "transports", r->in.transports);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.transports, *r->in.level);
+ ndr_print_srvsvc_NetTransportCtr(ndr, "transports", r->in.transports);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetTransportEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "transports", r->out.transports);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.transports, *r->out.level);
+ ndr_print_srvsvc_NetTransportCtr(ndr, "transports", r->out.transports);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.transport));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.transport));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetTransportDel");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetTransportDel");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown", r->in.unknown);
+ ndr_print_srvsvc_NetTransportInfo0(ndr, "transport", &r->in.transport);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetTransportDel");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetRemoteTOD");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetRemoteTOD");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetRemoteTOD");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
+ if (r->in.transport) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_transport;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_transport_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
+ if (_ptr_transport) {
+ NDR_PULL_ALLOC(ndr, r->in.transport);
+ } else {
+ r->in.transport = NULL;
+ }
+ if (r->in.transport) {
+ _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
+ if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.transport), ndr_get_array_length(ndr, &r->in.transport));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSetServiceBits");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetSetServiceBits");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "transport", r->in.transport);
+ ndr->depth++;
+ if (r->in.transport) {
+ ndr_print_string(ndr, "transport", r->in.transport);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
+ ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetSetServiceBits");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.pathtype == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_pathtype_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
+ if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
+ NDR_PULL_ALLOC(ndr, r->out.pathtype);
+ ZERO_STRUCTP(r->out.pathtype);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.pathtype);
+ }
+ _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetPathType");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetPathType");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "path", r->in.path);
+ ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetPathType");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.prefix, ndr_charset_length(r->in.prefix, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ if (r->in.pathtype == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pathtype));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.can_path, r->in.maxbuf));
+ if (r->out.pathtype == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_pathtype_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
+ if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxbuf));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.prefix));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.prefix));
+ if (ndr_get_array_length(ndr, &r->in.prefix) > ndr_get_array_size(ndr, &r->in.prefix)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.prefix), ndr_get_array_length(ndr, &r->in.prefix));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.prefix, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t), CH_UTF16));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.pathtype);
+ }
+ _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.pathtype, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pathtype));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
+ NDR_PULL_ALLOC(ndr, r->out.pathtype);
+ *r->out.pathtype = *r->in.pathtype;
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.can_path));
+ NDR_PULL_ALLOC_N(ndr, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path)));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.pathtype);
+ }
+ _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.can_path) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.can_path, r->in.maxbuf));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetPathCanonicalize");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetPathCanonicalize");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "path", r->in.path);
+ ndr_print_uint32(ndr, "maxbuf", r->in.maxbuf);
+ ndr_print_string(ndr, "prefix", r->in.prefix);
+ ndr_print_ptr(ndr, "pathtype", r->in.pathtype);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "pathtype", *r->in.pathtype);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetPathCanonicalize");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "can_path", r->out.can_path, r->in.maxbuf);
+ ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path1, ndr_charset_length(r->in.path1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path2, ndr_charset_length(r->in.path2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathtype));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path1));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path1));
+ if (ndr_get_array_length(ndr, &r->in.path1) > ndr_get_array_size(ndr, &r->in.path1)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path1), ndr_get_array_length(ndr, &r->in.path1));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path1, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path2));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path2));
+ if (ndr_get_array_length(ndr, &r->in.path2) > ndr_get_array_size(ndr, &r->in.path2)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path2), ndr_get_array_length(ndr, &r->in.path2));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path2, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathtype));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetPathCompare");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetPathCompare");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "path1", r->in.path1);
+ ndr_print_string(ndr, "path2", r->in.path2);
+ ndr_print_uint32(ndr, "pathtype", r->in.pathtype);
+ ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetPathCompare");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
+ if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name), ndr_get_array_length(ndr, &r->in.name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetNameValidate");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetNameValidate");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "name", r->in.name);
+ ndr_print_uint32(ndr, "name_type", r->in.name_type);
+ ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetNameValidate");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRPRNAMECANONICALIZE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRPRNAMECANONICALIZE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRPRNAMECANONICALIZE");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name1, ndr_charset_length(r->in.name1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name2, ndr_charset_length(r->in.name2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name1));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name1));
+ if (ndr_get_array_length(ndr, &r->in.name1) > ndr_get_array_size(ndr, &r->in.name1)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name1), ndr_get_array_length(ndr, &r->in.name1));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name1, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name2));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name2));
+ if (ndr_get_array_length(ndr, &r->in.name2) > ndr_get_array_size(ndr, &r->in.name2)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name2), ndr_get_array_length(ndr, &r->in.name2));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name2, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetPRNameCompare");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetPRNameCompare");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "name1", r->in.name1);
+ ndr_print_string(ndr, "name2", r->in.name2);
+ ndr_print_uint32(ndr, "name_type", r->in.name_type);
+ ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetPRNameCompare");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
+ if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
+ if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_level_0;
+ TALLOC_CTX *_mem_save_ctr_0;
+ TALLOC_CTX *_mem_save_totalentries_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ *r->out.level = *r->in.level;
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ *r->out.ctr = *r->in.ctr;
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ ZERO_STRUCTP(r->out.totalentries);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.level);
+ }
+ _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.ctr);
+ }
+ _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
+ if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.totalentries);
+ }
+ _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareEnum");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "level", r->in.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->in.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ if (r->in.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
+ ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "level", r->out.level);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "level", *r->out.level);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ if (r->out.level == NULL) return;
+ ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
+ ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
+ if (r->out.hnd) {
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_hnd;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_hnd_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
+ if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
+ if (_ptr_hnd) {
+ NDR_PULL_ALLOC(ndr, r->out.hnd);
+ } else {
+ r->out.hnd = NULL;
+ }
+ if (r->out.hnd) {
+ _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareDelStart");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareDelStart");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "share", r->in.share);
+ ndr_print_uint32(ndr, "reserved", r->in.reserved);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareDelStart");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "hnd", r->out.hnd);
+ ndr->depth++;
+ if (r->out.hnd) {
+ ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd));
+ if (r->in.hnd) {
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
+ if (r->out.hnd) {
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
+{
+ uint32_t _ptr_hnd;
+ TALLOC_CTX *_mem_save_hnd_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
+ if (_ptr_hnd) {
+ NDR_PULL_ALLOC(ndr, r->in.hnd);
+ } else {
+ r->in.hnd = NULL;
+ }
+ if (r->in.hnd) {
+ _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.hnd, 0);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
+ if (_ptr_hnd) {
+ NDR_PULL_ALLOC(ndr, r->out.hnd);
+ } else {
+ r->out.hnd = NULL;
+ }
+ if (r->out.hnd) {
+ _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetShareDelCommit");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetShareDelCommit");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "hnd", r->in.hnd);
+ ndr->depth++;
+ if (r->in.hnd) {
+ ndr_print_policy_handle(ndr, "hnd", r->in.hnd);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetShareDelCommit");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "hnd", r->out.hnd);
+ ndr->depth++;
+ if (r->out.hnd) {
+ ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
+ if (r->in.share) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sd_buf));
+ if (r->out.sd_buf) {
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd_buf));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_share;
+ uint32_t _ptr_sd_buf;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_share_0;
+ TALLOC_CTX *_mem_save_sd_buf_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
+ if (_ptr_share) {
+ NDR_PULL_ALLOC(ndr, r->in.share);
+ } else {
+ r->in.share = NULL;
+ }
+ if (r->in.share) {
+ _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
+ if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
+ if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.file), ndr_get_array_length(ndr, &r->in.file));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_buf));
+ if (_ptr_sd_buf) {
+ NDR_PULL_ALLOC(ndr, r->out.sd_buf);
+ } else {
+ r->out.sd_buf = NULL;
+ }
+ if (r->out.sd_buf) {
+ _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sd_buf, 0);
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd_buf));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetGetFileSecurity");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetGetFileSecurity");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "share", r->in.share);
+ ndr->depth++;
+ if (r->in.share) {
+ ndr_print_string(ndr, "share", r->in.share);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "file", r->in.file);
+ ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetGetFileSecurity");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sd_buf", r->out.sd_buf);
+ ndr->depth++;
+ if (r->out.sd_buf) {
+ ndr_print_sec_desc_buf(ndr, "sd_buf", r->out.sd_buf);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
+ if (r->in.share) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sd_buf));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_share;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_share_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
+ if (_ptr_share) {
+ NDR_PULL_ALLOC(ndr, r->in.share);
+ } else {
+ r->in.share = NULL;
+ }
+ if (r->in.share) {
+ _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
+ if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
+ if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.file), ndr_get_array_length(ndr, &r->in.file));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sd_buf));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetSetFileSecurity");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetSetFileSecurity");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "share", r->in.share);
+ ndr->depth++;
+ if (r->in.share) {
+ ndr_print_string(ndr, "share", r->in.share);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "file", r->in.file);
+ ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
+ ndr_print_sec_desc_buf(ndr, "sd_buf", &r->in.sd_buf);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetSetFileSecurity");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
+{
+ uint32_t _ptr_server_unc;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetServerTransportAddEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetServerTransportAddEx");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
+ ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetServerTransportAddEx");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.emulated_server_unc));
+ if (r->in.emulated_server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.emulated_server_unc, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
+ if (r->in.transport) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebitsofinterest));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_emulated_server_unc;
+ uint32_t _ptr_transport;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_emulated_server_unc_0;
+ TALLOC_CTX *_mem_save_transport_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_emulated_server_unc));
+ if (_ptr_emulated_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.emulated_server_unc);
+ } else {
+ r->in.emulated_server_unc = NULL;
+ }
+ if (r->in.emulated_server_unc) {
+ _mem_save_emulated_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.emulated_server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.emulated_server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.emulated_server_unc));
+ if (ndr_get_array_length(ndr, &r->in.emulated_server_unc) > ndr_get_array_size(ndr, &r->in.emulated_server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.emulated_server_unc), ndr_get_array_length(ndr, &r->in.emulated_server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.emulated_server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.emulated_server_unc, ndr_get_array_length(ndr, &r->in.emulated_server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_emulated_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
+ if (_ptr_transport) {
+ NDR_PULL_ALLOC(ndr, r->in.transport);
+ } else {
+ r->in.transport = NULL;
+ }
+ if (r->in.transport) {
+ _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
+ if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.transport), ndr_get_array_length(ndr, &r->in.transport));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebitsofinterest));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NetServerSetServiceBitsEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NetServerSetServiceBitsEx");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "emulated_server_unc", r->in.emulated_server_unc);
+ ndr->depth++;
+ if (r->in.emulated_server_unc) {
+ ndr_print_string(ndr, "emulated_server_unc", r->in.emulated_server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "transport", r->in.transport);
+ ndr->depth++;
+ if (r->in.transport) {
+ ndr_print_string(ndr, "transport", r->in.transport);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "servicebitsofinterest", r->in.servicebitsofinterest);
+ ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
+ ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NetServerSetServiceBitsEx");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSGETVERSION");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSGETVERSION");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSGETVERSION");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATELOCALPARTITION");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATELOCALPARTITION");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATELOCALPARTITION");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETELOCALPARTITION");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETELOCALPARTITION");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETELOCALPARTITION");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETSERVERINFO");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETSERVERINFO");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETSERVERINFO");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATEEXITPOINT");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATEEXITPOINT");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATEEXITPOINT");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETEEXITPOINT");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETEEXITPOINT");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETEEXITPOINT");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSMODIFYPREFIX");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMODIFYPREFIX");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMODIFYPREFIX");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSFIXLOCALVOLUME");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSFIXLOCALVOLUME");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSFIXLOCALVOLUME");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
+{
+ ndr_print_struct(ndr, name, "srvsvc_NETRSERVERTRANSPORTDELEX");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "srvsvc_NETRSERVERTRANSPORTDELEX");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "srvsvc_NETRSERVERTRANSPORTDELEX");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+const struct dcerpc_interface_call srvsvc_calls[] = {
+ {
+ "srvsvc_NetCharDevEnum",
+ sizeof(struct srvsvc_NetCharDevEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevEnum,
+ False,
+ },
+ {
+ "srvsvc_NetCharDevGetInfo",
+ sizeof(struct srvsvc_NetCharDevGetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevGetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevGetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevGetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetCharDevControl",
+ sizeof(struct srvsvc_NetCharDevControl),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevControl,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevControl,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevControl,
+ False,
+ },
+ {
+ "srvsvc_NetCharDevQEnum",
+ sizeof(struct srvsvc_NetCharDevQEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQEnum,
+ False,
+ },
+ {
+ "srvsvc_NetCharDevQGetInfo",
+ sizeof(struct srvsvc_NetCharDevQGetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQGetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQGetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQGetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetCharDevQSetInfo",
+ sizeof(struct srvsvc_NetCharDevQSetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQSetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQSetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQSetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetCharDevQPurge",
+ sizeof(struct srvsvc_NetCharDevQPurge),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurge,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurge,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurge,
+ False,
+ },
+ {
+ "srvsvc_NetCharDevQPurgeSelf",
+ sizeof(struct srvsvc_NetCharDevQPurgeSelf),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurgeSelf,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurgeSelf,
+ (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurgeSelf,
+ False,
+ },
+ {
+ "srvsvc_NetConnEnum",
+ sizeof(struct srvsvc_NetConnEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetConnEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetConnEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetConnEnum,
+ False,
+ },
+ {
+ "srvsvc_NetFileEnum",
+ sizeof(struct srvsvc_NetFileEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetFileEnum,
+ False,
+ },
+ {
+ "srvsvc_NetFileGetInfo",
+ sizeof(struct srvsvc_NetFileGetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileGetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileGetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetFileGetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetFileClose",
+ sizeof(struct srvsvc_NetFileClose),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileClose,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileClose,
+ (ndr_print_function_t) ndr_print_srvsvc_NetFileClose,
+ False,
+ },
+ {
+ "srvsvc_NetSessEnum",
+ sizeof(struct srvsvc_NetSessEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetSessEnum,
+ False,
+ },
+ {
+ "srvsvc_NetSessDel",
+ sizeof(struct srvsvc_NetSessDel),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessDel,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessDel,
+ (ndr_print_function_t) ndr_print_srvsvc_NetSessDel,
+ False,
+ },
+ {
+ "srvsvc_NetShareAdd",
+ sizeof(struct srvsvc_NetShareAdd),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareAdd,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareAdd,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareAdd,
+ False,
+ },
+ {
+ "srvsvc_NetShareEnumAll",
+ sizeof(struct srvsvc_NetShareEnumAll),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnumAll,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnumAll,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareEnumAll,
+ False,
+ },
+ {
+ "srvsvc_NetShareGetInfo",
+ sizeof(struct srvsvc_NetShareGetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareGetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareGetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareGetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetShareSetInfo",
+ sizeof(struct srvsvc_NetShareSetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareSetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareSetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareSetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetShareDel",
+ sizeof(struct srvsvc_NetShareDel),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDel,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDel,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareDel,
+ False,
+ },
+ {
+ "srvsvc_NetShareDelSticky",
+ sizeof(struct srvsvc_NetShareDelSticky),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelSticky,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelSticky,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareDelSticky,
+ False,
+ },
+ {
+ "srvsvc_NetShareCheck",
+ sizeof(struct srvsvc_NetShareCheck),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareCheck,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareCheck,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareCheck,
+ False,
+ },
+ {
+ "srvsvc_NetSrvGetInfo",
+ sizeof(struct srvsvc_NetSrvGetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvGetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvGetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetSrvGetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetSrvSetInfo",
+ sizeof(struct srvsvc_NetSrvSetInfo),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvSetInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvSetInfo,
+ (ndr_print_function_t) ndr_print_srvsvc_NetSrvSetInfo,
+ False,
+ },
+ {
+ "srvsvc_NetDiskEnum",
+ sizeof(struct srvsvc_NetDiskEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetDiskEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetDiskEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetDiskEnum,
+ False,
+ },
+ {
+ "srvsvc_NetServerStatisticsGet",
+ sizeof(struct srvsvc_NetServerStatisticsGet),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerStatisticsGet,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerStatisticsGet,
+ (ndr_print_function_t) ndr_print_srvsvc_NetServerStatisticsGet,
+ False,
+ },
+ {
+ "srvsvc_NetTransportAdd",
+ sizeof(struct srvsvc_NetTransportAdd),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportAdd,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportAdd,
+ (ndr_print_function_t) ndr_print_srvsvc_NetTransportAdd,
+ False,
+ },
+ {
+ "srvsvc_NetTransportEnum",
+ sizeof(struct srvsvc_NetTransportEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetTransportEnum,
+ False,
+ },
+ {
+ "srvsvc_NetTransportDel",
+ sizeof(struct srvsvc_NetTransportDel),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportDel,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportDel,
+ (ndr_print_function_t) ndr_print_srvsvc_NetTransportDel,
+ False,
+ },
+ {
+ "srvsvc_NetRemoteTOD",
+ sizeof(struct srvsvc_NetRemoteTOD),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetRemoteTOD,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetRemoteTOD,
+ (ndr_print_function_t) ndr_print_srvsvc_NetRemoteTOD,
+ False,
+ },
+ {
+ "srvsvc_NetSetServiceBits",
+ sizeof(struct srvsvc_NetSetServiceBits),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetServiceBits,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetServiceBits,
+ (ndr_print_function_t) ndr_print_srvsvc_NetSetServiceBits,
+ False,
+ },
+ {
+ "srvsvc_NetPathType",
+ sizeof(struct srvsvc_NetPathType),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathType,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathType,
+ (ndr_print_function_t) ndr_print_srvsvc_NetPathType,
+ False,
+ },
+ {
+ "srvsvc_NetPathCanonicalize",
+ sizeof(struct srvsvc_NetPathCanonicalize),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCanonicalize,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCanonicalize,
+ (ndr_print_function_t) ndr_print_srvsvc_NetPathCanonicalize,
+ False,
+ },
+ {
+ "srvsvc_NetPathCompare",
+ sizeof(struct srvsvc_NetPathCompare),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCompare,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCompare,
+ (ndr_print_function_t) ndr_print_srvsvc_NetPathCompare,
+ False,
+ },
+ {
+ "srvsvc_NetNameValidate",
+ sizeof(struct srvsvc_NetNameValidate),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetNameValidate,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetNameValidate,
+ (ndr_print_function_t) ndr_print_srvsvc_NetNameValidate,
+ False,
+ },
+ {
+ "srvsvc_NETRPRNAMECANONICALIZE",
+ sizeof(struct srvsvc_NETRPRNAMECANONICALIZE),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRPRNAMECANONICALIZE,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRPRNAMECANONICALIZE,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRPRNAMECANONICALIZE,
+ False,
+ },
+ {
+ "srvsvc_NetPRNameCompare",
+ sizeof(struct srvsvc_NetPRNameCompare),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPRNameCompare,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPRNameCompare,
+ (ndr_print_function_t) ndr_print_srvsvc_NetPRNameCompare,
+ False,
+ },
+ {
+ "srvsvc_NetShareEnum",
+ sizeof(struct srvsvc_NetShareEnum),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnum,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnum,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareEnum,
+ False,
+ },
+ {
+ "srvsvc_NetShareDelStart",
+ sizeof(struct srvsvc_NetShareDelStart),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelStart,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelStart,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareDelStart,
+ False,
+ },
+ {
+ "srvsvc_NetShareDelCommit",
+ sizeof(struct srvsvc_NetShareDelCommit),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelCommit,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelCommit,
+ (ndr_print_function_t) ndr_print_srvsvc_NetShareDelCommit,
+ False,
+ },
+ {
+ "srvsvc_NetGetFileSecurity",
+ sizeof(struct srvsvc_NetGetFileSecurity),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetGetFileSecurity,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetGetFileSecurity,
+ (ndr_print_function_t) ndr_print_srvsvc_NetGetFileSecurity,
+ False,
+ },
+ {
+ "srvsvc_NetSetFileSecurity",
+ sizeof(struct srvsvc_NetSetFileSecurity),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetFileSecurity,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetFileSecurity,
+ (ndr_print_function_t) ndr_print_srvsvc_NetSetFileSecurity,
+ False,
+ },
+ {
+ "srvsvc_NetServerTransportAddEx",
+ sizeof(struct srvsvc_NetServerTransportAddEx),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerTransportAddEx,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerTransportAddEx,
+ (ndr_print_function_t) ndr_print_srvsvc_NetServerTransportAddEx,
+ False,
+ },
+ {
+ "srvsvc_NetServerSetServiceBitsEx",
+ sizeof(struct srvsvc_NetServerSetServiceBitsEx),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerSetServiceBitsEx,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerSetServiceBitsEx,
+ (ndr_print_function_t) ndr_print_srvsvc_NetServerSetServiceBitsEx,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSGETVERSION",
+ sizeof(struct srvsvc_NETRDFSGETVERSION),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSGETVERSION,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSGETVERSION,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSGETVERSION,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSCREATELOCALPARTITION",
+ sizeof(struct srvsvc_NETRDFSCREATELOCALPARTITION),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSDELETELOCALPARTITION",
+ sizeof(struct srvsvc_NETRDFSDELETELOCALPARTITION),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSSETLOCALVOLUMESTATE",
+ sizeof(struct srvsvc_NETRDFSSETLOCALVOLUMESTATE),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSSETSERVERINFO",
+ sizeof(struct srvsvc_NETRDFSSETSERVERINFO),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETSERVERINFO,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETSERVERINFO,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETSERVERINFO,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSCREATEEXITPOINT",
+ sizeof(struct srvsvc_NETRDFSCREATEEXITPOINT),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATEEXITPOINT,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATEEXITPOINT,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSDELETEEXITPOINT",
+ sizeof(struct srvsvc_NETRDFSDELETEEXITPOINT),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETEEXITPOINT,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETEEXITPOINT,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSMODIFYPREFIX",
+ sizeof(struct srvsvc_NETRDFSMODIFYPREFIX),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMODIFYPREFIX,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMODIFYPREFIX,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMODIFYPREFIX,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSFIXLOCALVOLUME",
+ sizeof(struct srvsvc_NETRDFSFIXLOCALVOLUME),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME,
+ False,
+ },
+ {
+ "srvsvc_NETRDFSMANAGERREPORTSITEINFO",
+ sizeof(struct srvsvc_NETRDFSMANAGERREPORTSITEINFO),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
+ False,
+ },
+ {
+ "srvsvc_NETRSERVERTRANSPORTDELEX",
+ sizeof(struct srvsvc_NETRSERVERTRANSPORTDELEX),
+ (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX,
+ (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX,
+ (ndr_print_function_t) ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX,
+ False,
+ },
+ { NULL, 0, NULL, NULL, NULL, False }
+};
+
+const char * const srvsvc_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\srvsvc]",
+ "ncacn_ip_tcp:",
+ "ncalrpc:",
+};
+
+const struct dcerpc_endpoint_list srvsvc_endpoints = {
+ .count = 3,
+ .names = srvsvc_endpoint_strings
+};
+
+const char * const srvsvc_authservice_strings[] = {
+ "host",
+};
+
+const struct dcerpc_authservice_list srvsvc_authservices = {
+ .count = 3,
+ .names = srvsvc_authservice_strings
+};
+
+
+const struct dcerpc_interface_table dcerpc_table_srvsvc = {
+ .name = "srvsvc",
+ .syntax_id = {
+ {0x4b324fc8,0x1670,0x01d3,{0x12,0x78},{0x5a,0x47,0xbf,0x6e,0xe1,0x88}},
+ DCERPC_SRVSVC_VERSION
+ },
+ .helpstring = DCERPC_SRVSVC_HELPSTRING,
+ .num_calls = 54,
+ .calls = srvsvc_calls,
+ .endpoints = &srvsvc_endpoints,
+ .authservices = &srvsvc_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.h b/source3/librpc/gen_ndr/ndr_srvsvc.h
new file mode 100644
index 0000000000..090d14beb8
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_srvsvc.h
@@ -0,0 +1,312 @@
+/* header auto-generated by pidl */
+
+#include "librpc/gen_ndr/srvsvc.h"
+
+#ifndef _HEADER_NDR_srvsvc
+#define _HEADER_NDR_srvsvc
+
+#include "librpc/ndr/libndr.h"
+#define DCERPC_SRVSVC_UUID "4b324fc8-1670-01d3-1278-5a47bf6ee188"
+#define DCERPC_SRVSVC_VERSION 3.0
+#define DCERPC_SRVSVC_NAME "srvsvc"
+#define DCERPC_SRVSVC_HELPSTRING "Server Service"
+extern const struct dcerpc_interface_table dcerpc_table_srvsvc;
+NTSTATUS dcerpc_server_srvsvc_init(void);
+#define DCERPC_SRVSVC_NETCHARDEVENUM (0x00)
+
+#define DCERPC_SRVSVC_NETCHARDEVGETINFO (0x01)
+
+#define DCERPC_SRVSVC_NETCHARDEVCONTROL (0x02)
+
+#define DCERPC_SRVSVC_NETCHARDEVQENUM (0x03)
+
+#define DCERPC_SRVSVC_NETCHARDEVQGETINFO (0x04)
+
+#define DCERPC_SRVSVC_NETCHARDEVQSETINFO (0x05)
+
+#define DCERPC_SRVSVC_NETCHARDEVQPURGE (0x06)
+
+#define DCERPC_SRVSVC_NETCHARDEVQPURGESELF (0x07)
+
+#define DCERPC_SRVSVC_NETCONNENUM (0x08)
+
+#define DCERPC_SRVSVC_NETFILEENUM (0x09)
+
+#define DCERPC_SRVSVC_NETFILEGETINFO (0x0a)
+
+#define DCERPC_SRVSVC_NETFILECLOSE (0x0b)
+
+#define DCERPC_SRVSVC_NETSESSENUM (0x0c)
+
+#define DCERPC_SRVSVC_NETSESSDEL (0x0d)
+
+#define DCERPC_SRVSVC_NETSHAREADD (0x0e)
+
+#define DCERPC_SRVSVC_NETSHAREENUMALL (0x0f)
+
+#define DCERPC_SRVSVC_NETSHAREGETINFO (0x10)
+
+#define DCERPC_SRVSVC_NETSHARESETINFO (0x11)
+
+#define DCERPC_SRVSVC_NETSHAREDEL (0x12)
+
+#define DCERPC_SRVSVC_NETSHAREDELSTICKY (0x13)
+
+#define DCERPC_SRVSVC_NETSHARECHECK (0x14)
+
+#define DCERPC_SRVSVC_NETSRVGETINFO (0x15)
+
+#define DCERPC_SRVSVC_NETSRVSETINFO (0x16)
+
+#define DCERPC_SRVSVC_NETDISKENUM (0x17)
+
+#define DCERPC_SRVSVC_NETSERVERSTATISTICSGET (0x18)
+
+#define DCERPC_SRVSVC_NETTRANSPORTADD (0x19)
+
+#define DCERPC_SRVSVC_NETTRANSPORTENUM (0x1a)
+
+#define DCERPC_SRVSVC_NETTRANSPORTDEL (0x1b)
+
+#define DCERPC_SRVSVC_NETREMOTETOD (0x1c)
+
+#define DCERPC_SRVSVC_NETSETSERVICEBITS (0x1d)
+
+#define DCERPC_SRVSVC_NETPATHTYPE (0x1e)
+
+#define DCERPC_SRVSVC_NETPATHCANONICALIZE (0x1f)
+
+#define DCERPC_SRVSVC_NETPATHCOMPARE (0x20)
+
+#define DCERPC_SRVSVC_NETNAMEVALIDATE (0x21)
+
+#define DCERPC_SRVSVC_NETRPRNAMECANONICALIZE (0x22)
+
+#define DCERPC_SRVSVC_NETPRNAMECOMPARE (0x23)
+
+#define DCERPC_SRVSVC_NETSHAREENUM (0x24)
+
+#define DCERPC_SRVSVC_NETSHAREDELSTART (0x25)
+
+#define DCERPC_SRVSVC_NETSHAREDELCOMMIT (0x26)
+
+#define DCERPC_SRVSVC_NETGETFILESECURITY (0x27)
+
+#define DCERPC_SRVSVC_NETSETFILESECURITY (0x28)
+
+#define DCERPC_SRVSVC_NETSERVERTRANSPORTADDEX (0x29)
+
+#define DCERPC_SRVSVC_NETSERVERSETSERVICEBITSEX (0x2a)
+
+#define DCERPC_SRVSVC_NETRDFSGETVERSION (0x2b)
+
+#define DCERPC_SRVSVC_NETRDFSCREATELOCALPARTITION (0x2c)
+
+#define DCERPC_SRVSVC_NETRDFSDELETELOCALPARTITION (0x2d)
+
+#define DCERPC_SRVSVC_NETRDFSSETLOCALVOLUMESTATE (0x2e)
+
+#define DCERPC_SRVSVC_NETRDFSSETSERVERINFO (0x2f)
+
+#define DCERPC_SRVSVC_NETRDFSCREATEEXITPOINT (0x30)
+
+#define DCERPC_SRVSVC_NETRDFSDELETEEXITPOINT (0x31)
+
+#define DCERPC_SRVSVC_NETRDFSMODIFYPREFIX (0x32)
+
+#define DCERPC_SRVSVC_NETRDFSFIXLOCALVOLUME (0x33)
+
+#define DCERPC_SRVSVC_NETRDFSMANAGERREPORTSITEINFO (0x34)
+
+#define DCERPC_SRVSVC_NETRSERVERTRANSPORTDELEX (0x35)
+
+#define DCERPC_SRVSVC_CALL_COUNT (54)
+void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r);
+void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r);
+void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r);
+void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r);
+void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r);
+void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r);
+void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r);
+void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r);
+void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r);
+void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r);
+void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r);
+void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r);
+void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r);
+void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r);
+void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r);
+void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r);
+void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r);
+void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r);
+void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r);
+void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r);
+void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r);
+void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r);
+void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r);
+void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r);
+void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r);
+void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r);
+void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r);
+void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r);
+void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r);
+void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r);
+void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r);
+void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r);
+void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r);
+void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r);
+void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r);
+void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r);
+void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r);
+void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r);
+void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r);
+void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r);
+void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r);
+void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r);
+void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r);
+void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r);
+void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r);
+void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r);
+void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r);
+void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r);
+void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r);
+void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r);
+void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r);
+void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r);
+void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r);
+void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r);
+void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r);
+void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r);
+NTSTATUS ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r);
+NTSTATUS ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r);
+void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r);
+void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r);
+void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r);
+void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r);
+void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r);
+void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r);
+void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r);
+void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r);
+void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r);
+void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r);
+void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r);
+void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r);
+void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r);
+void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r);
+void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r);
+void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r);
+void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r);
+void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r);
+void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r);
+void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r);
+void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r);
+void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r);
+void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r);
+void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r);
+void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r);
+void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r);
+void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r);
+void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r);
+void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r);
+void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r);
+void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r);
+void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r);
+void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r);
+void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r);
+void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r);
+void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r);
+void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r);
+void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r);
+void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r);
+void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r);
+void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r);
+void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r);
+void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r);
+void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r);
+void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r);
+void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r);
+void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r);
+void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r);
+void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r);
+void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r);
+void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r);
+void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r);
+void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r);
+void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r);
+void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r);
+void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r);
+void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r);
+void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r);
+void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r);
+void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r);
+void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r);
+void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r);
+void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r);
+void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r);
+void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r);
+void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r);
+void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r);
+void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r);
+void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r);
+void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r);
+void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r);
+void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r);
+void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r);
+void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r);
+void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r);
+void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r);
+void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r);
+void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r);
+void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r);
+void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r);
+void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r);
+void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r);
+void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r);
+void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r);
+void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r);
+void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r);
+void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r);
+void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r);
+void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r);
+void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r);
+void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r);
+void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r);
+void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r);
+void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r);
+void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r);
+void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r);
+void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r);
+void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r);
+void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r);
+void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r);
+void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r);
+void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r);
+void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r);
+void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r);
+void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r);
+void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r);
+void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r);
+void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r);
+void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r);
+void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r);
+void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r);
+void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r);
+void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r);
+void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r);
+void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r);
+void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r);
+void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r);
+void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r);
+void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r);
+void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r);
+void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r);
+void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r);
+void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r);
+void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r);
+void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r);
+void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r);
+void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r);
+void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r);
+void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r);
+#endif /* _HEADER_NDR_srvsvc */
diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c
new file mode 100644
index 0000000000..d3930fa5c7
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_svcctl.c
@@ -0,0 +1,5682 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_svcctl.h"
+
+NTSTATUS ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_LOCK_STATUS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_locked));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->lock_owner));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_duration));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->lock_owner) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lock_owner, ndr_charset_length(r->lock_owner, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_LOCK_STATUS *r)
+{
+ uint32_t _ptr_lock_owner;
+ TALLOC_CTX *_mem_save_lock_owner_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_locked));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lock_owner));
+ if (_ptr_lock_owner) {
+ NDR_PULL_ALLOC(ndr, r->lock_owner);
+ } else {
+ r->lock_owner = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_duration));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->lock_owner) {
+ _mem_save_lock_owner_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->lock_owner, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->lock_owner));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->lock_owner));
+ if (ndr_get_array_length(ndr, &r->lock_owner) > ndr_get_array_size(ndr, &r->lock_owner)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->lock_owner), ndr_get_array_length(ndr, &r->lock_owner));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lock_owner, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_owner_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r)
+{
+ ndr_print_struct(ndr, name, "SERVICE_LOCK_STATUS");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "is_locked", r->is_locked);
+ ndr_print_ptr(ndr, "lock_owner", r->lock_owner);
+ ndr->depth++;
+ if (r->lock_owner) {
+ ndr_print_string(ndr, "lock_owner", r->lock_owner);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "lock_duration", r->lock_duration);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->controls_accepted));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->win32_exit_code));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wait_hint));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->controls_accepted));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->win32_exit_code));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wait_hint));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r)
+{
+ ndr_print_struct(ndr, name, "SERVICE_STATUS");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "type", r->type);
+ ndr_print_uint32(ndr, "state", r->state);
+ ndr_print_uint32(ndr, "controls_accepted", r->controls_accepted);
+ ndr_print_uint32(ndr, "win32_exit_code", r->win32_exit_code);
+ ndr_print_uint32(ndr, "service_exit_code", r->service_exit_code);
+ ndr_print_uint32(ndr, "check_point", r->check_point);
+ ndr_print_uint32(ndr, "wait_hint", r->wait_hint);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_ENUM_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
+ ndr->flags = _flags_save_string;
+ }
+ NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ if (r->service_name) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->service_name));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
+ }
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ if (r->display_name) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->display_name));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
+ }
+ ndr->flags = _flags_save_string;
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_ENUM_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUS *r)
+{
+ uint32_t _ptr_service_name;
+ TALLOC_CTX *_mem_save_service_name_0;
+ uint32_t _ptr_display_name;
+ TALLOC_CTX *_mem_save_display_name_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
+ if (_ptr_service_name) {
+ NDR_PULL_ALLOC(ndr, r->service_name);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
+ } else {
+ r->service_name = NULL;
+ }
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
+ if (_ptr_display_name) {
+ NDR_PULL_ALLOC(ndr, r->display_name);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
+ } else {
+ r->display_name = NULL;
+ }
+ ndr->flags = _flags_save_string;
+ }
+ NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ if (r->service_name) {
+ struct ndr_pull_save _relative_save;
+ ndr_pull_save(ndr, &_relative_save);
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
+ _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
+ ndr_pull_restore(ndr, &_relative_save);
+ }
+ ndr->flags = _flags_save_string;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ if (r->display_name) {
+ struct ndr_pull_save _relative_save;
+ ndr_pull_save(ndr, &_relative_save);
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
+ _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
+ ndr_pull_restore(ndr, &_relative_save);
+ }
+ ndr->flags = _flags_save_string;
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUS *r)
+{
+ ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUS");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "service_name", r->service_name);
+ ndr->depth++;
+ if (r->service_name) {
+ ndr_print_string(ndr, "service_name", r->service_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name", r->display_name);
+ ndr->depth++;
+ if (r->display_name) {
+ ndr_print_string(ndr, "display_name", r->display_name);
+ }
+ ndr->depth--;
+ ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
+ ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WORKSTATION", SV_TYPE_WORKSTATION, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER", SV_TYPE_SERVER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SQLSERVER", SV_TYPE_SQLSERVER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_CTRL", SV_TYPE_DOMAIN_CTRL, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_BAKCTRL", SV_TYPE_DOMAIN_BAKCTRL, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_TIME_SOURCE", SV_TYPE_TIME_SOURCE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_AFP", SV_TYPE_AFP, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NOVELL", SV_TYPE_NOVELL, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MEMBER", SV_TYPE_DOMAIN_MEMBER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_PRINTQ_SERVER", SV_TYPE_PRINTQ_SERVER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DIALIN_SERVER", SV_TYPE_DIALIN_SERVER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_UNIX", SV_TYPE_SERVER_UNIX, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NT", SV_TYPE_NT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WFW", SV_TYPE_WFW, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_MFPN", SV_TYPE_SERVER_MFPN, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_NT", SV_TYPE_SERVER_NT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_POTENTIAL_BROWSER", SV_TYPE_POTENTIAL_BROWSER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_BACKUP_BROWSER", SV_TYPE_BACKUP_BROWSER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_MASTER_BROWSER", SV_TYPE_MASTER_BROWSER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MASTER", SV_TYPE_DOMAIN_MASTER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_OSF", SV_TYPE_SERVER_OSF, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_VMS", SV_TYPE_SERVER_VMS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WIN95_PLUS", SV_TYPE_WIN95_PLUS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DFS_SERVER", SV_TYPE_DFS_SERVER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_ALTERNATE_XPORT", SV_TYPE_ALTERNATE_XPORT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_LOCAL_LIST_ONLY", SV_TYPE_LOCAL_LIST_ONLY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_ENUM", SV_TYPE_DOMAIN_ENUM, r);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ *r->out.handle = *r->in.handle;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_CloseServiceHandle");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_CloseServiceHandle");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_CloseServiceHandle");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->out.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->out.handle);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.control));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.status == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.status));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_status_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.control));
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ ZERO_STRUCTP(r->out.status);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ }
+ _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.status));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_ControlService");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_ControlService");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "control", r->in.control);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_ControlService");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "status", r->out.status);
+ ndr->depth++;
+ ndr_print_SERVICE_STATUS(ndr, "status", r->out.status);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_DeleteService");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_DeleteService");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_DeleteService");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.lock == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_lock_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.lock);
+ ZERO_STRUCTP(r->out.lock);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.lock);
+ }
+ _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_LockServiceDatabase");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_LockServiceDatabase");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_LockServiceDatabase");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "lock", r->out.lock);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "lock", r->out.lock);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceObjectSecurity");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_SetServiceObjectSecurity");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_SetServiceObjectSecurity");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.status == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.status));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_status_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ ZERO_STRUCTP(r->out.status);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ }
+ _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.status));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceStatus");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatus");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatus");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "status", r->out.status);
+ ndr->depth++;
+ ndr_print_SERVICE_STATUS(ndr, "status", r->out.status);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_SetServiceStatus");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_SetServiceStatus");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_SetServiceStatus");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.lock == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.lock));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.lock == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
+{
+ TALLOC_CTX *_mem_save_lock_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.lock);
+ }
+ _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.lock));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.lock);
+ *r->out.lock = *r->in.lock;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.lock);
+ }
+ _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_UnlockServiceDatabase");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_UnlockServiceDatabase");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "lock", r->in.lock);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "lock", r->in.lock);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_UnlockServiceDatabase");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "lock", r->out.lock);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "lock", r->out.lock);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_NotifyBootConfigStatus");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_NotifyBootConfigStatus");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_NotifyBootConfigStatus");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.bits));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "bits", r->in.bits);
+ ndr_print_uint32(ndr, "bitson", r->in.bitson);
+ ndr_print_uint32(ndr, "immediate", r->in.immediate);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsW");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.error));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
+ if (r->in.binary_path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
+ if (r->in.load_order_group) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.load_order_group, ndr_charset_length(r->in.load_order_group, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
+ if (r->in.dependencies) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
+ if (r->in.service_start_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
+ if (r->in.password) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
+ if (r->in.display_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.display_name, ndr_charset_length(r->in.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.tag_id == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
+{
+ uint32_t _ptr_binary_path;
+ uint32_t _ptr_load_order_group;
+ uint32_t _ptr_dependencies;
+ uint32_t _ptr_service_start_name;
+ uint32_t _ptr_password;
+ uint32_t _ptr_display_name;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_binary_path_0;
+ TALLOC_CTX *_mem_save_load_order_group_0;
+ TALLOC_CTX *_mem_save_tag_id_0;
+ TALLOC_CTX *_mem_save_dependencies_0;
+ TALLOC_CTX *_mem_save_service_start_name_0;
+ TALLOC_CTX *_mem_save_password_0;
+ TALLOC_CTX *_mem_save_display_name_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.error));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
+ if (_ptr_binary_path) {
+ NDR_PULL_ALLOC(ndr, r->in.binary_path);
+ } else {
+ r->in.binary_path = NULL;
+ }
+ if (r->in.binary_path) {
+ _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
+ if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
+ if (_ptr_load_order_group) {
+ NDR_PULL_ALLOC(ndr, r->in.load_order_group);
+ } else {
+ r->in.load_order_group = NULL;
+ }
+ if (r->in.load_order_group) {
+ _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
+ if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.load_order_group), ndr_get_array_length(ndr, &r->in.load_order_group));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
+ if (_ptr_dependencies) {
+ NDR_PULL_ALLOC(ndr, r->in.dependencies);
+ } else {
+ r->in.dependencies = NULL;
+ }
+ if (r->in.dependencies) {
+ _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
+ if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dependencies), ndr_get_array_length(ndr, &r->in.dependencies));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
+ if (_ptr_service_start_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_start_name);
+ } else {
+ r->in.service_start_name = NULL;
+ }
+ if (r->in.service_start_name) {
+ _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
+ if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+ if (_ptr_password) {
+ NDR_PULL_ALLOC(ndr, r->in.password);
+ } else {
+ r->in.password = NULL;
+ }
+ if (r->in.password) {
+ _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
+ if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.password), ndr_get_array_length(ndr, &r->in.password));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
+ if (_ptr_display_name) {
+ NDR_PULL_ALLOC(ndr, r->in.display_name);
+ } else {
+ r->in.display_name = NULL;
+ }
+ if (r->in.display_name) {
+ _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
+ if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.display_name), ndr_get_array_length(ndr, &r->in.display_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.tag_id);
+ ZERO_STRUCTP(r->out.tag_id);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.tag_id);
+ }
+ _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "start", r->in.start);
+ ndr_print_uint32(ndr, "error", r->in.error);
+ ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
+ ndr->depth++;
+ if (r->in.binary_path) {
+ ndr_print_string(ndr, "binary_path", r->in.binary_path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
+ ndr->depth++;
+ if (r->in.load_order_group) {
+ ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
+ ndr->depth++;
+ if (r->in.dependencies) {
+ ndr_print_string(ndr, "dependencies", r->in.dependencies);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
+ ndr->depth++;
+ if (r->in.service_start_name) {
+ ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "password", r->in.password);
+ ndr->depth++;
+ if (r->in.password) {
+ ndr_print_string(ndr, "password", r->in.password);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name", r->in.display_name);
+ ndr->depth++;
+ if (r->in.display_name) {
+ ndr_print_string(ndr, "display_name", r->in.display_name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.scmanager_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
+ if (r->in.DisplayName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.error_control));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
+ if (r->in.LoadOrderGroupKey) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.TagId));
+ if (r->in.TagId) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.TagId));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
+ if (r->in.dependencies) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, r->in.dependencies_size));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
+ if (r->in.service_start_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
+ if (r->in.password) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.password, r->in.password_size));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
+ if (r->out.TagId) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
+ }
+ if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
+{
+ uint32_t _ptr_DisplayName;
+ uint32_t _ptr_LoadOrderGroupKey;
+ uint32_t _ptr_TagId;
+ uint32_t _ptr_dependencies;
+ uint32_t _ptr_service_start_name;
+ uint32_t _ptr_password;
+ TALLOC_CTX *_mem_save_scmanager_handle_0;
+ TALLOC_CTX *_mem_save_DisplayName_0;
+ TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
+ TALLOC_CTX *_mem_save_TagId_0;
+ TALLOC_CTX *_mem_save_dependencies_0;
+ TALLOC_CTX *_mem_save_service_start_name_0;
+ TALLOC_CTX *_mem_save_password_0;
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
+ }
+ _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
+ if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
+ if (_ptr_DisplayName) {
+ NDR_PULL_ALLOC(ndr, r->in.DisplayName);
+ } else {
+ r->in.DisplayName = NULL;
+ }
+ if (r->in.DisplayName) {
+ _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
+ if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DisplayName), ndr_get_array_length(ndr, &r->in.DisplayName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.error_control));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
+ if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
+ if (_ptr_LoadOrderGroupKey) {
+ NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
+ } else {
+ r->in.LoadOrderGroupKey = NULL;
+ }
+ if (r->in.LoadOrderGroupKey) {
+ _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
+ if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey), ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
+ if (_ptr_TagId) {
+ NDR_PULL_ALLOC(ndr, r->in.TagId);
+ } else {
+ r->in.TagId = NULL;
+ }
+ if (r->in.TagId) {
+ _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.TagId, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.TagId));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
+ if (_ptr_dependencies) {
+ NDR_PULL_ALLOC(ndr, r->in.dependencies);
+ } else {
+ r->in.dependencies = NULL;
+ }
+ if (r->in.dependencies) {
+ _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
+ NDR_PULL_ALLOC_N(ndr, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dependencies_size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
+ if (_ptr_service_start_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_start_name);
+ } else {
+ r->in.service_start_name = NULL;
+ }
+ if (r->in.service_start_name) {
+ _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
+ if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+ if (_ptr_password) {
+ NDR_PULL_ALLOC(ndr, r->in.password);
+ } else {
+ r->in.password = NULL;
+ }
+ if (r->in.password) {
+ _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
+ NDR_PULL_ALLOC_N(ndr, r->in.password, ndr_get_array_size(ndr, &r->in.password));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.password, ndr_get_array_size(ndr, &r->in.password)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.password_size));
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ ZERO_STRUCTP(r->out.handle);
+ if (r->in.dependencies) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.dependencies, r->in.dependencies_size));
+ }
+ if (r->in.password) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.password, r->in.password_size));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
+ if (_ptr_TagId) {
+ NDR_PULL_ALLOC(ndr, r->out.TagId);
+ } else {
+ r->out.TagId = NULL;
+ }
+ if (r->out.TagId) {
+ _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_CreateServiceW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_CreateServiceW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
+ ndr->depth--;
+ ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
+ ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
+ ndr->depth++;
+ if (r->in.DisplayName) {
+ ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "start_type", r->in.start_type);
+ ndr_print_uint32(ndr, "error_control", r->in.error_control);
+ ndr_print_string(ndr, "binary_path", r->in.binary_path);
+ ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
+ ndr->depth++;
+ if (r->in.LoadOrderGroupKey) {
+ ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "TagId", r->in.TagId);
+ ndr->depth++;
+ if (r->in.TagId) {
+ ndr_print_uint32(ndr, "TagId", *r->in.TagId);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
+ ndr->depth++;
+ if (r->in.dependencies) {
+ ndr_print_array_uint8(ndr, "dependencies", r->in.dependencies, r->in.dependencies_size);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "dependencies_size", r->in.dependencies_size);
+ ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
+ ndr->depth++;
+ if (r->in.service_start_name) {
+ ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "password", r->in.password);
+ ndr->depth++;
+ if (r->in.password) {
+ ndr_print_array_uint8(ndr, "password", r->in.password, r->in.password_size);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "password_size", r->in.password_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_CreateServiceW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "TagId", r->out.TagId);
+ ndr->depth++;
+ if (r->out.TagId) {
+ ndr_print_uint32(ndr, "TagId", *r->out.TagId);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "handle", r->out.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->out.handle);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.service == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.service));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.status));
+ if (r->out.status) {
+ NDR_CHECK(ndr_push_ENUM_SERVICE_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ }
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ if (r->out.services_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
+{
+ uint32_t _ptr_status;
+ TALLOC_CTX *_mem_save_service_0;
+ TALLOC_CTX *_mem_save_status_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_services_returned_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.service);
+ }
+ _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.service));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
+ 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_PULL_ALLOC(ndr, r->out.services_returned);
+ ZERO_STRUCTP(r->out.services_returned);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_status));
+ if (_ptr_status) {
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ } else {
+ r->out.status = NULL;
+ }
+ if (r->out.status) {
+ _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.status, 0);
+ NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.services_returned);
+ }
+ _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "service", r->in.service);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "service", r->in.service);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "state", r->in.state);
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "status", r->out.status);
+ ndr->depth++;
+ if (r->out.status) {
+ ndr_print_ENUM_SERVICE_STATUS(ndr, "status", r->out.status);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ if (r->out.services_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
+{
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_services_returned_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.services_returned);
+ ZERO_STRUCTP(r->out.services_returned);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
+ NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.services_returned);
+ }
+ _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.service) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.buf_size));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "state", r->in.state);
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "service", r->out.service, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
+ if (r->in.MachineName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
+ if (r->in.DatabaseName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
+{
+ uint32_t _ptr_MachineName;
+ uint32_t _ptr_DatabaseName;
+ TALLOC_CTX *_mem_save_MachineName_0;
+ TALLOC_CTX *_mem_save_DatabaseName_0;
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
+ if (_ptr_MachineName) {
+ NDR_PULL_ALLOC(ndr, r->in.MachineName);
+ } else {
+ r->in.MachineName = NULL;
+ }
+ if (r->in.MachineName) {
+ _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
+ if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.MachineName), ndr_get_array_length(ndr, &r->in.MachineName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
+ if (_ptr_DatabaseName) {
+ NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
+ } else {
+ r->in.DatabaseName = NULL;
+ }
+ if (r->in.DatabaseName) {
+ _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
+ if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DatabaseName), ndr_get_array_length(ndr, &r->in.DatabaseName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ ZERO_STRUCTP(r->out.handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_OpenSCManagerW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
+ ndr->depth++;
+ if (r->in.MachineName) {
+ ndr_print_string(ndr, "MachineName", r->in.MachineName);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
+ ndr->depth++;
+ if (r->in.DatabaseName) {
+ ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->out.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->out.handle);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.scmanager_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
+{
+ TALLOC_CTX *_mem_save_scmanager_handle_0;
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
+ }
+ _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
+ if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ ZERO_STRUCTP(r->out.handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_OpenServiceW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_OpenServiceW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
+ ndr->depth--;
+ ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_OpenServiceW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->out.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->out.handle);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.buf_size));
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.buf_size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "query", r->out.query, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.status == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ if (r->out.required_buf_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.required_buf_size));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_status_0;
+ TALLOC_CTX *_mem_save_required_buf_size_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.buf_size));
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ ZERO_STRUCTP(r->out.status);
+ NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
+ ZERO_STRUCTP(r->out.required_buf_size);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ }
+ _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
+ }
+ _mem_save_required_buf_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.required_buf_size, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.required_buf_size));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_required_buf_size_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "status", r->out.status);
+ ndr->depth++;
+ ndr_print_SERVICE_LOCK_STATUS(ndr, "status", r->out.status);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "required_buf_size", r->out.required_buf_size);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "required_buf_size", *r->out.required_buf_size);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
+ if (r->in.Arguments) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
+{
+ uint32_t _ptr_Arguments;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_Arguments_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.NumArgs));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
+ if (_ptr_Arguments) {
+ NDR_PULL_ALLOC(ndr, r->in.Arguments);
+ } else {
+ r->in.Arguments = NULL;
+ }
+ if (r->in.Arguments) {
+ _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
+ if (ndr_get_array_length(ndr, &r->in.Arguments) > ndr_get_array_size(ndr, &r->in.Arguments)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.Arguments), ndr_get_array_length(ndr, &r->in.Arguments));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_StartServiceW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_StartServiceW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
+ ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
+ ndr->depth++;
+ if (r->in.Arguments) {
+ ndr_print_string(ndr, "Arguments", r->in.Arguments);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_StartServiceW");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
+ if (r->in.service_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
+ if (r->in.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.display_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.display_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
+ if (r->out.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
+{
+ uint32_t _ptr_service_name;
+ uint32_t _ptr_display_name;
+ uint32_t _ptr_display_name_length;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_service_name_0;
+ TALLOC_CTX *_mem_save_display_name_0;
+ TALLOC_CTX *_mem_save_display_name_length_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
+ if (_ptr_service_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_name);
+ } else {
+ r->in.service_name = NULL;
+ }
+ if (r->in.service_name) {
+ _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
+ if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->in.display_name_length);
+ } else {
+ r->in.display_name_length = NULL;
+ }
+ if (r->in.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.display_name);
+ ZERO_STRUCTP(r->out.display_name);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.display_name);
+ }
+ _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_display_name));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
+ if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->out.display_name_length);
+ } else {
+ r->out.display_name_length = NULL;
+ }
+ if (r->out.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_name", r->in.service_name);
+ ndr->depth++;
+ if (r->in.service_name) {
+ ndr_print_string(ndr, "service_name", r->in.service_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
+ ndr->depth++;
+ if (r->in.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "display_name", r->out.display_name);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "display_name", *r->out.display_name);
+ ndr->depth++;
+ ndr_print_string(ndr, "display_name", *r->out.display_name);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
+ ndr->depth++;
+ if (r->out.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
+ if (r->in.service_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
+ if (r->in.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.key_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.key_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
+ if (r->out.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
+{
+ uint32_t _ptr_service_name;
+ uint32_t _ptr_key_name;
+ uint32_t _ptr_display_name_length;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_service_name_0;
+ TALLOC_CTX *_mem_save_key_name_0;
+ TALLOC_CTX *_mem_save_display_name_length_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
+ if (_ptr_service_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_name);
+ } else {
+ r->in.service_name = NULL;
+ }
+ if (r->in.service_name) {
+ _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
+ if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->in.display_name_length);
+ } else {
+ r->in.display_name_length = NULL;
+ }
+ if (r->in.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.key_name);
+ ZERO_STRUCTP(r->out.key_name);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.key_name);
+ }
+ _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_key_name));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
+ if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->out.display_name_length);
+ } else {
+ r->out.display_name_length = NULL;
+ }
+ if (r->out.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_name", r->in.service_name);
+ ndr->depth++;
+ if (r->in.service_name) {
+ ndr_print_string(ndr, "service_name", r->in.service_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
+ ndr->depth++;
+ if (r->in.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "key_name", r->out.key_name);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "key_name", *r->out.key_name);
+ ndr->depth++;
+ ndr_print_string(ndr, "key_name", *r->out.key_name);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
+ ndr->depth++;
+ if (r->out.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.bits));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "bits", r->in.bits);
+ ndr_print_uint32(ndr, "bitson", r->in.bitson);
+ ndr_print_uint32(ndr, "immediate", r->in.immediate);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsA");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.error));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
+ if (r->in.binary_path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
+ if (r->in.load_order_group) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.load_order_group, ndr_charset_length(r->in.load_order_group, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
+ if (r->in.dependencies) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
+ if (r->in.service_start_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
+ if (r->in.password) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
+ if (r->in.display_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.display_name, ndr_charset_length(r->in.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.tag_id == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
+{
+ uint32_t _ptr_binary_path;
+ uint32_t _ptr_load_order_group;
+ uint32_t _ptr_dependencies;
+ uint32_t _ptr_service_start_name;
+ uint32_t _ptr_password;
+ uint32_t _ptr_display_name;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_binary_path_0;
+ TALLOC_CTX *_mem_save_load_order_group_0;
+ TALLOC_CTX *_mem_save_tag_id_0;
+ TALLOC_CTX *_mem_save_dependencies_0;
+ TALLOC_CTX *_mem_save_service_start_name_0;
+ TALLOC_CTX *_mem_save_password_0;
+ TALLOC_CTX *_mem_save_display_name_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.error));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
+ if (_ptr_binary_path) {
+ NDR_PULL_ALLOC(ndr, r->in.binary_path);
+ } else {
+ r->in.binary_path = NULL;
+ }
+ if (r->in.binary_path) {
+ _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
+ if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
+ if (_ptr_load_order_group) {
+ NDR_PULL_ALLOC(ndr, r->in.load_order_group);
+ } else {
+ r->in.load_order_group = NULL;
+ }
+ if (r->in.load_order_group) {
+ _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
+ if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.load_order_group), ndr_get_array_length(ndr, &r->in.load_order_group));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
+ if (_ptr_dependencies) {
+ NDR_PULL_ALLOC(ndr, r->in.dependencies);
+ } else {
+ r->in.dependencies = NULL;
+ }
+ if (r->in.dependencies) {
+ _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
+ if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dependencies), ndr_get_array_length(ndr, &r->in.dependencies));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
+ if (_ptr_service_start_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_start_name);
+ } else {
+ r->in.service_start_name = NULL;
+ }
+ if (r->in.service_start_name) {
+ _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
+ if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+ if (_ptr_password) {
+ NDR_PULL_ALLOC(ndr, r->in.password);
+ } else {
+ r->in.password = NULL;
+ }
+ if (r->in.password) {
+ _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
+ if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.password), ndr_get_array_length(ndr, &r->in.password));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
+ if (_ptr_display_name) {
+ NDR_PULL_ALLOC(ndr, r->in.display_name);
+ } else {
+ r->in.display_name = NULL;
+ }
+ if (r->in.display_name) {
+ _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
+ if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.display_name), ndr_get_array_length(ndr, &r->in.display_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.tag_id);
+ ZERO_STRUCTP(r->out.tag_id);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.tag_id);
+ }
+ _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "start", r->in.start);
+ ndr_print_uint32(ndr, "error", r->in.error);
+ ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
+ ndr->depth++;
+ if (r->in.binary_path) {
+ ndr_print_string(ndr, "binary_path", r->in.binary_path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
+ ndr->depth++;
+ if (r->in.load_order_group) {
+ ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
+ ndr->depth++;
+ if (r->in.dependencies) {
+ ndr_print_string(ndr, "dependencies", r->in.dependencies);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
+ ndr->depth++;
+ if (r->in.service_start_name) {
+ ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "password", r->in.password);
+ ndr->depth++;
+ if (r->in.password) {
+ ndr_print_string(ndr, "password", r->in.password);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name", r->in.display_name);
+ ndr->depth++;
+ if (r->in.display_name) {
+ ndr_print_string(ndr, "display_name", r->in.display_name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
+ if (r->in.ServiceName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
+ if (r->in.DisplayName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.error_control));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
+ if (r->in.binary_path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
+ if (r->in.LoadOrderGroupKey) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
+ if (r->in.dependencies) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
+ if (r->in.service_start_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
+ if (r->in.password) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
+ if (r->out.TagId) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
+{
+ uint32_t _ptr_ServiceName;
+ uint32_t _ptr_DisplayName;
+ uint32_t _ptr_binary_path;
+ uint32_t _ptr_LoadOrderGroupKey;
+ uint32_t _ptr_TagId;
+ uint32_t _ptr_dependencies;
+ uint32_t _ptr_service_start_name;
+ uint32_t _ptr_password;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_ServiceName_0;
+ TALLOC_CTX *_mem_save_DisplayName_0;
+ TALLOC_CTX *_mem_save_binary_path_0;
+ TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
+ TALLOC_CTX *_mem_save_TagId_0;
+ TALLOC_CTX *_mem_save_dependencies_0;
+ TALLOC_CTX *_mem_save_service_start_name_0;
+ TALLOC_CTX *_mem_save_password_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
+ if (_ptr_ServiceName) {
+ NDR_PULL_ALLOC(ndr, r->in.ServiceName);
+ } else {
+ r->in.ServiceName = NULL;
+ }
+ if (r->in.ServiceName) {
+ _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
+ if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
+ if (_ptr_DisplayName) {
+ NDR_PULL_ALLOC(ndr, r->in.DisplayName);
+ } else {
+ r->in.DisplayName = NULL;
+ }
+ if (r->in.DisplayName) {
+ _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
+ if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DisplayName), ndr_get_array_length(ndr, &r->in.DisplayName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.error_control));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
+ if (_ptr_binary_path) {
+ NDR_PULL_ALLOC(ndr, r->in.binary_path);
+ } else {
+ r->in.binary_path = NULL;
+ }
+ if (r->in.binary_path) {
+ _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
+ if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
+ if (_ptr_LoadOrderGroupKey) {
+ NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
+ } else {
+ r->in.LoadOrderGroupKey = NULL;
+ }
+ if (r->in.LoadOrderGroupKey) {
+ _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
+ if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey), ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
+ if (_ptr_dependencies) {
+ NDR_PULL_ALLOC(ndr, r->in.dependencies);
+ } else {
+ r->in.dependencies = NULL;
+ }
+ if (r->in.dependencies) {
+ _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
+ if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dependencies), ndr_get_array_length(ndr, &r->in.dependencies));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
+ if (_ptr_service_start_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_start_name);
+ } else {
+ r->in.service_start_name = NULL;
+ }
+ if (r->in.service_start_name) {
+ _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
+ if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+ if (_ptr_password) {
+ NDR_PULL_ALLOC(ndr, r->in.password);
+ } else {
+ r->in.password = NULL;
+ }
+ if (r->in.password) {
+ _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
+ if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.password), ndr_get_array_length(ndr, &r->in.password));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
+ if (_ptr_TagId) {
+ NDR_PULL_ALLOC(ndr, r->out.TagId);
+ } else {
+ r->out.TagId = NULL;
+ }
+ if (r->out.TagId) {
+ _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_CreateServiceA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_CreateServiceA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
+ ndr->depth++;
+ if (r->in.ServiceName) {
+ ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
+ ndr->depth++;
+ if (r->in.DisplayName) {
+ ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "start_type", r->in.start_type);
+ ndr_print_uint32(ndr, "error_control", r->in.error_control);
+ ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
+ ndr->depth++;
+ if (r->in.binary_path) {
+ ndr_print_string(ndr, "binary_path", r->in.binary_path);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
+ ndr->depth++;
+ if (r->in.LoadOrderGroupKey) {
+ ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
+ ndr->depth++;
+ if (r->in.dependencies) {
+ ndr_print_string(ndr, "dependencies", r->in.dependencies);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
+ ndr->depth++;
+ if (r->in.service_start_name) {
+ ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "password", r->in.password);
+ ndr->depth++;
+ if (r->in.password) {
+ ndr_print_string(ndr, "password", r->in.password);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_CreateServiceA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "TagId", r->out.TagId);
+ ndr->depth++;
+ if (r->out.TagId) {
+ ndr_print_uint32(ndr, "TagId", *r->out.TagId);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.service == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.service));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.status));
+ if (r->out.status) {
+ NDR_CHECK(ndr_push_ENUM_SERVICE_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ }
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ if (r->out.services_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
+{
+ uint32_t _ptr_status;
+ TALLOC_CTX *_mem_save_service_0;
+ TALLOC_CTX *_mem_save_status_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_services_returned_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.service);
+ }
+ _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.service));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
+ 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_PULL_ALLOC(ndr, r->out.services_returned);
+ ZERO_STRUCTP(r->out.services_returned);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_status));
+ if (_ptr_status) {
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ } else {
+ r->out.status = NULL;
+ }
+ if (r->out.status) {
+ _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.status, 0);
+ NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.services_returned);
+ }
+ _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "service", r->in.service);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "service", r->in.service);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "state", r->in.state);
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "status", r->out.status);
+ ndr->depth++;
+ if (r->out.status) {
+ ndr_print_ENUM_SERVICE_STATUS(ndr, "status", r->out.status);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ if (r->out.services_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
+{
+ uint32_t _ptr_resume_handle;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_services_returned_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.services_returned);
+ ZERO_STRUCTP(r->out.services_returned);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
+ NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.services_returned);
+ }
+ _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.service) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.buf_size));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "state", r->in.state);
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "service", r->out.service, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
+ if (r->in.MachineName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
+ if (r->in.DatabaseName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
+{
+ uint32_t _ptr_MachineName;
+ uint32_t _ptr_DatabaseName;
+ TALLOC_CTX *_mem_save_MachineName_0;
+ TALLOC_CTX *_mem_save_DatabaseName_0;
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
+ if (_ptr_MachineName) {
+ NDR_PULL_ALLOC(ndr, r->in.MachineName);
+ } else {
+ r->in.MachineName = NULL;
+ }
+ if (r->in.MachineName) {
+ _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
+ if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.MachineName), ndr_get_array_length(ndr, &r->in.MachineName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
+ if (_ptr_DatabaseName) {
+ NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
+ } else {
+ r->in.DatabaseName = NULL;
+ }
+ if (r->in.DatabaseName) {
+ _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
+ if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DatabaseName), ndr_get_array_length(ndr, &r->in.DatabaseName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ ZERO_STRUCTP(r->out.handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_OpenSCManagerA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
+ ndr->depth++;
+ if (r->in.MachineName) {
+ ndr_print_string(ndr, "MachineName", r->in.MachineName);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
+ ndr->depth++;
+ if (r->in.DatabaseName) {
+ ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->out.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->out.handle);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.scmanager_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
+ if (r->in.ServiceName) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
+{
+ uint32_t _ptr_ServiceName;
+ TALLOC_CTX *_mem_save_scmanager_handle_0;
+ TALLOC_CTX *_mem_save_ServiceName_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
+ }
+ _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
+ if (_ptr_ServiceName) {
+ NDR_PULL_ALLOC(ndr, r->in.ServiceName);
+ } else {
+ r->in.ServiceName = NULL;
+ }
+ if (r->in.ServiceName) {
+ _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
+ if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_OpenServiceA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_OpenServiceA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
+ ndr->depth++;
+ if (r->in.ServiceName) {
+ ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_OpenServiceA");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.buf_size));
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.buf_size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "query", r->out.query, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.status == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ if (r->out.required_buf_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.required_buf_size));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_status_0;
+ TALLOC_CTX *_mem_save_required_buf_size_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.buf_size));
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ ZERO_STRUCTP(r->out.status);
+ NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
+ ZERO_STRUCTP(r->out.required_buf_size);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.status);
+ }
+ _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.status));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
+ }
+ _mem_save_required_buf_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.required_buf_size, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.required_buf_size));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_required_buf_size_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "status", r->out.status);
+ ndr->depth++;
+ ndr_print_SERVICE_LOCK_STATUS(ndr, "status", r->out.status);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "required_buf_size", r->out.required_buf_size);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "required_buf_size", *r->out.required_buf_size);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
+ if (r->in.Arguments) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
+{
+ uint32_t _ptr_Arguments;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_Arguments_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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.NumArgs));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
+ if (_ptr_Arguments) {
+ NDR_PULL_ALLOC(ndr, r->in.Arguments);
+ } else {
+ r->in.Arguments = NULL;
+ }
+ if (r->in.Arguments) {
+ _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
+ if (ndr_get_array_length(ndr, &r->in.Arguments) > ndr_get_array_size(ndr, &r->in.Arguments)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.Arguments), ndr_get_array_length(ndr, &r->in.Arguments));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_StartServiceA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_StartServiceA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
+ ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
+ ndr->depth++;
+ if (r->in.Arguments) {
+ ndr_print_string(ndr, "Arguments", r->in.Arguments);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_StartServiceA");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
+ if (r->in.service_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
+ if (r->in.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.display_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.display_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
+ if (r->out.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
+{
+ uint32_t _ptr_service_name;
+ uint32_t _ptr_display_name;
+ uint32_t _ptr_display_name_length;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_service_name_0;
+ TALLOC_CTX *_mem_save_display_name_0;
+ TALLOC_CTX *_mem_save_display_name_length_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
+ if (_ptr_service_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_name);
+ } else {
+ r->in.service_name = NULL;
+ }
+ if (r->in.service_name) {
+ _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
+ if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->in.display_name_length);
+ } else {
+ r->in.display_name_length = NULL;
+ }
+ if (r->in.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.display_name);
+ ZERO_STRUCTP(r->out.display_name);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.display_name);
+ }
+ _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_display_name));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
+ if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->out.display_name_length);
+ } else {
+ r->out.display_name_length = NULL;
+ }
+ if (r->out.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_name", r->in.service_name);
+ ndr->depth++;
+ if (r->in.service_name) {
+ ndr_print_string(ndr, "service_name", r->in.service_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
+ ndr->depth++;
+ if (r->in.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "display_name", r->out.display_name);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "display_name", *r->out.display_name);
+ ndr->depth++;
+ ndr_print_string(ndr, "display_name", *r->out.display_name);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
+ ndr->depth++;
+ if (r->out.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
+ if (r->in.service_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
+ if (r->in.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.key_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.key_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
+ if (r->out.display_name_length) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
+{
+ uint32_t _ptr_service_name;
+ uint32_t _ptr_key_name;
+ uint32_t _ptr_display_name_length;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_service_name_0;
+ TALLOC_CTX *_mem_save_key_name_0;
+ TALLOC_CTX *_mem_save_display_name_length_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
+ if (_ptr_service_name) {
+ NDR_PULL_ALLOC(ndr, r->in.service_name);
+ } else {
+ r->in.service_name = NULL;
+ }
+ if (r->in.service_name) {
+ _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
+ if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->in.display_name_length);
+ } else {
+ r->in.display_name_length = NULL;
+ }
+ if (r->in.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.key_name);
+ ZERO_STRUCTP(r->out.key_name);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.key_name);
+ }
+ _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_key_name));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
+ if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
+ if (_ptr_display_name_length) {
+ NDR_PULL_ALLOC(ndr, r->out.display_name_length);
+ } else {
+ r->out.display_name_length = NULL;
+ }
+ if (r->out.display_name_length) {
+ _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_name", r->in.service_name);
+ ndr->depth++;
+ if (r->in.service_name) {
+ ndr_print_string(ndr, "service_name", r->in.service_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
+ ndr->depth++;
+ if (r->in.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "key_name", r->out.key_name);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "key_name", *r->out.key_name);
+ ndr->depth++;
+ ndr_print_string(ndr, "key_name", *r->out.key_name);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
+ ndr->depth++;
+ if (r->out.display_name_length) {
+ ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_GetCurrentGroupeStateW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_GetCurrentGroupeStateW");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_GetCurrentGroupeStateW");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_EnumServiceGroupW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_EnumServiceGroupW");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_EnumServiceGroupW");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
+ if (r->in.info) {
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ } else {
+ r->in.info = NULL;
+ }
+ if (r->in.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2A");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2A");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ 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_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ if (r->in.info) {
+ ndr_print_uint8(ndr, "info", *r->in.info);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2A");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
+ if (r->in.info) {
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ } else {
+ r->in.info = NULL;
+ }
+ if (r->in.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2W");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2W");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ 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_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ if (r->in.info) {
+ ndr_print_uint8(ndr, "info", *r->in.info);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2W");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2A");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2A");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ 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_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2W");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2W");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ 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_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 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_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_QueryServiceStatusEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatusEx");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ 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_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.scmanager == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ if (r->out.service_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ if (r->out.group_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.group_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
+{
+ uint32_t _ptr_resume_handle;
+ uint32_t _ptr_group_name;
+ TALLOC_CTX *_mem_save_scmanager_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_service_returned_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ TALLOC_CTX *_mem_save_group_name_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.scmanager);
+ }
+ _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.service_returned);
+ ZERO_STRUCTP(r->out.service_returned);
+ NDR_PULL_ALLOC(ndr, r->out.group_name);
+ ZERO_STRUCTP(r->out.group_name);
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.buf_size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.buf_size));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.service_returned);
+ }
+ _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.group_name);
+ }
+ _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_group_name));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
+ if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r)
+{
+ ndr_print_struct(ndr, name, "EnumServicesStatusExA");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "EnumServicesStatusExA");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "info_level", r->in.info_level);
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "state", r->in.state);
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "EnumServicesStatusExA");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "services", r->out.services, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "group_name", r->out.group_name);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "group_name", *r->out.group_name);
+ ndr->depth++;
+ ndr_print_string(ndr, "group_name", *r->out.group_name);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.scmanager == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ if (r->out.service_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+ }
+ if (r->out.group_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.group_name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
+{
+ uint32_t _ptr_resume_handle;
+ uint32_t _ptr_group_name;
+ TALLOC_CTX *_mem_save_scmanager_0;
+ TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_service_returned_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ TALLOC_CTX *_mem_save_group_name_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.scmanager);
+ }
+ _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+ } else {
+ r->in.resume_handle = NULL;
+ }
+ if (r->in.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.service_returned);
+ ZERO_STRUCTP(r->out.service_returned);
+ NDR_PULL_ALLOC(ndr, r->out.group_name);
+ ZERO_STRUCTP(r->out.group_name);
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.buf_size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.buf_size));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.service_returned);
+ }
+ _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.group_name);
+ }
+ _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_group_name));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
+ if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r)
+{
+ ndr_print_struct(ndr, name, "EnumServicesStatusExW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "EnumServicesStatusExW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "info_level", r->in.info_level);
+ ndr_print_uint32(ndr, "type", r->in.type);
+ ndr_print_uint32(ndr, "state", r->in.state);
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "EnumServicesStatusExW");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "services", r->out.services, r->in.buf_size);
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "group_name", r->out.group_name);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "group_name", *r->out.group_name);
+ ndr->depth++;
+ ndr_print_string(ndr, "group_name", *r->out.group_name);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r)
+{
+ ndr_print_struct(ndr, name, "svcctl_SCSendTSMessage");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "svcctl_SCSendTSMessage");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "svcctl_SCSendTSMessage");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+const struct dcerpc_interface_call svcctl_calls[] = {
+ {
+ "svcctl_CloseServiceHandle",
+ sizeof(struct svcctl_CloseServiceHandle),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
+ (ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
+ False,
+ },
+ {
+ "svcctl_ControlService",
+ sizeof(struct svcctl_ControlService),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
+ (ndr_print_function_t) ndr_print_svcctl_ControlService,
+ False,
+ },
+ {
+ "svcctl_DeleteService",
+ sizeof(struct svcctl_DeleteService),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
+ (ndr_print_function_t) ndr_print_svcctl_DeleteService,
+ False,
+ },
+ {
+ "svcctl_LockServiceDatabase",
+ sizeof(struct svcctl_LockServiceDatabase),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
+ (ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
+ False,
+ },
+ {
+ "svcctl_QueryServiceObjectSecurity",
+ sizeof(struct svcctl_QueryServiceObjectSecurity),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
+ False,
+ },
+ {
+ "svcctl_SetServiceObjectSecurity",
+ sizeof(struct svcctl_SetServiceObjectSecurity),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
+ (ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
+ False,
+ },
+ {
+ "svcctl_QueryServiceStatus",
+ sizeof(struct svcctl_QueryServiceStatus),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
+ False,
+ },
+ {
+ "svcctl_SetServiceStatus",
+ sizeof(struct svcctl_SetServiceStatus),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
+ (ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
+ False,
+ },
+ {
+ "svcctl_UnlockServiceDatabase",
+ sizeof(struct svcctl_UnlockServiceDatabase),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
+ (ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
+ False,
+ },
+ {
+ "svcctl_NotifyBootConfigStatus",
+ sizeof(struct svcctl_NotifyBootConfigStatus),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
+ (ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
+ False,
+ },
+ {
+ "svcctl_SCSetServiceBitsW",
+ sizeof(struct svcctl_SCSetServiceBitsW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
+ (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
+ False,
+ },
+ {
+ "svcctl_ChangeServiceConfigW",
+ sizeof(struct svcctl_ChangeServiceConfigW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
+ (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
+ False,
+ },
+ {
+ "svcctl_CreateServiceW",
+ sizeof(struct svcctl_CreateServiceW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
+ (ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
+ False,
+ },
+ {
+ "svcctl_EnumDependentServicesW",
+ sizeof(struct svcctl_EnumDependentServicesW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
+ (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
+ False,
+ },
+ {
+ "svcctl_EnumServicesStatusW",
+ sizeof(struct svcctl_EnumServicesStatusW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
+ (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
+ False,
+ },
+ {
+ "svcctl_OpenSCManagerW",
+ sizeof(struct svcctl_OpenSCManagerW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
+ (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
+ False,
+ },
+ {
+ "svcctl_OpenServiceW",
+ sizeof(struct svcctl_OpenServiceW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
+ (ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
+ False,
+ },
+ {
+ "svcctl_QueryServiceConfigW",
+ sizeof(struct svcctl_QueryServiceConfigW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
+ False,
+ },
+ {
+ "svcctl_QueryServiceLockStatusW",
+ sizeof(struct svcctl_QueryServiceLockStatusW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
+ False,
+ },
+ {
+ "svcctl_StartServiceW",
+ sizeof(struct svcctl_StartServiceW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
+ (ndr_print_function_t) ndr_print_svcctl_StartServiceW,
+ False,
+ },
+ {
+ "svcctl_GetServiceDisplayNameW",
+ sizeof(struct svcctl_GetServiceDisplayNameW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
+ (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
+ False,
+ },
+ {
+ "svcctl_GetServiceKeyNameW",
+ sizeof(struct svcctl_GetServiceKeyNameW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
+ (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
+ False,
+ },
+ {
+ "svcctl_SCSetServiceBitsA",
+ sizeof(struct svcctl_SCSetServiceBitsA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
+ (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
+ False,
+ },
+ {
+ "svcctl_ChangeServiceConfigA",
+ sizeof(struct svcctl_ChangeServiceConfigA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
+ (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
+ False,
+ },
+ {
+ "svcctl_CreateServiceA",
+ sizeof(struct svcctl_CreateServiceA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
+ (ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
+ False,
+ },
+ {
+ "svcctl_EnumDependentServicesA",
+ sizeof(struct svcctl_EnumDependentServicesA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
+ (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
+ False,
+ },
+ {
+ "svcctl_EnumServicesStatusA",
+ sizeof(struct svcctl_EnumServicesStatusA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
+ (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
+ False,
+ },
+ {
+ "svcctl_OpenSCManagerA",
+ sizeof(struct svcctl_OpenSCManagerA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
+ (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
+ False,
+ },
+ {
+ "svcctl_OpenServiceA",
+ sizeof(struct svcctl_OpenServiceA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
+ (ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
+ False,
+ },
+ {
+ "svcctl_QueryServiceConfigA",
+ sizeof(struct svcctl_QueryServiceConfigA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
+ False,
+ },
+ {
+ "svcctl_QueryServiceLockStatusA",
+ sizeof(struct svcctl_QueryServiceLockStatusA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
+ False,
+ },
+ {
+ "svcctl_StartServiceA",
+ sizeof(struct svcctl_StartServiceA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
+ (ndr_print_function_t) ndr_print_svcctl_StartServiceA,
+ False,
+ },
+ {
+ "svcctl_GetServiceDisplayNameA",
+ sizeof(struct svcctl_GetServiceDisplayNameA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
+ (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
+ False,
+ },
+ {
+ "svcctl_GetServiceKeyNameA",
+ sizeof(struct svcctl_GetServiceKeyNameA),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
+ (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
+ False,
+ },
+ {
+ "svcctl_GetCurrentGroupeStateW",
+ sizeof(struct svcctl_GetCurrentGroupeStateW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
+ (ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
+ False,
+ },
+ {
+ "svcctl_EnumServiceGroupW",
+ sizeof(struct svcctl_EnumServiceGroupW),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
+ (ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
+ False,
+ },
+ {
+ "svcctl_ChangeServiceConfig2A",
+ sizeof(struct svcctl_ChangeServiceConfig2A),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
+ (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
+ False,
+ },
+ {
+ "svcctl_ChangeServiceConfig2W",
+ sizeof(struct svcctl_ChangeServiceConfig2W),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
+ (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
+ False,
+ },
+ {
+ "svcctl_QueryServiceConfig2A",
+ sizeof(struct svcctl_QueryServiceConfig2A),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
+ False,
+ },
+ {
+ "svcctl_QueryServiceConfig2W",
+ sizeof(struct svcctl_QueryServiceConfig2W),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
+ False,
+ },
+ {
+ "svcctl_QueryServiceStatusEx",
+ sizeof(struct svcctl_QueryServiceStatusEx),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
+ (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
+ False,
+ },
+ {
+ "EnumServicesStatusExA",
+ sizeof(struct EnumServicesStatusExA),
+ (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExA,
+ (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExA,
+ (ndr_print_function_t) ndr_print_EnumServicesStatusExA,
+ False,
+ },
+ {
+ "EnumServicesStatusExW",
+ sizeof(struct EnumServicesStatusExW),
+ (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExW,
+ (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExW,
+ (ndr_print_function_t) ndr_print_EnumServicesStatusExW,
+ False,
+ },
+ {
+ "svcctl_SCSendTSMessage",
+ sizeof(struct svcctl_SCSendTSMessage),
+ (ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
+ (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
+ (ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
+ False,
+ },
+ { NULL, 0, NULL, NULL, NULL, False }
+};
+
+const char * const svcctl_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\svcctl]",
+ "ncalrpc:",
+};
+
+const struct dcerpc_endpoint_list svcctl_endpoints = {
+ .count = 2,
+ .names = svcctl_endpoint_strings
+};
+
+const char * const svcctl_authservice_strings[] = {
+ "host",
+};
+
+const struct dcerpc_authservice_list svcctl_authservices = {
+ .count = 2,
+ .names = svcctl_authservice_strings
+};
+
+
+const struct dcerpc_interface_table dcerpc_table_svcctl = {
+ .name = "svcctl",
+ .syntax_id = {
+ {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
+ DCERPC_SVCCTL_VERSION
+ },
+ .helpstring = DCERPC_SVCCTL_HELPSTRING,
+ .num_calls = 44,
+ .calls = svcctl_calls,
+ .endpoints = &svcctl_endpoints,
+ .authservices = &svcctl_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_svcctl.h b/source3/librpc/gen_ndr/ndr_svcctl.h
new file mode 100644
index 0000000000..83a1c2d58e
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_svcctl.h
@@ -0,0 +1,154 @@
+/* header auto-generated by pidl */
+
+#include "librpc/gen_ndr/svcctl.h"
+
+#ifndef _HEADER_NDR_svcctl
+#define _HEADER_NDR_svcctl
+
+#include "librpc/ndr/libndr.h"
+#define DCERPC_SVCCTL_UUID "367abb81-9844-35f1-ad32-98f038001003"
+#define DCERPC_SVCCTL_VERSION 2.0
+#define DCERPC_SVCCTL_NAME "svcctl"
+#define DCERPC_SVCCTL_HELPSTRING "Service Control"
+extern const struct dcerpc_interface_table dcerpc_table_svcctl;
+NTSTATUS dcerpc_server_svcctl_init(void);
+#define DCERPC_SVCCTL_CLOSESERVICEHANDLE (0x00)
+
+#define DCERPC_SVCCTL_CONTROLSERVICE (0x01)
+
+#define DCERPC_SVCCTL_DELETESERVICE (0x02)
+
+#define DCERPC_SVCCTL_LOCKSERVICEDATABASE (0x03)
+
+#define DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY (0x04)
+
+#define DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY (0x05)
+
+#define DCERPC_SVCCTL_QUERYSERVICESTATUS (0x06)
+
+#define DCERPC_SVCCTL_SETSERVICESTATUS (0x07)
+
+#define DCERPC_SVCCTL_UNLOCKSERVICEDATABASE (0x08)
+
+#define DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS (0x09)
+
+#define DCERPC_SVCCTL_SCSETSERVICEBITSW (0x0a)
+
+#define DCERPC_SVCCTL_CHANGESERVICECONFIGW (0x0b)
+
+#define DCERPC_SVCCTL_CREATESERVICEW (0x0c)
+
+#define DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW (0x0d)
+
+#define DCERPC_SVCCTL_ENUMSERVICESSTATUSW (0x0e)
+
+#define DCERPC_SVCCTL_OPENSCMANAGERW (0x0f)
+
+#define DCERPC_SVCCTL_OPENSERVICEW (0x10)
+
+#define DCERPC_SVCCTL_QUERYSERVICECONFIGW (0x11)
+
+#define DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW (0x12)
+
+#define DCERPC_SVCCTL_STARTSERVICEW (0x13)
+
+#define DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW (0x14)
+
+#define DCERPC_SVCCTL_GETSERVICEKEYNAMEW (0x15)
+
+#define DCERPC_SVCCTL_SCSETSERVICEBITSA (0x16)
+
+#define DCERPC_SVCCTL_CHANGESERVICECONFIGA (0x17)
+
+#define DCERPC_SVCCTL_CREATESERVICEA (0x18)
+
+#define DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA (0x19)
+
+#define DCERPC_SVCCTL_ENUMSERVICESSTATUSA (0x1a)
+
+#define DCERPC_SVCCTL_OPENSCMANAGERA (0x1b)
+
+#define DCERPC_SVCCTL_OPENSERVICEA (0x1c)
+
+#define DCERPC_SVCCTL_QUERYSERVICECONFIGA (0x1d)
+
+#define DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA (0x1e)
+
+#define DCERPC_SVCCTL_STARTSERVICEA (0x1f)
+
+#define DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA (0x20)
+
+#define DCERPC_SVCCTL_GETSERVICEKEYNAMEA (0x21)
+
+#define DCERPC_SVCCTL_GETCURRENTGROUPESTATEW (0x22)
+
+#define DCERPC_SVCCTL_ENUMSERVICEGROUPW (0x23)
+
+#define DCERPC_SVCCTL_CHANGESERVICECONFIG2A (0x24)
+
+#define DCERPC_SVCCTL_CHANGESERVICECONFIG2W (0x25)
+
+#define DCERPC_SVCCTL_QUERYSERVICECONFIG2A (0x26)
+
+#define DCERPC_SVCCTL_QUERYSERVICECONFIG2W (0x27)
+
+#define DCERPC_SVCCTL_QUERYSERVICESTATUSEX (0x28)
+
+#define DCERPC_ENUMSERVICESSTATUSEXA (0x29)
+
+#define DCERPC_ENUMSERVICESSTATUSEXW (0x2a)
+
+#define DCERPC_SVCCTL_SCSENDTSMESSAGE (0x2b)
+
+#define DCERPC_SVCCTL_CALL_COUNT (44)
+void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r);
+void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r);
+void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUS *r);
+NTSTATUS ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+NTSTATUS ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t 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);
+void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);
+void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r);
+void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r);
+void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r);
+void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r);
+void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r);
+void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r);
+void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r);
+void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r);
+void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r);
+void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r);
+void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r);
+void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r);
+void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r);
+void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r);
+void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r);
+void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r);
+void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r);
+void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r);
+void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r);
+void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r);
+void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r);
+void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r);
+void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r);
+void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r);
+void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r);
+void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r);
+void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r);
+void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r);
+void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r);
+void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r);
+void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r);
+void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r);
+void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r);
+void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r);
+void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r);
+void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r);
+void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r);
+void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r);
+void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r);
+void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r);
+void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r);
+#endif /* _HEADER_NDR_svcctl */
diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c
new file mode 100644
index 0000000000..0d6df7d83f
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_srvsvc.c
@@ -0,0 +1,3286 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_srvsvc.h"
+
+static BOOL api_srvsvc_NetCharDevEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetCharDevEnum(p, r.in.server_unc, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetCharDevGetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevGetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevGetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevGetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetCharDevGetInfo(p, r.in.server_unc, r.in.device_name, r.in.level, r.out.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevGetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetCharDevControl(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevControl r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevControl");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevControl(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl, &r);
+
+ r.out.result = _srvsvc_NetCharDevControl(p, r.in.server_unc, r.in.device_name, r.in.opcode);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevControl(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetCharDevQEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevQEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevQEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevQEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetCharDevQEnum(p, r.in.server_unc, r.in.user, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevQEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetCharDevQGetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevQGetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevQGetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevQGetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetCharDevQGetInfo(p, r.in.server_unc, r.in.queue_name, r.in.user, r.in.level, r.out.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevQGetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetCharDevQSetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevQSetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevQSetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevQSetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.parm_error = r.in.parm_error;
+ r.out.result = _srvsvc_NetCharDevQSetInfo(p, r.in.server_unc, r.in.queue_name, r.in.level, r.in.info, r.in.parm_error);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevQSetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetCharDevQPurge(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevQPurge r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevQPurge");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevQPurge(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge, &r);
+
+ r.out.result = _srvsvc_NetCharDevQPurge(p, r.in.server_unc, r.in.queue_name);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevQPurge(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetCharDevQPurgeSelf r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetCharDevQPurgeSelf");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetCharDevQPurgeSelf(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf, &r);
+
+ r.out.result = _srvsvc_NetCharDevQPurgeSelf(p, r.in.server_unc, r.in.queue_name, r.in.computer_name);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetCharDevQPurgeSelf(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetConnEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetConnEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetConnEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetConnEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetConnEnum(p, r.in.server_unc, r.in.path, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetConnEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetFileEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetFileEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetFileEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetFileEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetFileEnum(p, r.in.server_unc, r.in.path, r.in.user, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetFileEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetFileGetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetFileGetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetFileGetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetFileGetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetFileGetInfo(p, r.in.server_unc, r.in.fid, r.in.level, r.out.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetFileGetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetFileClose(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetFileClose r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetFileClose");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetFileClose(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose, &r);
+
+ r.out.result = _srvsvc_NetFileClose(p, r.in.server_unc, r.in.fid);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetFileClose(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetSessEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetSessEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetSessEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetSessEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetSessEnum(p, r.in.server_unc, r.in.client, r.in.user, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetSessEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetSessDel(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetSessDel r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetSessDel");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetSessDel(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel, &r);
+
+ r.out.result = _srvsvc_NetSessDel(p, r.in.server_unc, r.in.client, r.in.user);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetSessDel(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareAdd(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareAdd r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareAdd");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareAdd(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.parm_error = r.in.parm_error;
+ r.out.result = _srvsvc_NetShareAdd(p, r.in.server_unc, r.in.level, r.in.info, r.in.parm_error);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareAdd(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareEnumAll(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareEnumAll r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareEnumAll");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareEnumAll(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetShareEnumAll(p, r.in.server_unc, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareEnumAll(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareGetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareGetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareGetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareGetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetShareGetInfo(p, r.in.server_unc, r.in.share_name, r.in.level, r.out.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareGetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareSetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareSetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareSetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareSetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.parm_error = r.in.parm_error;
+ r.out.result = _srvsvc_NetShareSetInfo(p, r.in.server_unc, r.in.share_name, r.in.level, r.in.info, r.in.parm_error);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareSetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareDel(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareDel r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareDel");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareDel(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel, &r);
+
+ r.out.result = _srvsvc_NetShareDel(p, r.in.server_unc, r.in.share_name, r.in.reserved);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareDel(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareDelSticky(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareDelSticky r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareDelSticky");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareDelSticky(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky, &r);
+
+ r.out.result = _srvsvc_NetShareDelSticky(p, r.in.server_unc, r.in.share_name, r.in.reserved);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareDelSticky(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareCheck(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareCheck r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareCheck");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareCheck(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.type = talloc_zero_size(mem_ctx, sizeof(*r.out.type));
+ if (r.out.type == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetShareCheck(p, r.in.server_unc, r.in.device_name, r.out.type);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareCheck(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetSrvGetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetSrvGetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetSrvGetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetSrvGetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetSrvGetInfo(p, r.in.server_unc, r.in.level, r.out.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetSrvGetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetSrvSetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetSrvSetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetSrvSetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetSrvSetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.parm_error = r.in.parm_error;
+ r.out.result = _srvsvc_NetSrvSetInfo(p, r.in.server_unc, r.in.level, r.in.info, r.in.parm_error);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetSrvSetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetDiskEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetDiskEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetDiskEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetDiskEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.info = r.in.info;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetDiskEnum(p, r.in.server_unc, r.in.level, r.in.info, r.in.maxlen, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetDiskEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetServerStatisticsGet(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetServerStatisticsGet r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetServerStatisticsGet");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetServerStatisticsGet(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.stat = talloc_zero_size(mem_ctx, sizeof(*r.out.stat));
+ if (r.out.stat == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetServerStatisticsGet(p, r.in.server_unc, r.in.service, r.in.level, r.in.options, r.out.stat);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetServerStatisticsGet(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetTransportAdd(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetTransportAdd r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetTransportAdd");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetTransportAdd(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd, &r);
+
+ r.out.result = _srvsvc_NetTransportAdd(p, r.in.server_unc, r.in.level, r.in.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetTransportAdd(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetTransportEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetTransportEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetTransportEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetTransportEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.transports = r.in.transports;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetTransportEnum(p, r.in.server_unc, r.in.level, r.in.transports, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetTransportEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetTransportDel(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetTransportDel r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetTransportDel");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetTransportDel(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel, &r);
+
+ r.out.result = _srvsvc_NetTransportDel(p, r.in.server_unc, r.in.unknown, r.in.transport);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetTransportDel(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetRemoteTOD(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetRemoteTOD r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetRemoteTOD");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetRemoteTOD(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetRemoteTOD(p, r.in.server_unc, r.out.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetRemoteTOD(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetSetServiceBits(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetSetServiceBits r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetSetServiceBits");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetSetServiceBits(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits, &r);
+
+ r.out.result = _srvsvc_NetSetServiceBits(p, r.in.server_unc, r.in.transport, r.in.servicebits, r.in.updateimmediately);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetSetServiceBits(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetPathType(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetPathType r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetPathType");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetPathType(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPathType, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.pathtype = talloc_zero_size(mem_ctx, sizeof(*r.out.pathtype));
+ if (r.out.pathtype == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetPathType(p, r.in.server_unc, r.in.path, r.in.pathflags, r.out.pathtype);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetPathType(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetPathCanonicalize(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetPathCanonicalize r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetPathCanonicalize");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetPathCanonicalize(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.can_path = talloc_zero_size(mem_ctx, sizeof(*r.out.can_path) * r.in.maxbuf);
+ if (r.out.can_path == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.pathtype = r.in.pathtype;
+ r.out.result = _srvsvc_NetPathCanonicalize(p, r.in.server_unc, r.in.path, r.out.can_path, r.in.maxbuf, r.in.prefix, r.in.pathtype, r.in.pathflags);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetPathCanonicalize(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetPathCompare(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetPathCompare r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetPathCompare");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetPathCompare(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare, &r);
+
+ r.out.result = _srvsvc_NetPathCompare(p, r.in.server_unc, r.in.path1, r.in.path2, r.in.pathtype, r.in.pathflags);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetPathCompare(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetNameValidate(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetNameValidate r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetNameValidate");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetNameValidate(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate, &r);
+
+ r.out.result = _srvsvc_NetNameValidate(p, r.in.server_unc, r.in.name, r.in.name_type, r.in.flags);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetNameValidate(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRPRNAMECANONICALIZE r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRPRNAMECANONICALIZE");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &r);
+
+ r.out.result = _srvsvc_NETRPRNAMECANONICALIZE(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRPRNAMECANONICALIZE(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetPRNameCompare(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetPRNameCompare r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetPRNameCompare");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetPRNameCompare(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare, &r);
+
+ r.out.result = _srvsvc_NetPRNameCompare(p, r.in.server_unc, r.in.name1, r.in.name2, r.in.name_type, r.in.flags);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetPRNameCompare(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _srvsvc_NetShareEnum(p, r.in.server_unc, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareDelStart(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareDelStart r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareDelStart");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareDelStart(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.hnd = talloc_zero_size(mem_ctx, sizeof(*r.out.hnd));
+ if (r.out.hnd == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetShareDelStart(p, r.in.server_unc, r.in.share, r.in.reserved, r.out.hnd);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareDelStart(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetShareDelCommit(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetShareDelCommit r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetShareDelCommit");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetShareDelCommit(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.hnd = r.in.hnd;
+ r.out.result = _srvsvc_NetShareDelCommit(p, r.in.hnd);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetShareDelCommit(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetGetFileSecurity(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetGetFileSecurity r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetGetFileSecurity");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetGetFileSecurity(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.sd_buf = talloc_zero_size(mem_ctx, sizeof(*r.out.sd_buf));
+ if (r.out.sd_buf == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _srvsvc_NetGetFileSecurity(p, r.in.server_unc, r.in.share, r.in.file, r.in.securityinformation, r.out.sd_buf);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetGetFileSecurity(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetSetFileSecurity(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetSetFileSecurity r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetSetFileSecurity");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetSetFileSecurity(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity, &r);
+
+ r.out.result = _srvsvc_NetSetFileSecurity(p, r.in.server_unc, r.in.share, r.in.file, r.in.securityinformation, r.in.sd_buf);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetSetFileSecurity(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetServerTransportAddEx(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetServerTransportAddEx r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetServerTransportAddEx");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetServerTransportAddEx(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx, &r);
+
+ r.out.result = _srvsvc_NetServerTransportAddEx(p, r.in.server_unc, r.in.level, r.in.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetServerTransportAddEx(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NetServerSetServiceBitsEx r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NetServerSetServiceBitsEx");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NetServerSetServiceBitsEx(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx, &r);
+
+ r.out.result = _srvsvc_NetServerSetServiceBitsEx(p, r.in.server_unc, r.in.emulated_server_unc, r.in.transport, r.in.servicebitsofinterest, r.in.servicebits, r.in.updateimmediately);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NetServerSetServiceBitsEx(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSGETVERSION(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSGETVERSION r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSGETVERSION");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSGETVERSION(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION, &r);
+
+ r.out.result = _srvsvc_NETRDFSGETVERSION(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSGETVERSION(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSCREATELOCALPARTITION r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSCREATELOCALPARTITION");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &r);
+
+ r.out.result = _srvsvc_NETRDFSCREATELOCALPARTITION(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSDELETELOCALPARTITION r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSDELETELOCALPARTITION");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &r);
+
+ r.out.result = _srvsvc_NETRDFSDELETELOCALPARTITION(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSSETLOCALVOLUMESTATE r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSSETLOCALVOLUMESTATE");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &r);
+
+ r.out.result = _srvsvc_NETRDFSSETLOCALVOLUMESTATE(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSSETSERVERINFO r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSSETSERVERINFO");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSSETSERVERINFO(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &r);
+
+ r.out.result = _srvsvc_NETRDFSSETSERVERINFO(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSSETSERVERINFO(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSCREATEEXITPOINT r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSCREATEEXITPOINT");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &r);
+
+ r.out.result = _srvsvc_NETRDFSCREATEEXITPOINT(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSDELETEEXITPOINT r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSDELETEEXITPOINT");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &r);
+
+ r.out.result = _srvsvc_NETRDFSDELETEEXITPOINT(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSMODIFYPREFIX r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSMODIFYPREFIX");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &r);
+
+ r.out.result = _srvsvc_NETRDFSMODIFYPREFIX(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSMODIFYPREFIX(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSFIXLOCALVOLUME r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSFIXLOCALVOLUME");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &r);
+
+ r.out.result = _srvsvc_NETRDFSFIXLOCALVOLUME(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRDFSMANAGERREPORTSITEINFO r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRDFSMANAGERREPORTSITEINFO");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &r);
+
+ r.out.result = _srvsvc_NETRDFSMANAGERREPORTSITEINFO(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct srvsvc_NETRSERVERTRANSPORTDELEX r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_srvsvc_NETRSERVERTRANSPORTDELEX");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &r);
+
+ r.out.result = _srvsvc_NETRSERVERTRANSPORTDELEX(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+
+/* Tables */
+static struct api_struct api_srvsvc_cmds[] =
+{
+ {"SRVSVC_NETCHARDEVENUM", DCERPC_SRVSVC_NETCHARDEVENUM, api_srvsvc_NetCharDevEnum},
+ {"SRVSVC_NETCHARDEVGETINFO", DCERPC_SRVSVC_NETCHARDEVGETINFO, api_srvsvc_NetCharDevGetInfo},
+ {"SRVSVC_NETCHARDEVCONTROL", DCERPC_SRVSVC_NETCHARDEVCONTROL, api_srvsvc_NetCharDevControl},
+ {"SRVSVC_NETCHARDEVQENUM", DCERPC_SRVSVC_NETCHARDEVQENUM, api_srvsvc_NetCharDevQEnum},
+ {"SRVSVC_NETCHARDEVQGETINFO", DCERPC_SRVSVC_NETCHARDEVQGETINFO, api_srvsvc_NetCharDevQGetInfo},
+ {"SRVSVC_NETCHARDEVQSETINFO", DCERPC_SRVSVC_NETCHARDEVQSETINFO, api_srvsvc_NetCharDevQSetInfo},
+ {"SRVSVC_NETCHARDEVQPURGE", DCERPC_SRVSVC_NETCHARDEVQPURGE, api_srvsvc_NetCharDevQPurge},
+ {"SRVSVC_NETCHARDEVQPURGESELF", DCERPC_SRVSVC_NETCHARDEVQPURGESELF, api_srvsvc_NetCharDevQPurgeSelf},
+ {"SRVSVC_NETCONNENUM", DCERPC_SRVSVC_NETCONNENUM, api_srvsvc_NetConnEnum},
+ {"SRVSVC_NETFILEENUM", DCERPC_SRVSVC_NETFILEENUM, api_srvsvc_NetFileEnum},
+ {"SRVSVC_NETFILEGETINFO", DCERPC_SRVSVC_NETFILEGETINFO, api_srvsvc_NetFileGetInfo},
+ {"SRVSVC_NETFILECLOSE", DCERPC_SRVSVC_NETFILECLOSE, api_srvsvc_NetFileClose},
+ {"SRVSVC_NETSESSENUM", DCERPC_SRVSVC_NETSESSENUM, api_srvsvc_NetSessEnum},
+ {"SRVSVC_NETSESSDEL", DCERPC_SRVSVC_NETSESSDEL, api_srvsvc_NetSessDel},
+ {"SRVSVC_NETSHAREADD", DCERPC_SRVSVC_NETSHAREADD, api_srvsvc_NetShareAdd},
+ {"SRVSVC_NETSHAREENUMALL", DCERPC_SRVSVC_NETSHAREENUMALL, api_srvsvc_NetShareEnumAll},
+ {"SRVSVC_NETSHAREGETINFO", DCERPC_SRVSVC_NETSHAREGETINFO, api_srvsvc_NetShareGetInfo},
+ {"SRVSVC_NETSHARESETINFO", DCERPC_SRVSVC_NETSHARESETINFO, api_srvsvc_NetShareSetInfo},
+ {"SRVSVC_NETSHAREDEL", DCERPC_SRVSVC_NETSHAREDEL, api_srvsvc_NetShareDel},
+ {"SRVSVC_NETSHAREDELSTICKY", DCERPC_SRVSVC_NETSHAREDELSTICKY, api_srvsvc_NetShareDelSticky},
+ {"SRVSVC_NETSHARECHECK", DCERPC_SRVSVC_NETSHARECHECK, api_srvsvc_NetShareCheck},
+ {"SRVSVC_NETSRVGETINFO", DCERPC_SRVSVC_NETSRVGETINFO, api_srvsvc_NetSrvGetInfo},
+ {"SRVSVC_NETSRVSETINFO", DCERPC_SRVSVC_NETSRVSETINFO, api_srvsvc_NetSrvSetInfo},
+ {"SRVSVC_NETDISKENUM", DCERPC_SRVSVC_NETDISKENUM, api_srvsvc_NetDiskEnum},
+ {"SRVSVC_NETSERVERSTATISTICSGET", DCERPC_SRVSVC_NETSERVERSTATISTICSGET, api_srvsvc_NetServerStatisticsGet},
+ {"SRVSVC_NETTRANSPORTADD", DCERPC_SRVSVC_NETTRANSPORTADD, api_srvsvc_NetTransportAdd},
+ {"SRVSVC_NETTRANSPORTENUM", DCERPC_SRVSVC_NETTRANSPORTENUM, api_srvsvc_NetTransportEnum},
+ {"SRVSVC_NETTRANSPORTDEL", DCERPC_SRVSVC_NETTRANSPORTDEL, api_srvsvc_NetTransportDel},
+ {"SRVSVC_NETREMOTETOD", DCERPC_SRVSVC_NETREMOTETOD, api_srvsvc_NetRemoteTOD},
+ {"SRVSVC_NETSETSERVICEBITS", DCERPC_SRVSVC_NETSETSERVICEBITS, api_srvsvc_NetSetServiceBits},
+ {"SRVSVC_NETPATHTYPE", DCERPC_SRVSVC_NETPATHTYPE, api_srvsvc_NetPathType},
+ {"SRVSVC_NETPATHCANONICALIZE", DCERPC_SRVSVC_NETPATHCANONICALIZE, api_srvsvc_NetPathCanonicalize},
+ {"SRVSVC_NETPATHCOMPARE", DCERPC_SRVSVC_NETPATHCOMPARE, api_srvsvc_NetPathCompare},
+ {"SRVSVC_NETNAMEVALIDATE", DCERPC_SRVSVC_NETNAMEVALIDATE, api_srvsvc_NetNameValidate},
+ {"SRVSVC_NETRPRNAMECANONICALIZE", DCERPC_SRVSVC_NETRPRNAMECANONICALIZE, api_srvsvc_NETRPRNAMECANONICALIZE},
+ {"SRVSVC_NETPRNAMECOMPARE", DCERPC_SRVSVC_NETPRNAMECOMPARE, api_srvsvc_NetPRNameCompare},
+ {"SRVSVC_NETSHAREENUM", DCERPC_SRVSVC_NETSHAREENUM, api_srvsvc_NetShareEnum},
+ {"SRVSVC_NETSHAREDELSTART", DCERPC_SRVSVC_NETSHAREDELSTART, api_srvsvc_NetShareDelStart},
+ {"SRVSVC_NETSHAREDELCOMMIT", DCERPC_SRVSVC_NETSHAREDELCOMMIT, api_srvsvc_NetShareDelCommit},
+ {"SRVSVC_NETGETFILESECURITY", DCERPC_SRVSVC_NETGETFILESECURITY, api_srvsvc_NetGetFileSecurity},
+ {"SRVSVC_NETSETFILESECURITY", DCERPC_SRVSVC_NETSETFILESECURITY, api_srvsvc_NetSetFileSecurity},
+ {"SRVSVC_NETSERVERTRANSPORTADDEX", DCERPC_SRVSVC_NETSERVERTRANSPORTADDEX, api_srvsvc_NetServerTransportAddEx},
+ {"SRVSVC_NETSERVERSETSERVICEBITSEX", DCERPC_SRVSVC_NETSERVERSETSERVICEBITSEX, api_srvsvc_NetServerSetServiceBitsEx},
+ {"SRVSVC_NETRDFSGETVERSION", DCERPC_SRVSVC_NETRDFSGETVERSION, api_srvsvc_NETRDFSGETVERSION},
+ {"SRVSVC_NETRDFSCREATELOCALPARTITION", DCERPC_SRVSVC_NETRDFSCREATELOCALPARTITION, api_srvsvc_NETRDFSCREATELOCALPARTITION},
+ {"SRVSVC_NETRDFSDELETELOCALPARTITION", DCERPC_SRVSVC_NETRDFSDELETELOCALPARTITION, api_srvsvc_NETRDFSDELETELOCALPARTITION},
+ {"SRVSVC_NETRDFSSETLOCALVOLUMESTATE", DCERPC_SRVSVC_NETRDFSSETLOCALVOLUMESTATE, api_srvsvc_NETRDFSSETLOCALVOLUMESTATE},
+ {"SRVSVC_NETRDFSSETSERVERINFO", DCERPC_SRVSVC_NETRDFSSETSERVERINFO, api_srvsvc_NETRDFSSETSERVERINFO},
+ {"SRVSVC_NETRDFSCREATEEXITPOINT", DCERPC_SRVSVC_NETRDFSCREATEEXITPOINT, api_srvsvc_NETRDFSCREATEEXITPOINT},
+ {"SRVSVC_NETRDFSDELETEEXITPOINT", DCERPC_SRVSVC_NETRDFSDELETEEXITPOINT, api_srvsvc_NETRDFSDELETEEXITPOINT},
+ {"SRVSVC_NETRDFSMODIFYPREFIX", DCERPC_SRVSVC_NETRDFSMODIFYPREFIX, api_srvsvc_NETRDFSMODIFYPREFIX},
+ {"SRVSVC_NETRDFSFIXLOCALVOLUME", DCERPC_SRVSVC_NETRDFSFIXLOCALVOLUME, api_srvsvc_NETRDFSFIXLOCALVOLUME},
+ {"SRVSVC_NETRDFSMANAGERREPORTSITEINFO", DCERPC_SRVSVC_NETRDFSMANAGERREPORTSITEINFO, api_srvsvc_NETRDFSMANAGERREPORTSITEINFO},
+ {"SRVSVC_NETRSERVERTRANSPORTDELEX", DCERPC_SRVSVC_NETRSERVERTRANSPORTDELEX, api_srvsvc_NETRSERVERTRANSPORTDELEX},
+};
+
+void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_srvsvc_cmds;
+ *n_fns = sizeof(api_srvsvc_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_srvsvc_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "srvsvc", "srvsvc", api_srvsvc_cmds, sizeof(api_srvsvc_cmds) / sizeof(struct api_struct));
+}
diff --git a/source3/librpc/gen_ndr/srv_srvsvc.h b/source3/librpc/gen_ndr/srv_srvsvc.h
new file mode 100644
index 0000000000..96a70ad772
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_srvsvc.h
@@ -0,0 +1,60 @@
+#include "librpc/gen_ndr/ndr_srvsvc.h"
+#ifndef __SRV_SRVSVC__
+#define __SRV_SRVSVC__
+WERROR _srvsvc_NetCharDevEnum(pipes_struct *p, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetCharDevGetInfo(pipes_struct *p, const char *server_unc, const char *device_name, uint32_t level, union srvsvc_NetCharDevInfo *info);
+WERROR _srvsvc_NetCharDevControl(pipes_struct *p, const char *server_unc, const char *device_name, uint32_t opcode);
+WERROR _srvsvc_NetCharDevQEnum(pipes_struct *p, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetCharDevQGetInfo(pipes_struct *p, const char *server_unc, const char *queue_name, const char *user, uint32_t level, union srvsvc_NetCharDevQInfo *info);
+WERROR _srvsvc_NetCharDevQSetInfo(pipes_struct *p, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t *parm_error);
+WERROR _srvsvc_NetCharDevQPurge(pipes_struct *p, const char *server_unc, const char *queue_name);
+WERROR _srvsvc_NetCharDevQPurgeSelf(pipes_struct *p, const char *server_unc, const char *queue_name, const char *computer_name);
+WERROR _srvsvc_NetConnEnum(pipes_struct *p, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetFileEnum(pipes_struct *p, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetFileGetInfo(pipes_struct *p, const char *server_unc, uint32_t fid, uint32_t level, union srvsvc_NetFileInfo *info);
+WERROR _srvsvc_NetFileClose(pipes_struct *p, const char *server_unc, uint32_t fid);
+WERROR _srvsvc_NetSessEnum(pipes_struct *p, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetSessDel(pipes_struct *p, const char *server_unc, const char *client, const char *user);
+WERROR _srvsvc_NetShareAdd(pipes_struct *p, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error);
+WERROR _srvsvc_NetShareEnumAll(pipes_struct *p, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetShareGetInfo(pipes_struct *p, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo *info);
+WERROR _srvsvc_NetShareSetInfo(pipes_struct *p, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error);
+WERROR _srvsvc_NetShareDel(pipes_struct *p, const char *server_unc, const char *share_name, uint32_t reserved);
+WERROR _srvsvc_NetShareDelSticky(pipes_struct *p, const char *server_unc, const char *share_name, uint32_t reserved);
+WERROR _srvsvc_NetShareCheck(pipes_struct *p, const char *server_unc, const char *device_name, enum srvsvc_ShareType *type);
+WERROR _srvsvc_NetSrvGetInfo(pipes_struct *p, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo *info);
+WERROR _srvsvc_NetSrvSetInfo(pipes_struct *p, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t *parm_error);
+WERROR _srvsvc_NetDiskEnum(pipes_struct *p, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetServerStatisticsGet(pipes_struct *p, const char *server_unc, const char *service, uint32_t level, uint32_t options, struct srvsvc_Statistics *stat);
+WERROR _srvsvc_NetTransportAdd(pipes_struct *p, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info);
+WERROR _srvsvc_NetTransportEnum(pipes_struct *p, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetTransportDel(pipes_struct *p, const char *server_unc, uint32_t unknown, struct srvsvc_NetTransportInfo0 transport);
+WERROR _srvsvc_NetRemoteTOD(pipes_struct *p, const char *server_unc, struct srvsvc_NetRemoteTODInfo *info);
+WERROR _srvsvc_NetSetServiceBits(pipes_struct *p, const char *server_unc, const char *transport, uint32_t servicebits, uint32_t updateimmediately);
+WERROR _srvsvc_NetPathType(pipes_struct *p, const char *server_unc, const char *path, uint32_t pathflags, uint32_t *pathtype);
+WERROR _srvsvc_NetPathCanonicalize(pipes_struct *p, const char *server_unc, const char *path, uint8_t *can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags);
+WERROR _srvsvc_NetPathCompare(pipes_struct *p, const char *server_unc, const char *path1, const char *path2, uint32_t pathtype, uint32_t pathflags);
+WERROR _srvsvc_NetNameValidate(pipes_struct *p, const char *server_unc, const char *name, uint32_t name_type, uint32_t flags);
+WERROR _srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p);
+WERROR _srvsvc_NetPRNameCompare(pipes_struct *p, const char *server_unc, const char *name1, const char *name2, uint32_t name_type, uint32_t flags);
+WERROR _srvsvc_NetShareEnum(pipes_struct *p, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
+WERROR _srvsvc_NetShareDelStart(pipes_struct *p, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle *hnd);
+WERROR _srvsvc_NetShareDelCommit(pipes_struct *p, struct policy_handle *hnd);
+WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf *sd_buf);
+WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf sd_buf);
+WERROR _srvsvc_NetServerTransportAddEx(pipes_struct *p, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info);
+WERROR _srvsvc_NetServerSetServiceBitsEx(pipes_struct *p, const char *server_unc, const char *emulated_server_unc, const char *transport, uint32_t servicebitsofinterest, uint32_t servicebits, uint32_t updateimmediately);
+WERROR _srvsvc_NETRDFSGETVERSION(pipes_struct *p);
+WERROR _srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p);
+WERROR _srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p);
+WERROR _srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p);
+WERROR _srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p);
+WERROR _srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p);
+WERROR _srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p);
+WERROR _srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p);
+WERROR _srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p);
+WERROR _srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p);
+WERROR _srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p);
+void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_srvsvc_init(void);
+#endif /* __SRV_SRVSVC__ */
diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c
new file mode 100644
index 0000000000..9d2ad44219
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_svcctl.c
@@ -0,0 +1,2860 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_svcctl.h"
+
+static BOOL api_svcctl_CloseServiceHandle(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_CloseServiceHandle r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CloseServiceHandle");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_CloseServiceHandle(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.handle = r.in.handle;
+ r.out.result = _svcctl_CloseServiceHandle(p, r.in.handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_CloseServiceHandle(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_ControlService(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_ControlService r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ControlService");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_ControlService(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status));
+ if (r.out.status == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_ControlService(p, r.in.handle, r.in.control, r.out.status);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_ControlService(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_DeleteService(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_DeleteService r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_DeleteService");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_DeleteService(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &r);
+
+ r.out.result = _svcctl_DeleteService(p, r.in.handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_DeleteService(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_LockServiceDatabase r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_LockServiceDatabase");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_LockServiceDatabase(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.lock = talloc_zero_size(mem_ctx, sizeof(*r.out.lock));
+ if (r.out.lock == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_LockServiceDatabase(p, r.in.handle, r.out.lock);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_LockServiceDatabase(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceObjectSecurity(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceObjectSecurity r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceObjectSecurity");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceObjectSecurity(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
+
+ r.out.result = _svcctl_QueryServiceObjectSecurity(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceObjectSecurity(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_SetServiceObjectSecurity(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_SetServiceObjectSecurity r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SetServiceObjectSecurity");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_SetServiceObjectSecurity(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r);
+
+ r.out.result = _svcctl_SetServiceObjectSecurity(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_SetServiceObjectSecurity(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceStatus r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceStatus");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceStatus(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status));
+ if (r.out.status == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceStatus(p, r.in.handle, r.out.status);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceStatus(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_SetServiceStatus(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_SetServiceStatus r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SetServiceStatus");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_SetServiceStatus(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &r);
+
+ r.out.result = _svcctl_SetServiceStatus(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_SetServiceStatus(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_UnlockServiceDatabase(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_UnlockServiceDatabase r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_UnlockServiceDatabase");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_UnlockServiceDatabase(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.lock = r.in.lock;
+ r.out.result = _svcctl_UnlockServiceDatabase(p, r.in.lock);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_UnlockServiceDatabase(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_NotifyBootConfigStatus(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_NotifyBootConfigStatus r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_NotifyBootConfigStatus");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_NotifyBootConfigStatus(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &r);
+
+ r.out.result = _svcctl_NotifyBootConfigStatus(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_NotifyBootConfigStatus(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_SCSetServiceBitsW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_SCSetServiceBitsW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSetServiceBitsW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_SCSetServiceBitsW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &r);
+
+ r.out.result = _svcctl_SCSetServiceBitsW(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_SCSetServiceBitsW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_ChangeServiceConfigW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfigW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_ChangeServiceConfigW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id));
+ if (r.out.tag_id == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_ChangeServiceConfigW(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_ChangeServiceConfigW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_CreateServiceW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_CreateServiceW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CreateServiceW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_CreateServiceW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.TagId = r.in.TagId;
+ r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle));
+ if (r.out.handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_CreateServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.in.TagId, r.in.dependencies, r.in.dependencies_size, r.in.service_start_name, r.in.password, r.in.password_size, r.out.handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_CreateServiceW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_EnumDependentServicesW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumDependentServicesW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_EnumDependentServicesW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status));
+ if (r.out.status == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned));
+ if (r.out.services_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_EnumDependentServicesW(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_EnumDependentServicesW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_EnumServicesStatusW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServicesStatusW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_EnumServicesStatusW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size);
+ if (r.out.service == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned));
+ if (r.out.services_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _svcctl_EnumServicesStatusW(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_EnumServicesStatusW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_OpenSCManagerW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenSCManagerW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_OpenSCManagerW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle));
+ if (r.out.handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_OpenSCManagerW(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_OpenSCManagerW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_OpenServiceW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_OpenServiceW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenServiceW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_OpenServiceW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle));
+ if (r.out.handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_OpenServiceW(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask, r.out.handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_OpenServiceW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceConfigW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfigW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceConfigW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size);
+ if (r.out.query == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceConfigW(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceConfigW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceLockStatusW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceLockStatusW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceLockStatusW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status));
+ if (r.out.status == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size));
+ if (r.out.required_buf_size == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceLockStatusW(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceLockStatusW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_StartServiceW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_StartServiceW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_StartServiceW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_StartServiceW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &r);
+
+ r.out.result = _svcctl_StartServiceW(p, r.in.handle, r.in.NumArgs, r.in.Arguments);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_StartServiceW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_GetServiceDisplayNameW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceDisplayNameW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_GetServiceDisplayNameW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name));
+ if (r.out.display_name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.display_name_length = r.in.display_name_length;
+ r.out.result = _svcctl_GetServiceDisplayNameW(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_GetServiceDisplayNameW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_GetServiceKeyNameW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceKeyNameW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_GetServiceKeyNameW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name));
+ if (r.out.key_name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.display_name_length = r.in.display_name_length;
+ r.out.result = _svcctl_GetServiceKeyNameW(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_GetServiceKeyNameW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_SCSetServiceBitsA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_SCSetServiceBitsA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSetServiceBitsA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_SCSetServiceBitsA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &r);
+
+ r.out.result = _svcctl_SCSetServiceBitsA(p, r.in.handle, r.in.bits, r.in.bitson, r.in.immediate);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_SCSetServiceBitsA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_ChangeServiceConfigA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfigA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_ChangeServiceConfigA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id));
+ if (r.out.tag_id == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_ChangeServiceConfigA(p, r.in.handle, r.in.type, r.in.start, r.in.error, r.in.binary_path, r.in.load_order_group, r.out.tag_id, r.in.dependencies, r.in.service_start_name, r.in.password, r.in.display_name);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_ChangeServiceConfigA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_CreateServiceA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_CreateServiceA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_CreateServiceA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_CreateServiceA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.TagId = talloc_zero_size(mem_ctx, sizeof(*r.out.TagId));
+ if (r.out.TagId == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_CreateServiceA(p, r.in.handle, r.in.ServiceName, r.in.DisplayName, r.in.desired_access, r.in.type, r.in.start_type, r.in.error_control, r.in.binary_path, r.in.LoadOrderGroupKey, r.out.TagId, r.in.dependencies, r.in.service_start_name, r.in.password);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_CreateServiceA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_EnumDependentServicesA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumDependentServicesA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_EnumDependentServicesA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status));
+ if (r.out.status == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned));
+ if (r.out.services_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_EnumDependentServicesA(p, r.in.service, r.in.state, r.out.status, r.in.buf_size, r.out.bytes_needed, r.out.services_returned);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_EnumDependentServicesA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_EnumServicesStatusA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServicesStatusA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_EnumServicesStatusA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size);
+ if (r.out.service == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned));
+ if (r.out.services_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _svcctl_EnumServicesStatusA(p, r.in.handle, r.in.type, r.in.state, r.in.buf_size, r.out.service, r.out.bytes_needed, r.out.services_returned, r.in.resume_handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_EnumServicesStatusA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_OpenSCManagerA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenSCManagerA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_OpenSCManagerA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle));
+ if (r.out.handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_OpenSCManagerA(p, r.in.MachineName, r.in.DatabaseName, r.in.access_mask, r.out.handle);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_OpenSCManagerA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_OpenServiceA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_OpenServiceA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_OpenServiceA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_OpenServiceA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &r);
+
+ r.out.result = _svcctl_OpenServiceA(p, r.in.scmanager_handle, r.in.ServiceName, r.in.access_mask);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_OpenServiceA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceConfigA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfigA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceConfigA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size);
+ if (r.out.query == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceConfigA(p, r.in.handle, r.out.query, r.in.buf_size, r.out.bytes_needed);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceConfigA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceLockStatusA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceLockStatusA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceLockStatusA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status));
+ if (r.out.status == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size));
+ if (r.out.required_buf_size == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceLockStatusA(p, r.in.handle, r.in.buf_size, r.out.status, r.out.required_buf_size);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceLockStatusA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_StartServiceA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_StartServiceA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_StartServiceA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_StartServiceA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &r);
+
+ r.out.result = _svcctl_StartServiceA(p, r.in.handle, r.in.NumArgs, r.in.Arguments);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_StartServiceA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_GetServiceDisplayNameA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceDisplayNameA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_GetServiceDisplayNameA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name));
+ if (r.out.display_name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.display_name_length = r.in.display_name_length;
+ r.out.result = _svcctl_GetServiceDisplayNameA(p, r.in.handle, r.in.service_name, r.out.display_name, r.in.display_name_length);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_GetServiceDisplayNameA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_GetServiceKeyNameA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetServiceKeyNameA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_GetServiceKeyNameA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name));
+ if (r.out.key_name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.display_name_length = r.in.display_name_length;
+ r.out.result = _svcctl_GetServiceKeyNameA(p, r.in.handle, r.in.service_name, r.out.key_name, r.in.display_name_length);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_GetServiceKeyNameA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_GetCurrentGroupeStateW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_GetCurrentGroupeStateW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_GetCurrentGroupeStateW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_GetCurrentGroupeStateW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
+
+ r.out.result = _svcctl_GetCurrentGroupeStateW(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_GetCurrentGroupeStateW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_EnumServiceGroupW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_EnumServiceGroupW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_EnumServiceGroupW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_EnumServiceGroupW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &r);
+
+ r.out.result = _svcctl_EnumServiceGroupW(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_EnumServiceGroupW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_ChangeServiceConfig2A(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_ChangeServiceConfig2A r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfig2A");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_ChangeServiceConfig2A(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &r);
+
+ r.out.result = _svcctl_ChangeServiceConfig2A(p, r.in.handle, r.in.info_level, r.in.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_ChangeServiceConfig2A(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_ChangeServiceConfig2W(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_ChangeServiceConfig2W r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_ChangeServiceConfig2W");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_ChangeServiceConfig2W(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &r);
+
+ r.out.result = _svcctl_ChangeServiceConfig2W(p, r.in.handle, r.in.info_level, r.in.info);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_ChangeServiceConfig2W(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceConfig2A r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfig2A");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceConfig2A(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size);
+ if (r.out.buffer == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceConfig2A(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceConfig2A(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceConfig2W r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceConfig2W");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceConfig2W(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size);
+ if (r.out.buffer == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceConfig2W(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceConfig2W(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_QueryServiceStatusEx r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_QueryServiceStatusEx");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_QueryServiceStatusEx(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size);
+ if (r.out.buffer == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _svcctl_QueryServiceStatusEx(p, r.in.handle, r.in.info_level, r.out.buffer, r.in.buf_size, r.out.bytes_needed);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_QueryServiceStatusEx(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_EnumServicesStatusExA(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct EnumServicesStatusExA r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_EnumServicesStatusExA");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_EnumServicesStatusExA(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size);
+ if (r.out.services == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned));
+ if (r.out.service_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name));
+ if (r.out.group_name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _EnumServicesStatusExA(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_EnumServicesStatusExA(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_EnumServicesStatusExW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct EnumServicesStatusExW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_EnumServicesStatusExW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_EnumServicesStatusExW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size);
+ if (r.out.services == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed));
+ if (r.out.bytes_needed == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned));
+ if (r.out.service_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name));
+ if (r.out.group_name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _EnumServicesStatusExW(p, r.in.scmanager, r.in.info_level, r.in.type, r.in.state, r.out.services, r.in.buf_size, r.out.bytes_needed, r.out.service_returned, r.in.resume_handle, r.out.group_name);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_EnumServicesStatusExW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_svcctl_SCSendTSMessage(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct svcctl_SCSendTSMessage r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_svcctl_SCSendTSMessage");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_svcctl_SCSendTSMessage(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &r);
+
+ r.out.result = _svcctl_SCSendTSMessage(p);
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_svcctl_SCSendTSMessage(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+
+/* Tables */
+static struct api_struct api_svcctl_cmds[] =
+{
+ {"SVCCTL_CLOSESERVICEHANDLE", DCERPC_SVCCTL_CLOSESERVICEHANDLE, api_svcctl_CloseServiceHandle},
+ {"SVCCTL_CONTROLSERVICE", DCERPC_SVCCTL_CONTROLSERVICE, api_svcctl_ControlService},
+ {"SVCCTL_DELETESERVICE", DCERPC_SVCCTL_DELETESERVICE, api_svcctl_DeleteService},
+ {"SVCCTL_LOCKSERVICEDATABASE", DCERPC_SVCCTL_LOCKSERVICEDATABASE, api_svcctl_LockServiceDatabase},
+ {"SVCCTL_QUERYSERVICEOBJECTSECURITY", DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY, api_svcctl_QueryServiceObjectSecurity},
+ {"SVCCTL_SETSERVICEOBJECTSECURITY", DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY, api_svcctl_SetServiceObjectSecurity},
+ {"SVCCTL_QUERYSERVICESTATUS", DCERPC_SVCCTL_QUERYSERVICESTATUS, api_svcctl_QueryServiceStatus},
+ {"SVCCTL_SETSERVICESTATUS", DCERPC_SVCCTL_SETSERVICESTATUS, api_svcctl_SetServiceStatus},
+ {"SVCCTL_UNLOCKSERVICEDATABASE", DCERPC_SVCCTL_UNLOCKSERVICEDATABASE, api_svcctl_UnlockServiceDatabase},
+ {"SVCCTL_NOTIFYBOOTCONFIGSTATUS", DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS, api_svcctl_NotifyBootConfigStatus},
+ {"SVCCTL_SCSETSERVICEBITSW", DCERPC_SVCCTL_SCSETSERVICEBITSW, api_svcctl_SCSetServiceBitsW},
+ {"SVCCTL_CHANGESERVICECONFIGW", DCERPC_SVCCTL_CHANGESERVICECONFIGW, api_svcctl_ChangeServiceConfigW},
+ {"SVCCTL_CREATESERVICEW", DCERPC_SVCCTL_CREATESERVICEW, api_svcctl_CreateServiceW},
+ {"SVCCTL_ENUMDEPENDENTSERVICESW", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW, api_svcctl_EnumDependentServicesW},
+ {"SVCCTL_ENUMSERVICESSTATUSW", DCERPC_SVCCTL_ENUMSERVICESSTATUSW, api_svcctl_EnumServicesStatusW},
+ {"SVCCTL_OPENSCMANAGERW", DCERPC_SVCCTL_OPENSCMANAGERW, api_svcctl_OpenSCManagerW},
+ {"SVCCTL_OPENSERVICEW", DCERPC_SVCCTL_OPENSERVICEW, api_svcctl_OpenServiceW},
+ {"SVCCTL_QUERYSERVICECONFIGW", DCERPC_SVCCTL_QUERYSERVICECONFIGW, api_svcctl_QueryServiceConfigW},
+ {"SVCCTL_QUERYSERVICELOCKSTATUSW", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW, api_svcctl_QueryServiceLockStatusW},
+ {"SVCCTL_STARTSERVICEW", DCERPC_SVCCTL_STARTSERVICEW, api_svcctl_StartServiceW},
+ {"SVCCTL_GETSERVICEDISPLAYNAMEW", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW, api_svcctl_GetServiceDisplayNameW},
+ {"SVCCTL_GETSERVICEKEYNAMEW", DCERPC_SVCCTL_GETSERVICEKEYNAMEW, api_svcctl_GetServiceKeyNameW},
+ {"SVCCTL_SCSETSERVICEBITSA", DCERPC_SVCCTL_SCSETSERVICEBITSA, api_svcctl_SCSetServiceBitsA},
+ {"SVCCTL_CHANGESERVICECONFIGA", DCERPC_SVCCTL_CHANGESERVICECONFIGA, api_svcctl_ChangeServiceConfigA},
+ {"SVCCTL_CREATESERVICEA", DCERPC_SVCCTL_CREATESERVICEA, api_svcctl_CreateServiceA},
+ {"SVCCTL_ENUMDEPENDENTSERVICESA", DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA, api_svcctl_EnumDependentServicesA},
+ {"SVCCTL_ENUMSERVICESSTATUSA", DCERPC_SVCCTL_ENUMSERVICESSTATUSA, api_svcctl_EnumServicesStatusA},
+ {"SVCCTL_OPENSCMANAGERA", DCERPC_SVCCTL_OPENSCMANAGERA, api_svcctl_OpenSCManagerA},
+ {"SVCCTL_OPENSERVICEA", DCERPC_SVCCTL_OPENSERVICEA, api_svcctl_OpenServiceA},
+ {"SVCCTL_QUERYSERVICECONFIGA", DCERPC_SVCCTL_QUERYSERVICECONFIGA, api_svcctl_QueryServiceConfigA},
+ {"SVCCTL_QUERYSERVICELOCKSTATUSA", DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA, api_svcctl_QueryServiceLockStatusA},
+ {"SVCCTL_STARTSERVICEA", DCERPC_SVCCTL_STARTSERVICEA, api_svcctl_StartServiceA},
+ {"SVCCTL_GETSERVICEDISPLAYNAMEA", DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA, api_svcctl_GetServiceDisplayNameA},
+ {"SVCCTL_GETSERVICEKEYNAMEA", DCERPC_SVCCTL_GETSERVICEKEYNAMEA, api_svcctl_GetServiceKeyNameA},
+ {"SVCCTL_GETCURRENTGROUPESTATEW", DCERPC_SVCCTL_GETCURRENTGROUPESTATEW, api_svcctl_GetCurrentGroupeStateW},
+ {"SVCCTL_ENUMSERVICEGROUPW", DCERPC_SVCCTL_ENUMSERVICEGROUPW, api_svcctl_EnumServiceGroupW},
+ {"SVCCTL_CHANGESERVICECONFIG2A", DCERPC_SVCCTL_CHANGESERVICECONFIG2A, api_svcctl_ChangeServiceConfig2A},
+ {"SVCCTL_CHANGESERVICECONFIG2W", DCERPC_SVCCTL_CHANGESERVICECONFIG2W, api_svcctl_ChangeServiceConfig2W},
+ {"SVCCTL_QUERYSERVICECONFIG2A", DCERPC_SVCCTL_QUERYSERVICECONFIG2A, api_svcctl_QueryServiceConfig2A},
+ {"SVCCTL_QUERYSERVICECONFIG2W", DCERPC_SVCCTL_QUERYSERVICECONFIG2W, api_svcctl_QueryServiceConfig2W},
+ {"SVCCTL_QUERYSERVICESTATUSEX", DCERPC_SVCCTL_QUERYSERVICESTATUSEX, api_svcctl_QueryServiceStatusEx},
+ {"ENUMSERVICESSTATUSEXA", DCERPC_ENUMSERVICESSTATUSEXA, api_EnumServicesStatusExA},
+ {"ENUMSERVICESSTATUSEXW", DCERPC_ENUMSERVICESSTATUSEXW, api_EnumServicesStatusExW},
+ {"SVCCTL_SCSENDTSMESSAGE", DCERPC_SVCCTL_SCSENDTSMESSAGE, api_svcctl_SCSendTSMessage},
+};
+
+void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_svcctl_cmds;
+ *n_fns = sizeof(api_svcctl_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_svcctl_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "svcctl", "svcctl", api_svcctl_cmds, sizeof(api_svcctl_cmds) / sizeof(struct api_struct));
+}
diff --git a/source3/librpc/gen_ndr/srv_svcctl.h b/source3/librpc/gen_ndr/srv_svcctl.h
new file mode 100644
index 0000000000..20b77ba5b0
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_svcctl.h
@@ -0,0 +1,50 @@
+#include "librpc/gen_ndr/ndr_svcctl.h"
+#ifndef __SRV_SVCCTL__
+#define __SRV_SVCCTL__
+WERROR _svcctl_CloseServiceHandle(pipes_struct *p, struct policy_handle *handle);
+WERROR _svcctl_ControlService(pipes_struct *p, struct policy_handle *handle, uint32_t control, struct SERVICE_STATUS *status);
+WERROR _svcctl_DeleteService(pipes_struct *p, struct policy_handle *handle);
+WERROR _svcctl_LockServiceDatabase(pipes_struct *p, struct policy_handle *handle, struct policy_handle *lock);
+WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p);
+WERROR _svcctl_SetServiceObjectSecurity(pipes_struct *p);
+WERROR _svcctl_QueryServiceStatus(pipes_struct *p, struct policy_handle *handle, struct SERVICE_STATUS *status);
+WERROR _svcctl_SetServiceStatus(pipes_struct *p);
+WERROR _svcctl_UnlockServiceDatabase(pipes_struct *p, struct policy_handle *lock);
+WERROR _svcctl_NotifyBootConfigStatus(pipes_struct *p);
+WERROR _svcctl_SCSetServiceBitsW(pipes_struct *p, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate);
+WERROR _svcctl_ChangeServiceConfigW(pipes_struct *p, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name);
+WERROR _svcctl_CreateServiceW(pipes_struct *p, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle);
+WERROR _svcctl_EnumDependentServicesW(pipes_struct *p, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
+WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle);
+WERROR _svcctl_OpenSCManagerW(pipes_struct *p, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle);
+WERROR _svcctl_OpenServiceW(pipes_struct *p, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask, struct policy_handle *handle);
+WERROR _svcctl_QueryServiceConfigW(pipes_struct *p, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed);
+WERROR _svcctl_QueryServiceLockStatusW(pipes_struct *p, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size);
+WERROR _svcctl_StartServiceW(pipes_struct *p, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments);
+WERROR _svcctl_GetServiceDisplayNameW(pipes_struct *p, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length);
+WERROR _svcctl_GetServiceKeyNameW(pipes_struct *p, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length);
+WERROR _svcctl_SCSetServiceBitsA(pipes_struct *p, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate);
+WERROR _svcctl_ChangeServiceConfigA(pipes_struct *p, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name);
+WERROR _svcctl_CreateServiceA(pipes_struct *p, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, const char *dependencies, const char *service_start_name, const char *password);
+WERROR _svcctl_EnumDependentServicesA(pipes_struct *p, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
+WERROR _svcctl_EnumServicesStatusA(pipes_struct *p, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle);
+WERROR _svcctl_OpenSCManagerA(pipes_struct *p, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle);
+WERROR _svcctl_OpenServiceA(pipes_struct *p, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask);
+WERROR _svcctl_QueryServiceConfigA(pipes_struct *p, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed);
+WERROR _svcctl_QueryServiceLockStatusA(pipes_struct *p, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size);
+WERROR _svcctl_StartServiceA(pipes_struct *p, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments);
+WERROR _svcctl_GetServiceDisplayNameA(pipes_struct *p, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length);
+WERROR _svcctl_GetServiceKeyNameA(pipes_struct *p, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length);
+WERROR _svcctl_GetCurrentGroupeStateW(pipes_struct *p);
+WERROR _svcctl_EnumServiceGroupW(pipes_struct *p);
+WERROR _svcctl_ChangeServiceConfig2A(pipes_struct *p, struct policy_handle *handle, uint32_t info_level, uint8_t *info);
+WERROR _svcctl_ChangeServiceConfig2W(pipes_struct *p, struct policy_handle *handle, uint32_t info_level, uint8_t *info);
+WERROR _svcctl_QueryServiceConfig2A(pipes_struct *p, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
+WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
+WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
+WERROR _EnumServicesStatusExA(pipes_struct *p, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name);
+WERROR _EnumServicesStatusExW(pipes_struct *p, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name);
+WERROR _svcctl_SCSendTSMessage(pipes_struct *p);
+void svcctl_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_svcctl_init(void);
+#endif /* __SRV_SVCCTL__ */
diff --git a/source3/librpc/gen_ndr/srvsvc.h b/source3/librpc/gen_ndr/srvsvc.h
new file mode 100644
index 0000000000..91aff0a5f9
--- /dev/null
+++ b/source3/librpc/gen_ndr/srvsvc.h
@@ -0,0 +1,1753 @@
+/* header auto-generated by pidl */
+
+#ifndef _HEADER_srvsvc
+#define _HEADER_srvsvc
+
+#include "librpc/gen_ndr/security.h"
+#include "librpc/gen_ndr/svcctl.h"
+#define STYPE_TEMPORARY ( 0x40000000 )
+#define STYPE_HIDDEN ( 0x80000000 )
+#define SHARE_1005_CSC_POLICY_MASK ( 0x00000030 )
+#define SHARE_1005_CSC_POLICY_SHIFT ( 4 )
+struct srvsvc_NetCharDevInfo0 {
+ const char *device;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetCharDevCtr0 {
+ uint32_t count;
+ struct srvsvc_NetCharDevInfo0 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetCharDevInfo1 {
+ const char *device;/* [unique,charset(UTF16)] */
+ uint32_t status;
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t time;
+};
+
+struct srvsvc_NetCharDevCtr1 {
+ uint32_t count;
+ struct srvsvc_NetCharDevInfo1 *array;/* [unique,size_is(count)] */
+};
+
+union srvsvc_NetCharDevInfo {
+ struct srvsvc_NetCharDevInfo0 *info0;/* [unique,case(0)] */
+ struct srvsvc_NetCharDevInfo1 *info1;/* [unique,case] */
+};
+
+union srvsvc_NetCharDevCtr {
+ struct srvsvc_NetCharDevCtr0 *ctr0;/* [unique,case(0)] */
+ struct srvsvc_NetCharDevCtr1 *ctr1;/* [unique,case] */
+};
+
+struct srvsvc_NetCharDevQInfo0 {
+ const char *device;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetCharDevQCtr0 {
+ uint32_t count;
+ struct srvsvc_NetCharDevQInfo0 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetCharDevQInfo1 {
+ const char *device;/* [unique,charset(UTF16)] */
+ uint32_t priority;
+ const char *devices;/* [unique,charset(UTF16)] */
+ uint32_t users;
+ uint32_t num_ahead;
+};
+
+struct srvsvc_NetCharDevQCtr1 {
+ uint32_t count;
+ struct srvsvc_NetCharDevQInfo1 *array;/* [unique,size_is(count)] */
+};
+
+union srvsvc_NetCharDevQInfo {
+ struct srvsvc_NetCharDevQInfo0 *info0;/* [unique,case(0)] */
+ struct srvsvc_NetCharDevQInfo1 *info1;/* [unique,case] */
+};
+
+union srvsvc_NetCharDevQCtr {
+ struct srvsvc_NetCharDevQCtr0 *ctr0;/* [unique,case(0)] */
+ struct srvsvc_NetCharDevQCtr1 *ctr1;/* [unique,case] */
+};
+
+struct srvsvc_NetConnInfo0 {
+ uint32_t conn_id;
+};
+
+struct srvsvc_NetConnCtr0 {
+ uint32_t count;
+ struct srvsvc_NetConnInfo0 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetConnInfo1 {
+ uint32_t conn_id;
+ uint32_t conn_type;
+ uint32_t num_open;
+ uint32_t num_users;
+ uint32_t conn_time;
+ const char *user;/* [unique,charset(UTF16)] */
+ const char *share;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetConnCtr1 {
+ uint32_t count;
+ struct srvsvc_NetConnInfo1 *array;/* [unique,size_is(count)] */
+};
+
+union srvsvc_NetConnCtr {
+ struct srvsvc_NetConnCtr0 *ctr0;/* [unique,case(0)] */
+ struct srvsvc_NetConnCtr1 *ctr1;/* [unique,case] */
+};
+
+struct srvsvc_NetFileInfo2 {
+ uint32_t fid;
+};
+
+struct srvsvc_NetFileCtr2 {
+ uint32_t count;
+ struct srvsvc_NetFileInfo2 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetFileInfo3 {
+ uint32_t fid;
+ uint32_t permissions;
+ uint32_t num_locks;
+ const char *path;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetFileCtr3 {
+ uint32_t count;
+ struct srvsvc_NetFileInfo3 *array;/* [unique,size_is(count)] */
+};
+
+union srvsvc_NetFileInfo {
+ struct srvsvc_NetFileInfo2 *info2;/* [unique,case(2)] */
+ struct srvsvc_NetFileInfo3 *info3;/* [unique,case(3)] */
+};
+
+union srvsvc_NetFileCtr {
+ struct srvsvc_NetFileCtr2 *ctr2;/* [unique,case(2)] */
+ struct srvsvc_NetFileCtr3 *ctr3;/* [unique,case(3)] */
+};
+
+struct srvsvc_NetSessInfo0 {
+ const char *client;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSessCtr0 {
+ uint32_t count;
+ struct srvsvc_NetSessInfo0 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetSessInfo1 {
+ const char *client;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t num_open;
+ uint32_t time;
+ uint32_t idle_time;
+ uint32_t user_flags;
+};
+
+struct srvsvc_NetSessCtr1 {
+ uint32_t count;
+ struct srvsvc_NetSessInfo1 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetSessInfo2 {
+ const char *client;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t num_open;
+ uint32_t time;
+ uint32_t idle_time;
+ uint32_t user_flags;
+ const char *client_type;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSessCtr2 {
+ uint32_t count;
+ struct srvsvc_NetSessInfo2 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetSessInfo10 {
+ const char *client;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t time;
+ uint32_t idle_time;
+};
+
+struct srvsvc_NetSessCtr10 {
+ uint32_t count;
+ struct srvsvc_NetSessInfo10 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetSessInfo502 {
+ const char *client;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t num_open;
+ uint32_t time;
+ uint32_t idle_time;
+ uint32_t user_flags;
+ const char *client_type;/* [unique,charset(UTF16)] */
+ const char *transport;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSessCtr502 {
+ uint32_t count;
+ struct srvsvc_NetSessInfo502 *array;/* [unique,size_is(count)] */
+};
+
+union srvsvc_NetSessCtr {
+ struct srvsvc_NetSessCtr0 *ctr0;/* [unique,case(0)] */
+ struct srvsvc_NetSessCtr1 *ctr1;/* [unique,case] */
+ struct srvsvc_NetSessCtr2 *ctr2;/* [unique,case(2)] */
+ struct srvsvc_NetSessCtr10 *ctr10;/* [unique,case(10)] */
+ struct srvsvc_NetSessCtr502 *ctr502;/* [unique,case(502)] */
+};
+
+enum srvsvc_ShareType {
+ STYPE_DISKTREE=0,
+ STYPE_DISKTREE_TEMPORARY=STYPE_DISKTREE|STYPE_TEMPORARY,
+ STYPE_DISKTREE_HIDDEN=STYPE_DISKTREE|STYPE_HIDDEN,
+ STYPE_PRINTQ=1,
+ STYPE_PRINTQ_TEMPORARY=STYPE_PRINTQ|STYPE_TEMPORARY,
+ STYPE_PRINTQ_HIDDEN=STYPE_PRINTQ|STYPE_HIDDEN,
+ STYPE_DEVICE=2,
+ STYPE_DEVICE_TEMPORARY=STYPE_DEVICE|STYPE_TEMPORARY,
+ STYPE_DEVICE_HIDDEN=STYPE_DEVICE|STYPE_HIDDEN,
+ STYPE_IPC=3,
+ STYPE_IPC_TEMPORARY=STYPE_IPC|STYPE_TEMPORARY,
+ STYPE_IPC_HIDDEN=STYPE_IPC|STYPE_HIDDEN
+};
+
+struct srvsvc_NetShareInfo0 {
+ const char *name;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetShareCtr0 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo0 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareInfo1 {
+ const char *name;/* [unique,charset(UTF16)] */
+ enum srvsvc_ShareType type;
+ const char *comment;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetShareCtr1 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo1 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareInfo2 {
+ const char *name;/* [unique,charset(UTF16)] */
+ enum srvsvc_ShareType type;
+ const char *comment;/* [unique,charset(UTF16)] */
+ uint32_t permissions;
+ uint32_t max_users;
+ uint32_t current_users;
+ const char *path;/* [unique,charset(UTF16)] */
+ const char *password;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetShareCtr2 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo2 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareInfo501 {
+ const char *name;/* [unique,charset(UTF16)] */
+ enum srvsvc_ShareType type;
+ const char *comment;/* [unique,charset(UTF16)] */
+ uint32_t csc_policy;
+};
+
+struct srvsvc_NetShareCtr501 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo501 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareInfo502 {
+ const char *name;/* [unique,charset(UTF16)] */
+ enum srvsvc_ShareType type;
+ const char *comment;/* [unique,charset(UTF16)] */
+ uint32_t permissions;
+ int32_t max_users;
+ uint32_t current_users;
+ const char *path;/* [unique,charset(UTF16)] */
+ const char *password;/* [unique,charset(UTF16)] */
+ uint32_t unknown;
+ struct security_descriptor *sd;/* [unique,subcontext(4)] */
+};
+
+struct srvsvc_NetShareCtr502 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo502 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareInfo1004 {
+ const char *comment;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetShareCtr1004 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo1004 *array;/* [unique,size_is(count)] */
+};
+
+/* bitmap NetShareInfo1005Flags */
+#define SHARE_1005_IN_DFS ( 0x00000001 )
+#define SHARE_1005_DFS_ROOT ( 0x00000002 )
+
+struct srvsvc_NetShareInfo1005 {
+ uint32_t dfs_flags;
+};
+
+struct srvsvc_NetShareCtr1005 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo1005 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareInfo1006 {
+ int32_t max_users;
+};
+
+struct srvsvc_NetShareCtr1006 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo1006 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareInfo1007 {
+ uint32_t flags;
+ const char *alternate_directory_name;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetShareCtr1007 {
+ uint32_t count;
+ struct srvsvc_NetShareInfo1007 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetShareCtr1501 {
+ uint32_t count;
+ struct sec_desc_buf *array;/* [unique,size_is(count)] */
+};
+
+union srvsvc_NetShareInfo {
+ struct srvsvc_NetShareInfo0 *info0;/* [unique,case(0)] */
+ struct srvsvc_NetShareInfo1 *info1;/* [unique,case] */
+ struct srvsvc_NetShareInfo2 *info2;/* [unique,case(2)] */
+ struct srvsvc_NetShareInfo501 *info501;/* [unique,case(501)] */
+ struct srvsvc_NetShareInfo502 *info502;/* [unique,case(502)] */
+ struct srvsvc_NetShareInfo1004 *info1004;/* [unique,case(1004)] */
+ struct srvsvc_NetShareInfo1005 *info1005;/* [unique,case(1005)] */
+ struct srvsvc_NetShareInfo1006 *info1006;/* [unique,case(1006)] */
+ struct srvsvc_NetShareInfo1007 *info1007;/* [unique,case(1007)] */
+ struct sec_desc_buf *info1501;/* [unique,case(1501)] */
+};
+
+union srvsvc_NetShareCtr {
+ struct srvsvc_NetShareCtr0 *ctr0;/* [unique,case(0)] */
+ struct srvsvc_NetShareCtr1 *ctr1;/* [unique,case] */
+ struct srvsvc_NetShareCtr2 *ctr2;/* [unique,case(2)] */
+ struct srvsvc_NetShareCtr501 *ctr501;/* [unique,case(501)] */
+ struct srvsvc_NetShareCtr502 *ctr502;/* [unique,case(502)] */
+ struct srvsvc_NetShareCtr1004 *ctr1004;/* [unique,case(1004)] */
+ struct srvsvc_NetShareCtr1005 *ctr1005;/* [unique,case(1005)] */
+ struct srvsvc_NetShareCtr1006 *ctr1006;/* [unique,case(1006)] */
+ struct srvsvc_NetShareCtr1007 *ctr1007;/* [unique,case(1007)] */
+ struct srvsvc_NetShareCtr1501 *ctr1501;/* [unique,case(1501)] */
+};
+
+enum srvsvc_PlatformId {
+ PLATFORM_ID_DOS=300,
+ PLATFORM_ID_OS2=400,
+ PLATFORM_ID_NT=500,
+ PLATFORM_ID_OSF=600,
+ PLATFORM_ID_VMS=700
+};
+
+struct srvsvc_NetSrvInfo100 {
+ enum srvsvc_PlatformId platform_id;
+ const char *server_name;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSrvInfo101 {
+ enum srvsvc_PlatformId platform_id;
+ const char *server_name;/* [unique,charset(UTF16)] */
+ uint32_t version_major;
+ uint32_t version_minor;
+ uint32_t server_type;
+ const char *comment;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSrvInfo102 {
+ enum srvsvc_PlatformId platform_id;
+ const char *server_name;/* [unique,charset(UTF16)] */
+ uint32_t version_major;
+ uint32_t version_minor;
+ uint32_t server_type;
+ const char *comment;/* [unique,charset(UTF16)] */
+ uint32_t users;
+ uint32_t disc;
+ uint32_t hidden;
+ uint32_t announce;
+ uint32_t anndelta;
+ uint32_t licenses;
+ const char *userpath;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSrvInfo402 {
+ uint32_t ulist_mtime;
+ uint32_t glist_mtime;
+ uint32_t alist_mtime;
+ const char *alerts;/* [unique,charset(UTF16)] */
+ uint32_t security;
+ uint32_t numadmin;
+ uint32_t lanmask;
+ const char *guestaccount;/* [unique,charset(UTF16)] */
+ uint32_t chdevs;
+ uint32_t chdevqs;
+ uint32_t chdevjobs;
+ uint32_t connections;
+ uint32_t shares;
+ uint32_t openfiles;
+ uint32_t sessopen;
+ uint32_t sesssvc;
+ uint32_t sessreqs;
+ uint32_t opensearch;
+ uint32_t activelocks;
+ uint32_t sizereqbufs;
+ uint32_t numbigbufs;
+ uint32_t numfiletasks;
+ uint32_t alertsched;
+ uint32_t erroralert;
+ uint32_t logonalert;
+ uint32_t accessalert;
+ uint32_t diskalert;
+ uint32_t netioalert;
+ uint32_t maxaudits;
+ const char *srvheuristics;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSrvInfo403 {
+ uint32_t ulist_mtime;
+ uint32_t glist_mtime;
+ uint32_t alist_mtime;
+ const char *alerts;/* [unique,charset(UTF16)] */
+ uint32_t security;
+ uint32_t numadmin;
+ uint32_t lanmask;
+ const char *guestaccount;/* [unique,charset(UTF16)] */
+ uint32_t chdevs;
+ uint32_t chdevqs;
+ uint32_t chdevjobs;
+ uint32_t connections;
+ uint32_t shares;
+ uint32_t openfiles;
+ uint32_t sessopen;
+ uint32_t sesssvc;
+ uint32_t sessreqs;
+ uint32_t opensearch;
+ uint32_t activelocks;
+ uint32_t sizereqbufs;
+ uint32_t numbigbufs;
+ uint32_t numfiletasks;
+ uint32_t alertsched;
+ uint32_t eroralert;
+ uint32_t logonalert;
+ uint32_t accessalert;
+ uint32_t diskalert;
+ uint32_t netioalert;
+ uint32_t maxaudits;
+ const char *srvheuristics;/* [unique,charset(UTF16)] */
+ uint32_t auditedevents;
+ uint32_t auditprofile;
+ const char *autopath;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSrvInfo502 {
+ uint32_t sessopen;
+ uint32_t sesssvc;
+ uint32_t opensearch;
+ uint32_t sizereqbufs;
+ uint32_t initworkitems;
+ uint32_t maxworkitems;
+ uint32_t rawworkitems;
+ uint32_t irpstacksize;
+ uint32_t maxrawbuflen;
+ uint32_t sessusers;
+ uint32_t sessconns;
+ uint32_t maxpagedmemoryusage;
+ uint32_t maxnonpagedmemoryusage;
+ uint32_t enablesoftcompat;
+ uint32_t enableforcedlogoff;
+ uint32_t timesource;
+ uint32_t acceptdownlevelapis;
+ uint32_t lmannounce;
+};
+
+struct srvsvc_NetSrvInfo503 {
+ uint32_t sessopen;
+ uint32_t sesssvc;
+ uint32_t opensearch;
+ uint32_t sizereqbufs;
+ uint32_t initworkitems;
+ uint32_t maxworkitems;
+ uint32_t rawworkitems;
+ uint32_t irpstacksize;
+ uint32_t maxrawbuflen;
+ uint32_t sessusers;
+ uint32_t sessconns;
+ uint32_t maxpagedmemoryusage;
+ uint32_t maxnonpagedmemoryusage;
+ uint32_t enablesoftcompat;
+ uint32_t enableforcedlogoff;
+ uint32_t timesource;
+ uint32_t acceptdownlevelapis;
+ uint32_t lmannounce;
+ const char *domain;/* [unique,charset(UTF16)] */
+ uint32_t maxcopyreadlen;
+ uint32_t maxcopywritelen;
+ uint32_t minkeepsearch;
+ uint32_t maxkeepsearch;
+ uint32_t minkeepcomplsearch;
+ uint32_t maxkeepcomplsearch;
+ uint32_t threadcountadd;
+ uint32_t numlockthreads;
+ uint32_t scavtimeout;
+ uint32_t minrcvqueue;
+ uint32_t minfreeworkitems;
+ uint32_t xactmemsize;
+ uint32_t threadpriority;
+ uint32_t maxmpxct;
+ uint32_t oplockbreakwait;
+ uint32_t oplockbreakresponsewait;
+ uint32_t enableoplocks;
+ uint32_t enableoplockforceclose;
+ uint32_t enablefcbopens;
+ uint32_t enableraw;
+ uint32_t enablesharednetdrives;
+ uint32_t minfreeconnections;
+ uint32_t maxfreeconnections;
+};
+
+struct srvsvc_NetSrvInfo599 {
+ uint32_t sessopen;
+ uint32_t sesssvc;
+ uint32_t opensearch;
+ uint32_t sizereqbufs;
+ uint32_t initworkitems;
+ uint32_t maxworkitems;
+ uint32_t rawworkitems;
+ uint32_t irpstacksize;
+ uint32_t maxrawbuflen;
+ uint32_t sessusers;
+ uint32_t sessconns;
+ uint32_t maxpagedmemoryusage;
+ uint32_t maxnonpagedmemoryusage;
+ uint32_t enablesoftcompat;
+ uint32_t enableforcedlogoff;
+ uint32_t timesource;
+ uint32_t acceptdownlevelapis;
+ uint32_t lmannounce;
+ const char *domain;/* [unique,charset(UTF16)] */
+ uint32_t maxcopyreadlen;
+ uint32_t maxcopywritelen;
+ uint32_t minkeepsearch;
+ uint32_t minkeepcomplsearch;
+ uint32_t maxkeepcomplsearch;
+ uint32_t threadcountadd;
+ uint32_t numlockthreads;
+ uint32_t scavtimeout;
+ uint32_t minrcvqueue;
+ uint32_t minfreeworkitems;
+ uint32_t xactmemsize;
+ uint32_t threadpriority;
+ uint32_t maxmpxct;
+ uint32_t oplockbreakwait;
+ uint32_t oplockbreakresponsewait;
+ uint32_t enableoplocks;
+ uint32_t enableoplockforceclose;
+ uint32_t enablefcbopens;
+ uint32_t enableraw;
+ uint32_t enablesharednetdrives;
+ uint32_t minfreeconnections;
+ uint32_t maxfreeconnections;
+ uint32_t initsesstable;
+ uint32_t initconntable;
+ uint32_t initfiletable;
+ uint32_t initsearchtable;
+ uint32_t alertsched;
+ uint32_t errortreshold;
+ uint32_t networkerrortreshold;
+ uint32_t diskspacetreshold;
+ uint32_t reserved;
+ uint32_t maxlinkdelay;
+ uint32_t minlinkthroughput;
+ uint32_t linkinfovalidtime;
+ uint32_t scavqosinfoupdatetime;
+ uint32_t maxworkitemidletime;
+};
+
+struct srvsvc_NetSrvInfo1005 {
+ const char *comment;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetSrvInfo1010 {
+ uint32_t disc;
+};
+
+struct srvsvc_NetSrvInfo1016 {
+ uint32_t hidden;
+};
+
+struct srvsvc_NetSrvInfo1017 {
+ uint32_t announce;
+};
+
+struct srvsvc_NetSrvInfo1018 {
+ uint32_t anndelta;
+};
+
+struct srvsvc_NetSrvInfo1107 {
+ uint32_t users;
+};
+
+struct srvsvc_NetSrvInfo1501 {
+ uint32_t sessopens;
+};
+
+struct srvsvc_NetSrvInfo1502 {
+ uint32_t sessvcs;
+};
+
+struct srvsvc_NetSrvInfo1503 {
+ uint32_t opensearch;
+};
+
+struct srvsvc_NetSrvInfo1506 {
+ uint32_t maxworkitems;
+};
+
+struct srvsvc_NetSrvInfo1509 {
+ uint32_t maxrawbuflen;
+};
+
+struct srvsvc_NetSrvInfo1510 {
+ uint32_t sessusers;
+};
+
+struct srvsvc_NetSrvInfo1511 {
+ uint32_t sesscons;
+};
+
+struct srvsvc_NetSrvInfo1512 {
+ uint32_t maxnonpagedmemoryusage;
+};
+
+struct srvsvc_NetSrvInfo1513 {
+ uint32_t maxpagedmemoryusage;
+};
+
+struct srvsvc_NetSrvInfo1514 {
+ uint32_t enablesoftcompat;
+};
+
+struct srvsvc_NetSrvInfo1515 {
+ uint32_t enableforcedlogoff;
+};
+
+struct srvsvc_NetSrvInfo1516 {
+ uint32_t timesource;
+};
+
+struct srvsvc_NetSrvInfo1518 {
+ uint32_t lmannounce;
+};
+
+struct srvsvc_NetSrvInfo1520 {
+ uint32_t maxcopyreadlen;
+};
+
+struct srvsvc_NetSrvInfo1521 {
+ uint32_t maxcopywritelen;
+};
+
+struct srvsvc_NetSrvInfo1522 {
+ uint32_t minkeepsearch;
+};
+
+struct srvsvc_NetSrvInfo1523 {
+ uint32_t maxkeepsearch;
+};
+
+struct srvsvc_NetSrvInfo1524 {
+ uint32_t minkeepcomplsearch;
+};
+
+struct srvsvc_NetSrvInfo1525 {
+ uint32_t maxkeepcomplsearch;
+};
+
+struct srvsvc_NetSrvInfo1528 {
+ uint32_t scavtimeout;
+};
+
+struct srvsvc_NetSrvInfo1529 {
+ uint32_t minrcvqueue;
+};
+
+struct srvsvc_NetSrvInfo1530 {
+ uint32_t minfreeworkitems;
+};
+
+struct srvsvc_NetSrvInfo1533 {
+ uint32_t maxmpxct;
+};
+
+struct srvsvc_NetSrvInfo1534 {
+ uint32_t oplockbreakwait;
+};
+
+struct srvsvc_NetSrvInfo1535 {
+ uint32_t oplockbreakresponsewait;
+};
+
+struct srvsvc_NetSrvInfo1536 {
+ uint32_t enableoplocks;
+};
+
+struct srvsvc_NetSrvInfo1537 {
+ uint32_t enableoplockforceclose;
+};
+
+struct srvsvc_NetSrvInfo1538 {
+ uint32_t enablefcbopens;
+};
+
+struct srvsvc_NetSrvInfo1539 {
+ uint32_t enableraw;
+};
+
+struct srvsvc_NetSrvInfo1540 {
+ uint32_t enablesharednetdrives;
+};
+
+struct srvsvc_NetSrvInfo1541 {
+ uint32_t minfreeconnections;
+};
+
+struct srvsvc_NetSrvInfo1542 {
+ uint32_t maxfreeconnections;
+};
+
+struct srvsvc_NetSrvInfo1543 {
+ uint32_t initsesstable;
+};
+
+struct srvsvc_NetSrvInfo1544 {
+ uint32_t initconntable;
+};
+
+struct srvsvc_NetSrvInfo1545 {
+ uint32_t initfiletable;
+};
+
+struct srvsvc_NetSrvInfo1546 {
+ uint32_t initsearchtable;
+};
+
+struct srvsvc_NetSrvInfo1547 {
+ uint32_t alertsched;
+};
+
+struct srvsvc_NetSrvInfo1548 {
+ uint32_t errortreshold;
+};
+
+struct srvsvc_NetSrvInfo1549 {
+ uint32_t networkerrortreshold;
+};
+
+struct srvsvc_NetSrvInfo1550 {
+ uint32_t diskspacetreshold;
+};
+
+struct srvsvc_NetSrvInfo1552 {
+ uint32_t maxlinkdelay;
+};
+
+struct srvsvc_NetSrvInfo1553 {
+ uint32_t minlinkthroughput;
+};
+
+struct srvsvc_NetSrvInfo1554 {
+ uint32_t linkinfovalidtime;
+};
+
+struct srvsvc_NetSrvInfo1555 {
+ uint32_t scavqosinfoupdatetime;
+};
+
+struct srvsvc_NetSrvInfo1556 {
+ uint32_t maxworkitemidletime;
+};
+
+union srvsvc_NetSrvInfo {
+ struct srvsvc_NetSrvInfo100 *info100;/* [unique,case(100)] */
+ struct srvsvc_NetSrvInfo101 *info101;/* [unique,case(101)] */
+ struct srvsvc_NetSrvInfo102 *info102;/* [unique,case(102)] */
+ struct srvsvc_NetSrvInfo402 *info402;/* [unique,case(402)] */
+ struct srvsvc_NetSrvInfo403 *info403;/* [unique,case(403)] */
+ struct srvsvc_NetSrvInfo502 *info502;/* [unique,case(502)] */
+ struct srvsvc_NetSrvInfo503 *info503;/* [unique,case(503)] */
+ struct srvsvc_NetSrvInfo599 *info599;/* [unique,case(599)] */
+ struct srvsvc_NetSrvInfo1005 *info1005;/* [unique,case(1005)] */
+ struct srvsvc_NetSrvInfo1010 *info1010;/* [unique,case(1010)] */
+ struct srvsvc_NetSrvInfo1016 *info1016;/* [unique,case(1016)] */
+ struct srvsvc_NetSrvInfo1017 *info1017;/* [unique,case(1017)] */
+ struct srvsvc_NetSrvInfo1018 *info1018;/* [unique,case(1018)] */
+ struct srvsvc_NetSrvInfo1107 *info1107;/* [unique,case(1107)] */
+ struct srvsvc_NetSrvInfo1501 *info1501;/* [unique,case(1501)] */
+ struct srvsvc_NetSrvInfo1502 *info1502;/* [unique,case(1502)] */
+ struct srvsvc_NetSrvInfo1503 *info1503;/* [unique,case(1503)] */
+ struct srvsvc_NetSrvInfo1506 *info1506;/* [unique,case(1506)] */
+ struct srvsvc_NetSrvInfo1509 *info1509;/* [unique,case(1509)] */
+ struct srvsvc_NetSrvInfo1510 *info1510;/* [unique,case(1510)] */
+ struct srvsvc_NetSrvInfo1511 *info1511;/* [unique,case(1511)] */
+ struct srvsvc_NetSrvInfo1512 *info1512;/* [unique,case(1512)] */
+ struct srvsvc_NetSrvInfo1513 *info1513;/* [unique,case(1513)] */
+ struct srvsvc_NetSrvInfo1514 *info1514;/* [unique,case(1514)] */
+ struct srvsvc_NetSrvInfo1515 *info1515;/* [unique,case(1515)] */
+ struct srvsvc_NetSrvInfo1516 *info1516;/* [unique,case(1516)] */
+ struct srvsvc_NetSrvInfo1518 *info1518;/* [unique,case(1518)] */
+ struct srvsvc_NetSrvInfo1520 *info1520;/* [unique,case(1520)] */
+ struct srvsvc_NetSrvInfo1521 *info1521;/* [unique,case(1521)] */
+ struct srvsvc_NetSrvInfo1522 *info1522;/* [unique,case(1522)] */
+ struct srvsvc_NetSrvInfo1523 *info1523;/* [unique,case(1523)] */
+ struct srvsvc_NetSrvInfo1524 *info1524;/* [unique,case(1524)] */
+ struct srvsvc_NetSrvInfo1525 *info1525;/* [unique,case(1525)] */
+ struct srvsvc_NetSrvInfo1528 *info1528;/* [unique,case(1528)] */
+ struct srvsvc_NetSrvInfo1529 *info1529;/* [unique,case(1529)] */
+ struct srvsvc_NetSrvInfo1530 *info1530;/* [unique,case(1530)] */
+ struct srvsvc_NetSrvInfo1533 *info1533;/* [unique,case(1533)] */
+ struct srvsvc_NetSrvInfo1534 *info1534;/* [unique,case(1534)] */
+ struct srvsvc_NetSrvInfo1535 *info1535;/* [unique,case(1535)] */
+ struct srvsvc_NetSrvInfo1536 *info1536;/* [unique,case(1536)] */
+ struct srvsvc_NetSrvInfo1537 *info1537;/* [unique,case(1537)] */
+ struct srvsvc_NetSrvInfo1538 *info1538;/* [unique,case(1538)] */
+ struct srvsvc_NetSrvInfo1539 *info1539;/* [unique,case(1539)] */
+ struct srvsvc_NetSrvInfo1540 *info1540;/* [unique,case(1540)] */
+ struct srvsvc_NetSrvInfo1541 *info1541;/* [unique,case(1541)] */
+ struct srvsvc_NetSrvInfo1542 *info1542;/* [unique,case(1542)] */
+ struct srvsvc_NetSrvInfo1543 *info1543;/* [unique,case(1543)] */
+ struct srvsvc_NetSrvInfo1544 *info1544;/* [unique,case(1544)] */
+ struct srvsvc_NetSrvInfo1545 *info1545;/* [unique,case(1545)] */
+ struct srvsvc_NetSrvInfo1546 *info1546;/* [unique,case(1546)] */
+ struct srvsvc_NetSrvInfo1547 *info1547;/* [unique,case(1547)] */
+ struct srvsvc_NetSrvInfo1548 *info1548;/* [unique,case(1548)] */
+ struct srvsvc_NetSrvInfo1549 *info1549;/* [unique,case(1549)] */
+ struct srvsvc_NetSrvInfo1550 *info1550;/* [unique,case(1550)] */
+ struct srvsvc_NetSrvInfo1552 *info1552;/* [unique,case(1552)] */
+ struct srvsvc_NetSrvInfo1553 *info1553;/* [unique,case(1553)] */
+ struct srvsvc_NetSrvInfo1554 *info1554;/* [unique,case(1554)] */
+ struct srvsvc_NetSrvInfo1555 *info1555;/* [unique,case(1555)] */
+ struct srvsvc_NetSrvInfo1556 *info1556;/* [unique,case(1556)] */
+};
+
+struct srvsvc_NetDiskInfo0 {
+ const char * disk;/* [flag(LIBNDR_FLAG_STR_LEN4)] */
+};
+
+struct srvsvc_NetDiskInfo {
+ uint32_t count;
+ struct srvsvc_NetDiskInfo0 *disks;/* [unique,length_is(count),size_is(count)] */
+};
+
+struct srvsvc_Statistics {
+ uint32_t start;
+ uint32_t fopens;
+ uint32_t devopens;
+ uint32_t jobsqueued;
+ uint32_t sopens;
+ uint32_t stimeouts;
+ uint32_t serrorout;
+ uint32_t pwerrors;
+ uint32_t permerrors;
+ uint32_t syserrors;
+ uint32_t bytessent_low;
+ uint32_t bytessent_high;
+ uint32_t bytesrcvd_low;
+ uint32_t bytesrcvd_high;
+ uint32_t avresponse;
+ uint32_t reqbufneed;
+ uint32_t bigbufneed;
+};
+
+struct srvsvc_NetTransportInfo0 {
+ uint32_t vcs;
+ const char *name;/* [unique,charset(UTF16)] */
+ uint8_t *addr;/* [unique,size_is(addr_len)] */
+ uint32_t addr_len;
+ const char *net_addr;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetTransportCtr0 {
+ uint32_t count;
+ struct srvsvc_NetTransportInfo0 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetTransportInfo1 {
+ uint32_t vcs;
+ const char *name;/* [unique,charset(UTF16)] */
+ uint8_t *addr;/* [unique,size_is(addr_len)] */
+ uint32_t addr_len;
+ const char *net_addr;/* [unique,charset(UTF16)] */
+ const char *domain;/* [unique,charset(UTF16)] */
+};
+
+struct srvsvc_NetTransportCtr1 {
+ uint32_t count;
+ struct srvsvc_NetTransportInfo1 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetTransportInfo2 {
+ uint32_t vcs;
+ const char *name;/* [unique,charset(UTF16)] */
+ uint8_t *addr;/* [unique,size_is(addr_len)] */
+ uint32_t addr_len;
+ const char *net_addr;/* [unique,charset(UTF16)] */
+ const char *domain;/* [unique,charset(UTF16)] */
+ uint32_t unknown;
+};
+
+struct srvsvc_NetTransportCtr2 {
+ uint32_t count;
+ struct srvsvc_NetTransportInfo2 *array;/* [unique,size_is(count)] */
+};
+
+struct srvsvc_NetTransportInfo3 {
+ uint32_t vcs;
+ const char *name;/* [unique,charset(UTF16)] */
+ uint8_t *addr;/* [unique,size_is(addr_len)] */
+ uint32_t addr_len;
+ const char *net_addr;/* [unique,charset(UTF16)] */
+ const char *domain;/* [unique,charset(UTF16)] */
+ uint32_t unknown1;
+ uint32_t unknown2;
+ uint8_t unknown3[256];
+};
+
+struct srvsvc_NetTransportCtr3 {
+ uint32_t count;
+ struct srvsvc_NetTransportInfo3 *array;/* [unique,size_is(count)] */
+};
+
+union srvsvc_NetTransportCtr {
+ struct srvsvc_NetTransportCtr0 *ctr0;/* [unique,case(0)] */
+ struct srvsvc_NetTransportCtr1 *ctr1;/* [unique,case] */
+ struct srvsvc_NetTransportCtr2 *ctr2;/* [unique,case(2)] */
+ struct srvsvc_NetTransportCtr3 *ctr3;/* [unique,case(3)] */
+};
+
+struct srvsvc_NetRemoteTODInfo {
+ uint32_t elapsed;
+ uint32_t msecs;
+ uint32_t hours;
+ uint32_t mins;
+ uint32_t secs;
+ uint32_t hunds;
+ int32_t timezone;
+ uint32_t tinterval;
+ uint32_t day;
+ uint32_t month;
+ uint32_t year;
+ uint32_t weekday;
+};
+
+union srvsvc_NetTransportInfo {
+ struct srvsvc_NetTransportInfo0 info0;/* [case(0)] */
+ struct srvsvc_NetTransportInfo1 info1;/* [case] */
+ struct srvsvc_NetTransportInfo2 info2;/* [case(2)] */
+ struct srvsvc_NetTransportInfo3 info3;/* [case(3)] */
+}/* [switch_type(uint32)] */;
+
+
+struct srvsvc_NetCharDevEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetCharDevCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetCharDevCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetCharDevGetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *device_name;/* [charset(UTF16)] */
+ uint32_t level;
+ } in;
+
+ struct {
+ union srvsvc_NetCharDevInfo *info;/* [ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetCharDevControl {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *device_name;/* [charset(UTF16)] */
+ uint32_t opcode;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetCharDevQEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetCharDevQCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetCharDevQCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetCharDevQGetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *queue_name;/* [charset(UTF16)] */
+ const char *user;/* [charset(UTF16)] */
+ uint32_t level;
+ } in;
+
+ struct {
+ union srvsvc_NetCharDevQInfo *info;/* [ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetCharDevQSetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *queue_name;/* [charset(UTF16)] */
+ uint32_t level;
+ union srvsvc_NetCharDevQInfo info;/* [switch_is(level)] */
+ uint32_t *parm_error;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *parm_error;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetCharDevQPurge {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *queue_name;/* [charset(UTF16)] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetCharDevQPurgeSelf {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *queue_name;/* [charset(UTF16)] */
+ const char *computer_name;/* [charset(UTF16)] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetConnEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *path;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetConnCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetConnCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetFileEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *path;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetFileCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetFileCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetFileGetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t fid;
+ uint32_t level;
+ } in;
+
+ struct {
+ union srvsvc_NetFileInfo *info;/* [ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetFileClose {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t fid;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetSessEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *client;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetSessCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetSessCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetSessDel {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *client;/* [unique,charset(UTF16)] */
+ const char *user;/* [unique,charset(UTF16)] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareAdd {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ union srvsvc_NetShareInfo info;/* [switch_is(level)] */
+ uint32_t *parm_error;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *parm_error;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareEnumAll {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareGetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *share_name;/* [charset(UTF16)] */
+ uint32_t level;
+ } in;
+
+ struct {
+ union srvsvc_NetShareInfo *info;/* [ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareSetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *share_name;/* [charset(UTF16)] */
+ uint32_t level;
+ union srvsvc_NetShareInfo info;/* [switch_is(level)] */
+ uint32_t *parm_error;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *parm_error;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareDel {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *share_name;/* [charset(UTF16)] */
+ uint32_t reserved;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareDelSticky {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *share_name;/* [charset(UTF16)] */
+ uint32_t reserved;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareCheck {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *device_name;/* [charset(UTF16)] */
+ } in;
+
+ struct {
+ enum srvsvc_ShareType *type;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetSrvGetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ } in;
+
+ struct {
+ union srvsvc_NetSrvInfo *info;/* [ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetSrvSetInfo {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ union srvsvc_NetSrvInfo info;/* [switch_is(level)] */
+ uint32_t *parm_error;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *parm_error;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetDiskEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ struct srvsvc_NetDiskInfo *info;/* [ref] */
+ uint32_t maxlen;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ struct srvsvc_NetDiskInfo *info;/* [ref] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetServerStatisticsGet {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *service;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ uint32_t options;
+ } in;
+
+ struct {
+ struct srvsvc_Statistics *stat;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetTransportAdd {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ union srvsvc_NetTransportInfo info;/* [switch_is(level)] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetTransportEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetTransportCtr *transports;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetTransportCtr *transports;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetTransportDel {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t unknown;
+ struct srvsvc_NetTransportInfo0 transport;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetRemoteTOD {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ } in;
+
+ struct {
+ struct srvsvc_NetRemoteTODInfo *info;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetSetServiceBits {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *transport;/* [unique,charset(UTF16)] */
+ uint32_t servicebits;
+ uint32_t updateimmediately;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetPathType {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *path;/* [charset(UTF16)] */
+ uint32_t pathflags;
+ } in;
+
+ struct {
+ uint32_t *pathtype;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetPathCanonicalize {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *path;/* [charset(UTF16)] */
+ uint32_t maxbuf;
+ const char *prefix;/* [charset(UTF16)] */
+ uint32_t *pathtype;/* [ref] */
+ uint32_t pathflags;
+ } in;
+
+ struct {
+ uint8_t *can_path;/* [size_is(maxbuf)] */
+ uint32_t *pathtype;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetPathCompare {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *path1;/* [charset(UTF16)] */
+ const char *path2;/* [charset(UTF16)] */
+ uint32_t pathtype;
+ uint32_t pathflags;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetNameValidate {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *name;/* [charset(UTF16)] */
+ uint32_t name_type;
+ uint32_t flags;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRPRNAMECANONICALIZE {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetPRNameCompare {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *name1;/* [charset(UTF16)] */
+ const char *name2;/* [charset(UTF16)] */
+ uint32_t name_type;
+ uint32_t flags;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareEnum {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t max_buffer;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *level;/* [ref] */
+ union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */
+ uint32_t *totalentries;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareDelStart {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *share;/* [charset(UTF16)] */
+ uint32_t reserved;
+ } in;
+
+ struct {
+ struct policy_handle *hnd;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetShareDelCommit {
+ struct {
+ struct policy_handle *hnd;/* [unique] */
+ } in;
+
+ struct {
+ struct policy_handle *hnd;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetGetFileSecurity {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *share;/* [unique,charset(UTF16)] */
+ const char *file;/* [charset(UTF16)] */
+ uint32_t securityinformation;
+ } in;
+
+ struct {
+ struct sec_desc_buf *sd_buf;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetSetFileSecurity {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *share;/* [unique,charset(UTF16)] */
+ const char *file;/* [charset(UTF16)] */
+ uint32_t securityinformation;
+ struct sec_desc_buf sd_buf;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetServerTransportAddEx {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ union srvsvc_NetTransportInfo info;/* [switch_is(level)] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NetServerSetServiceBitsEx {
+ struct {
+ const char *server_unc;/* [unique,charset(UTF16)] */
+ const char *emulated_server_unc;/* [unique,charset(UTF16)] */
+ const char *transport;/* [unique,charset(UTF16)] */
+ uint32_t servicebitsofinterest;
+ uint32_t servicebits;
+ uint32_t updateimmediately;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSGETVERSION {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSCREATELOCALPARTITION {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSDELETELOCALPARTITION {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSSETLOCALVOLUMESTATE {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSSETSERVERINFO {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSCREATEEXITPOINT {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSDELETEEXITPOINT {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSMODIFYPREFIX {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSFIXLOCALVOLUME {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRDFSMANAGERREPORTSITEINFO {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct srvsvc_NETRSERVERTRANSPORTDELEX {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+#endif /* _HEADER_srvsvc */
diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h
new file mode 100644
index 0000000000..6bc81b93a7
--- /dev/null
+++ b/source3/librpc/gen_ndr/svcctl.h
@@ -0,0 +1,738 @@
+/* header auto-generated by pidl */
+
+#ifndef _HEADER_svcctl
+#define _HEADER_svcctl
+
+#define SERVICE_TYPE_KERNEL_DRIVER ( 0x01 )
+#define SERVICE_TYPE_FS_DRIVER ( 0x02 )
+#define SERVICE_TYPE_ADAPTER ( 0x04 )
+#define SERVICE_TYPE_RECOGNIZER_DRIVER ( 0x08 )
+#define SERVICE_TYPE_DRIVER ( SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER )
+#define SERVICE_TYPE_WIN32_OWN_PROCESS ( 0x10 )
+#define SERVICE_TYPE_WIN32_SHARE_PROCESS ( 0x20 )
+#define SERVICE_TYPE_WIN32 ( SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS )
+#define SERVICE_STATE_ACTIVE ( 0x01 )
+#define SERVICE_STATE_INACTIVE ( 0x02 )
+#define SERVICE_STATE_ALL ( 0x03 )
+#define SV_TYPE_ALL ( 0xFFFFFFFF )
+struct SERVICE_LOCK_STATUS {
+ uint32_t is_locked;
+ const char *lock_owner;/* [unique,charset(UTF16)] */
+ uint32_t lock_duration;
+};
+
+struct SERVICE_STATUS {
+ uint32_t type;
+ uint32_t state;
+ uint32_t controls_accepted;
+ uint32_t win32_exit_code;
+ uint32_t service_exit_code;
+ uint32_t check_point;
+ uint32_t wait_hint;
+};
+
+struct ENUM_SERVICE_STATUS {
+ const char * service_name;/* [relative,flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+ const char * display_name;/* [relative,flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+ struct SERVICE_STATUS status;
+};
+
+/* bitmap svcctl_ServerType */
+#define SV_TYPE_WORKSTATION ( 0x00000001 )
+#define SV_TYPE_SERVER ( 0x00000002 )
+#define SV_TYPE_SQLSERVER ( 0x00000004 )
+#define SV_TYPE_DOMAIN_CTRL ( 0x00000008 )
+#define SV_TYPE_DOMAIN_BAKCTRL ( 0x00000010 )
+#define SV_TYPE_TIME_SOURCE ( 0x00000020 )
+#define SV_TYPE_AFP ( 0x00000040 )
+#define SV_TYPE_NOVELL ( 0x00000080 )
+#define SV_TYPE_DOMAIN_MEMBER ( 0x00000100 )
+#define SV_TYPE_PRINTQ_SERVER ( 0x00000200 )
+#define SV_TYPE_DIALIN_SERVER ( 0x00000400 )
+#define SV_TYPE_SERVER_UNIX ( 0x00000800 )
+#define SV_TYPE_NT ( 0x00001000 )
+#define SV_TYPE_WFW ( 0x00002000 )
+#define SV_TYPE_SERVER_MFPN ( 0x00004000 )
+#define SV_TYPE_SERVER_NT ( 0x00008000 )
+#define SV_TYPE_POTENTIAL_BROWSER ( 0x00010000 )
+#define SV_TYPE_BACKUP_BROWSER ( 0x00020000 )
+#define SV_TYPE_MASTER_BROWSER ( 0x00040000 )
+#define SV_TYPE_DOMAIN_MASTER ( 0x00080000 )
+#define SV_TYPE_SERVER_OSF ( 0x00100000 )
+#define SV_TYPE_SERVER_VMS ( 0x00200000 )
+#define SV_TYPE_WIN95_PLUS ( 0x00400000 )
+#define SV_TYPE_DFS_SERVER ( 0x00800000 )
+#define SV_TYPE_ALTERNATE_XPORT ( 0x20000000 )
+#define SV_TYPE_LOCAL_LIST_ONLY ( 0x40000000 )
+#define SV_TYPE_DOMAIN_ENUM ( 0x80000000 )
+
+enum SERVICE_CONTROL {
+ FIXME=1
+};
+
+
+struct svcctl_CloseServiceHandle {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ } in;
+
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_ControlService {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t control;
+ } in;
+
+ struct {
+ struct SERVICE_STATUS *status;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_DeleteService {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_LockServiceDatabase {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ } in;
+
+ struct {
+ struct policy_handle *lock;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceObjectSecurity {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_SetServiceObjectSecurity {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceStatus {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ } in;
+
+ struct {
+ struct SERVICE_STATUS *status;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_SetServiceStatus {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_UnlockServiceDatabase {
+ struct {
+ struct policy_handle *lock;/* [ref] */
+ } in;
+
+ struct {
+ struct policy_handle *lock;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_NotifyBootConfigStatus {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_SCSetServiceBitsW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t bits;
+ uint32_t bitson;
+ uint32_t immediate;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_ChangeServiceConfigW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t type;
+ uint32_t start;
+ uint32_t error;
+ const char *binary_path;/* [unique,charset(UTF16)] */
+ const char *load_order_group;/* [unique,charset(UTF16)] */
+ const char *dependencies;/* [unique,charset(UTF16)] */
+ const char *service_start_name;/* [unique,charset(UTF16)] */
+ const char *password;/* [unique,charset(UTF16)] */
+ const char *display_name;/* [unique,charset(UTF16)] */
+ } in;
+
+ struct {
+ uint32_t *tag_id;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_CreateServiceW {
+ struct {
+ struct policy_handle *scmanager_handle;/* [ref] */
+ const char *ServiceName;/* [charset(UTF16)] */
+ const char *DisplayName;/* [unique,charset(UTF16)] */
+ uint32_t desired_access;
+ uint32_t type;
+ uint32_t start_type;
+ uint32_t error_control;
+ const char *binary_path;/* [charset(UTF16)] */
+ const char *LoadOrderGroupKey;/* [unique,charset(UTF16)] */
+ uint32_t *TagId;/* [unique] */
+ uint8_t *dependencies;/* [unique,size_is(dependencies_size)] */
+ uint32_t dependencies_size;
+ const char *service_start_name;/* [unique,charset(UTF16)] */
+ uint8_t *password;/* [unique,size_is(password_size)] */
+ uint32_t password_size;
+ } in;
+
+ struct {
+ uint32_t *TagId;/* [unique] */
+ struct policy_handle *handle;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_EnumDependentServicesW {
+ struct {
+ struct policy_handle *service;/* [ref] */
+ uint32_t state;
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ struct ENUM_SERVICE_STATUS *status;/* [unique] */
+ uint32_t *bytes_needed;/* [ref] */
+ uint32_t *services_returned;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_EnumServicesStatusW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t type;
+ uint32_t state;
+ uint32_t buf_size;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint8_t *service;/* [size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref] */
+ uint32_t *services_returned;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_OpenSCManagerW {
+ struct {
+ const char *MachineName;/* [unique,charset(UTF16)] */
+ const char *DatabaseName;/* [unique,charset(UTF16)] */
+ uint32_t access_mask;
+ } in;
+
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_OpenServiceW {
+ struct {
+ struct policy_handle *scmanager_handle;/* [ref] */
+ const char *ServiceName;/* [charset(UTF16)] */
+ uint32_t access_mask;
+ } in;
+
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceConfigW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ uint8_t *query;
+ uint32_t *bytes_needed;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceLockStatusW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ struct SERVICE_LOCK_STATUS *status;/* [ref] */
+ uint32_t *required_buf_size;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_StartServiceW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t NumArgs;
+ const char *Arguments;/* [unique,charset(UTF16),length_is(NumArgs)] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_GetServiceDisplayNameW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ const char *service_name;/* [unique,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ } in;
+
+ struct {
+ const char **display_name;/* [ref,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_GetServiceKeyNameW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ const char *service_name;/* [unique,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ } in;
+
+ struct {
+ const char **key_name;/* [ref,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_SCSetServiceBitsA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t bits;
+ uint32_t bitson;
+ uint32_t immediate;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_ChangeServiceConfigA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t type;
+ uint32_t start;
+ uint32_t error;
+ const char *binary_path;/* [unique,charset(UTF16)] */
+ const char *load_order_group;/* [unique,charset(UTF16)] */
+ const char *dependencies;/* [unique,charset(UTF16)] */
+ const char *service_start_name;/* [unique,charset(UTF16)] */
+ const char *password;/* [unique,charset(UTF16)] */
+ const char *display_name;/* [unique,charset(UTF16)] */
+ } in;
+
+ struct {
+ uint32_t *tag_id;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_CreateServiceA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ const char *ServiceName;/* [unique,charset(UTF16)] */
+ const char *DisplayName;/* [unique,charset(UTF16)] */
+ uint32_t desired_access;
+ uint32_t type;
+ uint32_t start_type;
+ uint32_t error_control;
+ const char *binary_path;/* [unique,charset(UTF16)] */
+ const char *LoadOrderGroupKey;/* [unique,charset(UTF16)] */
+ const char *dependencies;/* [unique,charset(UTF16)] */
+ const char *service_start_name;/* [unique,charset(UTF16)] */
+ const char *password;/* [unique,charset(UTF16)] */
+ } in;
+
+ struct {
+ uint32_t *TagId;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_EnumDependentServicesA {
+ struct {
+ struct policy_handle *service;/* [ref] */
+ uint32_t state;
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ struct ENUM_SERVICE_STATUS *status;/* [unique] */
+ uint32_t *bytes_needed;/* [ref] */
+ uint32_t *services_returned;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_EnumServicesStatusA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t type;
+ uint32_t state;
+ uint32_t buf_size;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint8_t *service;/* [size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref] */
+ uint32_t *services_returned;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_OpenSCManagerA {
+ struct {
+ const char *MachineName;/* [unique,charset(UTF16)] */
+ const char *DatabaseName;/* [unique,charset(UTF16)] */
+ uint32_t access_mask;
+ } in;
+
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_OpenServiceA {
+ struct {
+ struct policy_handle *scmanager_handle;/* [ref] */
+ const char *ServiceName;/* [unique,charset(UTF16)] */
+ uint32_t access_mask;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceConfigA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ uint8_t *query;
+ uint32_t *bytes_needed;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceLockStatusA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ struct SERVICE_LOCK_STATUS *status;/* [ref] */
+ uint32_t *required_buf_size;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_StartServiceA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t NumArgs;
+ const char *Arguments;/* [unique,charset(UTF16),length_is(NumArgs)] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_GetServiceDisplayNameA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ const char *service_name;/* [unique,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ } in;
+
+ struct {
+ const char **display_name;/* [ref,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_GetServiceKeyNameA {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ const char *service_name;/* [unique,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ } in;
+
+ struct {
+ const char **key_name;/* [ref,charset(UTF16)] */
+ uint32_t *display_name_length;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_GetCurrentGroupeStateW {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_EnumServiceGroupW {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_ChangeServiceConfig2A {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t info_level;
+ uint8_t *info;/* [unique] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_ChangeServiceConfig2W {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t info_level;
+ uint8_t *info;/* [unique] */
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceConfig2A {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t info_level;
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ uint8_t *buffer;
+ uint32_t *bytes_needed;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceConfig2W {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t info_level;
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ uint8_t *buffer;
+ uint32_t *bytes_needed;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_QueryServiceStatusEx {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t info_level;
+ uint32_t buf_size;
+ } in;
+
+ struct {
+ uint8_t *buffer;
+ uint32_t *bytes_needed;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct EnumServicesStatusExA {
+ struct {
+ struct policy_handle *scmanager;/* [ref] */
+ uint32_t info_level;
+ uint32_t type;
+ uint32_t state;
+ uint32_t buf_size;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint8_t *services;
+ uint32_t *bytes_needed;/* [ref] */
+ uint32_t *service_returned;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ const char **group_name;/* [ref,charset(UTF16)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct EnumServicesStatusExW {
+ struct {
+ struct policy_handle *scmanager;/* [ref] */
+ uint32_t info_level;
+ uint32_t type;
+ uint32_t state;
+ uint32_t buf_size;
+ uint32_t *resume_handle;/* [unique] */
+ } in;
+
+ struct {
+ uint8_t *services;
+ uint32_t *bytes_needed;/* [ref] */
+ uint32_t *service_returned;/* [ref] */
+ uint32_t *resume_handle;/* [unique] */
+ const char **group_name;/* [ref,charset(UTF16)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct svcctl_SCSendTSMessage {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+#endif /* _HEADER_svcctl */
diff --git a/source3/librpc/idl/srvsvc.idl b/source3/librpc/idl/srvsvc.idl
index 2dfc198f5b..a20660b378 100644
--- a/source3/librpc/idl/srvsvc.idl
+++ b/source3/librpc/idl/srvsvc.idl
@@ -56,11 +56,11 @@
/* Function: 0x00 */
WERROR srvsvc_NetCharDevEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetCharDevCtr ctr,
+ [in,out,ref] uint32 *level,
+ [in,out,ref,switch_is(*level)] srvsvc_NetCharDevCtr *ctr,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
- [in,out] uint32 *resume_handle
+ [out,ref] uint32 *totalentries,
+ [in,out,unique] uint32 *resume_handle
);
/******************/
@@ -69,7 +69,7 @@
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 device_name[],
[in] uint32 level,
- [out,switch_is(level)] srvsvc_NetCharDevInfo info
+ [out,ref,switch_is(level)] srvsvc_NetCharDevInfo *info
);
/******************/
@@ -122,10 +122,10 @@
WERROR srvsvc_NetCharDevQEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 *user,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetCharDevQCtr ctr,
+ [in,out,ref] uint32 *level,
+ [in,out,switch_is(*level),ref] srvsvc_NetCharDevQCtr *ctr,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
+ [out,ref] uint32 *totalentries,
[in,out] uint32 *resume_handle
);
@@ -136,7 +136,7 @@
[in] [string,charset(UTF16)] uint16 queue_name[],
[in] [string,charset(UTF16)] uint16 user[],
[in] uint32 level,
- [out,switch_is(level)] srvsvc_NetCharDevQInfo info
+ [out,switch_is(level),ref] srvsvc_NetCharDevQInfo *info
);
/******************/
@@ -202,11 +202,11 @@
WERROR srvsvc_NetConnEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 *path,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetConnCtr ctr,
+ [in,out,ref] uint32 *level,
+ [in,out,switch_is(*level),ref] srvsvc_NetConnCtr *ctr,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
- [in,out] uint32 *resume_handle
+ [out,ref] uint32 *totalentries,
+ [in,out,unique] uint32 *resume_handle
);
/**************************/
@@ -252,11 +252,11 @@
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 *path,
[in] [string,charset(UTF16)] uint16 *user,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetFileCtr ctr,
+ [in,out,ref] uint32 *level,
+ [in,out,switch_is(*level),ref] srvsvc_NetFileCtr *ctr,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
- [in,out] uint32 *resume_handle
+ [out,ref] uint32 *totalentries,
+ [in,out,unique] uint32 *resume_handle
);
/******************/
@@ -265,7 +265,7 @@
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] uint32 fid,
[in] uint32 level,
- [out,switch_is(level)] srvsvc_NetFileInfo info
+ [out,switch_is(level),ref] srvsvc_NetFileInfo *info
);
/******************/
@@ -359,11 +359,11 @@
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 *client,
[in] [string,charset(UTF16)] uint16 *user,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetSessCtr ctr,
+ [in,out,ref] uint32 *level,
+ [in,out,switch_is(*level),ref] srvsvc_NetSessCtr *ctr,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
- [in,out] uint32 *resume_handle
+ [out,ref] uint32 *totalentries,
+ [in,out,unique] uint32 *resume_handle
);
/******************/
@@ -473,8 +473,16 @@
[size_is(count)] srvsvc_NetShareInfo1004 *array;
} srvsvc_NetShareCtr1004;
+ typedef bitmap {
+ SHARE_1005_IN_DFS = 0x00000001,
+ SHARE_1005_DFS_ROOT = 0x00000002
+ } NetShareInfo1005Flags;
+
+ const uint32 SHARE_1005_CSC_POLICY_MASK = 0x00000030;
+ const uint32 SHARE_1005_CSC_POLICY_SHIFT = 4;
+
typedef struct {
- uint32 dfs_flags;
+ NetShareInfo1005Flags dfs_flags;
} srvsvc_NetShareInfo1005;
typedef struct {
@@ -547,10 +555,10 @@
/* Function: 0x0f */
WERROR srvsvc_NetShareEnumAll (
[in] [string,charset(UTF16)] uint16 *server_unc,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetShareCtr ctr,
+ [in,out,ref] uint32 *level,
+ [in,out,ref,switch_is(*level)] srvsvc_NetShareCtr *ctr,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
+ [out,ref] uint32 *totalentries,
[in,out] uint32 *resume_handle
);
@@ -560,7 +568,7 @@
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 share_name[],
[in] uint32 level,
- [out,switch_is(level)] srvsvc_NetShareInfo info
+ [out,ref,switch_is(level)] srvsvc_NetShareInfo *info
);
/******************/
@@ -594,7 +602,7 @@
WERROR srvsvc_NetShareCheck(
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 device_name[],
- [out] srvsvc_ShareType type
+ [out,ref] srvsvc_ShareType *type
);
/**************************/
@@ -1104,7 +1112,7 @@
WERROR srvsvc_NetSrvGetInfo(
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] uint32 level,
- [out,switch_is(level)] srvsvc_NetSrvInfo info
+ [out,ref,switch_is(level)] srvsvc_NetSrvInfo *info
);
/******************/
@@ -1133,9 +1141,9 @@
WERROR srvsvc_NetDiskEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] uint32 level,
- [in,out] srvsvc_NetDiskInfo info,
+ [in,out,ref] srvsvc_NetDiskInfo *info,
[in] uint32 maxlen,
- [out] uint32 totalentries,
+ [out,ref] uint32 *totalentries,
[in,out] uint32 *resume_handle
);
@@ -1169,7 +1177,7 @@
[in] [string,charset(UTF16)] uint16 *service,
[in] uint32 level,
[in] uint32 options,
- [out] srvsvc_Statistics stat
+ [out,ref] srvsvc_Statistics *stat
);
/**************************/
@@ -1254,11 +1262,11 @@
/* Function: 0x1a */
WERROR srvsvc_NetTransportEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetTransportCtr transports,
+ [in,out,ref] uint32 *level,
+ [in,out,ref,switch_is(*level)] srvsvc_NetTransportCtr *transports,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
- [in,out] uint32 *resume_handle
+ [out,ref] uint32 *totalentries,
+ [in,out,unique] uint32 *resume_handle
);
/******************/
@@ -1315,7 +1323,7 @@
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 path[],
[in] uint32 pathflags,
- [out] uint32 pathtype
+ [out,ref] uint32 *pathtype
);
/******************/
@@ -1326,7 +1334,7 @@
[out] [size_is(maxbuf)] uint8 can_path[],
[in] uint32 maxbuf,
[in] [string,charset(UTF16)] uint16 prefix[],
- [in,out] uint32 pathtype,
+ [in,out,ref] uint32 *pathtype,
[in] uint32 pathflags
);
@@ -1376,11 +1384,11 @@
total entries ... */
WERROR srvsvc_NetShareEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
- [in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetShareCtr ctr,
+ [in,out,ref] uint32 *level,
+ [in,out,ref,switch_is(*level)] srvsvc_NetShareCtr *ctr,
[in] uint32 max_buffer,
- [out] uint32 totalentries,
- [in,out] uint32 *resume_handle
+ [out,ref] uint32 *totalentries,
+ [in,out,unique] uint32 *resume_handle
);
/******************/
diff --git a/source3/librpc/idl/svcctl.idl b/source3/librpc/idl/svcctl.idl
index 57d25efd0d..aa159da24e 100644
--- a/source3/librpc/idl/svcctl.idl
+++ b/source3/librpc/idl/svcctl.idl
@@ -108,7 +108,7 @@
WERROR svcctl_LockServiceDatabase(
[in,ref] policy_handle *handle,
- [out] policy_handle lock
+ [out,ref] policy_handle *lock
);
/*****************/
@@ -155,7 +155,7 @@
[in] uint32 error,
[in] [string,charset(UTF16)] uint16 *binary_path,
[in] [string,charset(UTF16)] uint16 *load_order_group,
- [out] uint32 tag_id,
+ [out,ref] uint32 *tag_id,
[in] [string,charset(UTF16)] uint16 *dependencies,
[in] [string,charset(UTF16)] uint16 *service_start_name,
[in] [string,charset(UTF16)] uint16 *password,
@@ -186,8 +186,8 @@
[in] uint32 state,
[out] ENUM_SERVICE_STATUS *status,
[in] uint32 buf_size,
- [out] uint32 bytes_needed,
- [out] uint32 services_returned);
+ [out,ref] uint32 *bytes_needed,
+ [out,ref] uint32 *services_returned);
/*****************/
/* Function 0x0e */
@@ -197,8 +197,8 @@
[in] uint32 state,
[in] uint32 buf_size,
[out,size_is(buf_size)] uint8 service[*],
- [out] uint32 bytes_needed,
- [out] uint32 services_returned,
+ [out,ref] uint32 *bytes_needed,
+ [out,ref] uint32 *services_returned,
[in,out] uint32 *resume_handle
);
/*****************/
@@ -221,7 +221,7 @@
WERROR svcctl_QueryServiceConfigW([in,ref] policy_handle *handle,
[out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
[in] uint32 buf_size,
- [out] uint32 bytes_needed
+ [out,ref] uint32 *bytes_needed
);
/*****************/
@@ -244,13 +244,13 @@
/* Function 0x14 */
WERROR svcctl_GetServiceDisplayNameW([in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 *service_name,
- [out] [string,charset(UTF16)] uint16 *display_name,
+ [out,ref] [string,charset(UTF16)] uint16 **display_name,
[in,out] uint32 *display_name_length);
/*****************/
/* Function 0x15 */
WERROR svcctl_GetServiceKeyNameW([in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 *service_name,
- [out] [string,charset(UTF16)] uint16 *key_name,
+ [out,ref] [string,charset(UTF16)] uint16 **key_name,
[in,out] uint32 *display_name_length);
/*****************/
/* Function 0x16 */
@@ -268,7 +268,7 @@
[in] uint32 error,
[in] [string,charset(UTF16)] uint16 *binary_path,
[in] [string,charset(UTF16)] uint16 *load_order_group,
- [out] uint32 tag_id,
+ [out,ref] uint32 *tag_id,
[in] [string,charset(UTF16)] uint16 *dependencies,
[in] [string,charset(UTF16)] uint16 *service_start_name,
[in] [string,charset(UTF16)] uint16 *password,
@@ -296,8 +296,8 @@
[in] uint32 state,
[out] ENUM_SERVICE_STATUS *status,
[in] uint32 buf_size,
- [out] uint32 bytes_needed,
- [out] uint32 services_returned);
+ [out,ref] uint32 *bytes_needed,
+ [out,ref] uint32 *services_returned);
/*****************/
/* Function 0x1a */
@@ -307,8 +307,8 @@
[in] uint32 state,
[in] uint32 buf_size,
[out,size_is(buf_size)] uint8 service[*],
- [out] uint32 bytes_needed,
- [out] uint32 services_returned,
+ [out,ref] uint32 *bytes_needed,
+ [out,ref] uint32 *services_returned,
[in,out] uint32 *resume_handle
);
@@ -331,7 +331,7 @@
WERROR svcctl_QueryServiceConfigA([in,ref] policy_handle *handle,
[out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
[in] uint32 buf_size,
- [out] uint32 bytes_needed
+ [out,ref] uint32 *bytes_needed
);
/*****************/
@@ -354,13 +354,13 @@
/* Function 0x20 */
WERROR svcctl_GetServiceDisplayNameA([in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 *service_name,
- [out] [string,charset(UTF16)] uint16 *display_name,
+ [out,ref] [string,charset(UTF16)] uint16 **display_name,
[in,out] uint32 *display_name_length);
/*****************/
/* Function 0x21 */
WERROR svcctl_GetServiceKeyNameA([in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 *service_name,
- [out] [string,charset(UTF16)] uint16 *key_name,
+ [out,ref] [string,charset(UTF16)] uint16 **key_name,
[in,out] uint32 *display_name_length);
/*****************/
@@ -391,7 +391,7 @@
[in] uint32 info_level,
[out] uint8 buffer[buf_size],
[in] uint32 buf_size,
- [out] uint32 bytes_needed);
+ [out,ref] uint32 *bytes_needed);
/*****************/
/* Function 0x27 */
@@ -400,7 +400,7 @@
[in] uint32 info_level,
[out] uint8 buffer[buf_size],
[in] uint32 buf_size,
- [out] uint32 bytes_needed);
+ [out,ref] uint32 *bytes_needed);
/*****************/
/* Function 0x28 */
@@ -409,7 +409,7 @@
[in] uint32 info_level,
[out] uint8 buffer[buf_size],
[in] uint32 buf_size,
- [out] uint32 bytes_needed);
+ [out,ref] uint32 *bytes_needed);
/*****************/
/* Function 0x29 */
@@ -420,10 +420,10 @@
[in] uint32 state,
[out] uint8 services[buf_size],
[in] uint32 buf_size,
- [out] uint32 bytes_needed,
- [out] uint32 service_returned,
+ [out,ref] uint32 *bytes_needed,
+ [out,ref] uint32 *service_returned,
[in,out] uint32 *resume_handle,
- [out] [string,charset(UTF16)] uint16 *group_name);
+ [out,ref] [string,charset(UTF16)] uint16 **group_name);
/*****************/
/* Function 0x2a */
@@ -434,10 +434,10 @@
[in] uint32 state,
[out] uint8 services[buf_size],
[in] uint32 buf_size,
- [out] uint32 bytes_needed,
- [out] uint32 service_returned,
+ [out,ref] uint32 *bytes_needed,
+ [out,ref] uint32 *service_returned,
[in,out] uint32 *resume_handle,
- [out] [string,charset(UTF16)] uint16 *group_name);
+ [out,ref] [string,charset(UTF16)] uint16 **group_name);
/*****************/
/* Function 0x2b */