summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-rw-r--r--librpc/gen_ndr/cli_spoolss.c16
-rw-r--r--librpc/gen_ndr/cli_spoolss.h8
-rw-r--r--librpc/gen_ndr/ndr_spoolss.c450
-rw-r--r--librpc/gen_ndr/ndr_spoolss.h36
-rw-r--r--librpc/gen_ndr/spoolss.h65
-rw-r--r--librpc/gen_ndr/srv_spoolss.c35
-rw-r--r--librpc/idl/spoolss.idl49
-rw-r--r--librpc/ndr/ndr_spoolss_buf.c33
-rw-r--r--librpc/ndr/ndr_spoolss_buf.h7
9 files changed, 667 insertions, 32 deletions
diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index 87e305f09e..2e0582e088 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -2431,12 +2431,25 @@ NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *servername /* [in] [unique,charset(UTF16)] */,
+ const char *print_processor_name /* [in] [unique,charset(UTF16)] */,
+ uint32_t level /* [in] */,
+ DATA_BLOB *buffer /* [in] [unique] */,
+ uint32_t offered /* [in] */,
+ uint32_t *count /* [out] [ref] */,
+ union spoolss_PrintProcDataTypesInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
struct spoolss_EnumPrintProcDataTypes r;
NTSTATUS status;
/* In parameters */
+ r.in.servername = servername;
+ r.in.print_processor_name = print_processor_name;
+ r.in.level = level;
+ r.in.buffer = buffer;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
@@ -2461,6 +2474,9 @@ NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
}
/* Return variables */
+ *count = *r.out.count;
+ *info = *r.out.info;
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index ba766d9638..3aebf3308e 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -315,6 +315,14 @@ NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
WERROR *werror);
NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *servername /* [in] [unique,charset(UTF16)] */,
+ const char *print_processor_name /* [in] [unique,charset(UTF16)] */,
+ uint32_t level /* [in] */,
+ DATA_BLOB *buffer /* [in] [unique] */,
+ uint32_t offered /* [in] */,
+ uint32_t *count /* [out] [ref] */,
+ union spoolss_PrintProcDataTypesInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index c8bc26db6e..3d1237cc8b 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -13749,7 +13749,7 @@ _PUBLIC_ size_t ndr_size_spoolss_DriverDirectoryInfo(const union spoolss_DriverD
return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverDirectoryInfo, ic);
}
-static enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcessorInfo1 *r)
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcessorInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -13774,7 +13774,7 @@ static enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push *n
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcessorInfo1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcessorInfo1 *r)
{
uint32_t _ptr_print_processor_name;
TALLOC_CTX *_mem_save_print_processor_name_0;
@@ -13826,6 +13826,11 @@ _PUBLIC_ void ndr_print_spoolss_PrintProcessorInfo1(struct ndr_print *ndr, const
ndr->depth--;
}
+_PUBLIC_ size_t ndr_size_spoolss_PrintProcessorInfo1(const struct spoolss_PrintProcessorInfo1 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorInfo1, ic);
+}
+
_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcessorInfo *r)
{
uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
@@ -15622,7 +15627,7 @@ _PUBLIC_ void ndr_print_spoolss_AddFormInfo(struct ndr_print *ndr, const char *n
}
}
-static enum ndr_err_code ndr_push_spoolss_PortInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo1 *r)
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -15647,7 +15652,7 @@ static enum ndr_err_code ndr_push_spoolss_PortInfo1(struct ndr_push *ndr, int nd
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_PortInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo1 *r)
{
uint32_t _ptr_port_name;
TALLOC_CTX *_mem_save_port_name_0;
@@ -15699,6 +15704,11 @@ _PUBLIC_ void ndr_print_spoolss_PortInfo1(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+_PUBLIC_ size_t ndr_size_spoolss_PortInfo1(const struct spoolss_PortInfo1 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo1, ic);
+}
+
static enum ndr_err_code ndr_push_spoolss_PortType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -15724,7 +15734,7 @@ _PUBLIC_ void ndr_print_spoolss_PortType(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-static enum ndr_err_code ndr_push_spoolss_PortInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo2 *r)
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -15781,7 +15791,7 @@ static enum ndr_err_code ndr_push_spoolss_PortInfo2(struct ndr_push *ndr, int nd
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_PortInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo2 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo2 *r)
{
uint32_t _ptr_port_name;
TALLOC_CTX *_mem_save_port_name_0;
@@ -15907,6 +15917,11 @@ _PUBLIC_ void ndr_print_spoolss_PortInfo2(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+_PUBLIC_ size_t ndr_size_spoolss_PortInfo2(const struct spoolss_PortInfo2 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo2, ic);
+}
+
static enum ndr_err_code ndr_push_spoolss_PortStatus(struct ndr_push *ndr, int ndr_flags, enum spoolss_PortStatus r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -15969,7 +15984,7 @@ _PUBLIC_ void ndr_print_spoolss_PortSeverity(struct ndr_print *ndr, const char *
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-static enum ndr_err_code ndr_push_spoolss_PortInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo3 *r)
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo3 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -15996,7 +16011,7 @@ static enum ndr_err_code ndr_push_spoolss_PortInfo3(struct ndr_push *ndr, int nd
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_PortInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo3 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo3 *r)
{
uint32_t _ptr_status_string;
TALLOC_CTX *_mem_save_status_string_0;
@@ -16052,7 +16067,12 @@ _PUBLIC_ void ndr_print_spoolss_PortInfo3(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-static enum ndr_err_code ndr_push_spoolss_PortInfoFF(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfoFF *r)
+_PUBLIC_ size_t ndr_size_spoolss_PortInfo3(const struct spoolss_PortInfo3 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo3, ic);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfoFF(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfoFF *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -16078,7 +16098,7 @@ static enum ndr_err_code ndr_push_spoolss_PortInfoFF(struct ndr_push *ndr, int n
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_PortInfoFF(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfoFF *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfoFF(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfoFF *r)
{
uint32_t _ptr_port_name;
TALLOC_CTX *_mem_save_port_name_0;
@@ -16132,6 +16152,11 @@ _PUBLIC_ void ndr_print_spoolss_PortInfoFF(struct ndr_print *ndr, const char *na
ndr->depth--;
}
+_PUBLIC_ size_t ndr_size_spoolss_PortInfoFF(const struct spoolss_PortInfoFF *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfoFF, ic);
+}
+
_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PortInfo *r)
{
uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
@@ -16288,7 +16313,7 @@ _PUBLIC_ void ndr_print_spoolss_PortInfo(struct ndr_print *ndr, const char *name
}
}
-static enum ndr_err_code ndr_push_spoolss_MonitorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo1 *r)
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -16313,7 +16338,7 @@ static enum ndr_err_code ndr_push_spoolss_MonitorInfo1(struct ndr_push *ndr, int
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_MonitorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo1 *r)
{
uint32_t _ptr_monitor_name;
TALLOC_CTX *_mem_save_monitor_name_0;
@@ -16365,7 +16390,12 @@ _PUBLIC_ void ndr_print_spoolss_MonitorInfo1(struct ndr_print *ndr, const char *
ndr->depth--;
}
-static enum ndr_err_code ndr_push_spoolss_MonitorInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo2 *r)
+_PUBLIC_ size_t ndr_size_spoolss_MonitorInfo1(const struct spoolss_MonitorInfo1 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_MonitorInfo1, ic);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo2 *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -16420,7 +16450,7 @@ static enum ndr_err_code ndr_push_spoolss_MonitorInfo2(struct ndr_push *ndr, int
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_MonitorInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo2 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo2 *r)
{
uint32_t _ptr_monitor_name;
TALLOC_CTX *_mem_save_monitor_name_0;
@@ -16542,6 +16572,11 @@ _PUBLIC_ void ndr_print_spoolss_MonitorInfo2(struct ndr_print *ndr, const char *
ndr->depth--;
}
+_PUBLIC_ size_t ndr_size_spoolss_MonitorInfo2(const struct spoolss_MonitorInfo2 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_MonitorInfo2, ic);
+}
+
_PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_MonitorInfo *r)
{
uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
@@ -16650,6 +16685,172 @@ _PUBLIC_ void ndr_print_spoolss_MonitorInfo(struct ndr_print *ndr, const char *n
}
}
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcDataTypesInfo1 *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_NULLTERM);
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name_array));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ if (r->name_array) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->name_array));
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name_array));
+ }
+ ndr->flags = _flags_save_string;
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcDataTypesInfo1 *r)
+{
+ uint32_t _ptr_name_array;
+ TALLOC_CTX *_mem_save_name_array_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_NULLTERM);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name_array));
+ if (_ptr_name_array) {
+ NDR_PULL_ALLOC(ndr, r->name_array);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name_array, _ptr_name_array));
+ } else {
+ r->name_array = NULL;
+ }
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ if (r->name_array) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name_array));
+ _mem_save_name_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->name_array, 0);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_array_0, 0);
+ ndr->offset = _relative_save_offset;
+ }
+ ndr->flags = _flags_save_string;
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrintProcDataTypesInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcDataTypesInfo1 *r)
+{
+ ndr_print_struct(ndr, name, "spoolss_PrintProcDataTypesInfo1");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "name_array", r->name_array);
+ ndr->depth++;
+ if (r->name_array) {
+ ndr_print_string(ndr, "name_array", r->name_array);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_spoolss_PrintProcDataTypesInfo1(const struct spoolss_PrintProcDataTypesInfo1 *r, struct smb_iconv_convenience *ic, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcDataTypesInfo1, ic);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcDataTypesInfo *r)
+{
+ uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 1: {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+ NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
+ switch (level) {
+ case 1:
+ NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcDataTypesInfo *r)
+{
+ uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case 1: {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+ NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
+ switch (level) {
+ case 1:
+ NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrintProcDataTypesInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcDataTypesInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "spoolss_PrintProcDataTypesInfo");
+ switch (level) {
+ case 1:
+ ndr_print_spoolss_PrintProcDataTypesInfo1(ndr, "info1", &r->info1);
+ break;
+
+ default:
+ break;
+
+ }
+}
+
static enum ndr_err_code ndr_push_spoolss_PrinterChangeFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -23320,28 +23521,198 @@ _PUBLIC_ void ndr_print_spoolss_DeletePrintProvidor(struct ndr_print *ndr, const
ndr->depth--;
}
-static enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcDataTypes *r)
+_PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrintProcDataTypes *r)
{
if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
+ if (r->in.servername) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.print_processor_name));
+ if (r->in.print_processor_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_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.print_processor_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.print_processor_name, ndr_charset_length(r->in.print_processor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
+ }
+ if (r->out.needed == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
+ if (r->out.count == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcDataTypes *r)
+_PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrintProcDataTypes *r)
{
+ uint32_t _ptr_servername;
+ uint32_t _ptr_print_processor_name;
+ uint32_t _ptr_buffer;
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_servername_0;
+ TALLOC_CTX *_mem_save_print_processor_name_0;
+ TALLOC_CTX *_mem_save_buffer_0;
+ TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_needed_0;
+ TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
+ if (_ptr_servername) {
+ NDR_PULL_ALLOC(ndr, r->in.servername);
+ } else {
+ r->in.servername = NULL;
+ }
+ if (r->in.servername) {
+ _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
+ if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
+ 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.servername), ndr_get_array_length(ndr, &r->in.servername));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor_name));
+ if (_ptr_print_processor_name) {
+ NDR_PULL_ALLOC(ndr, r->in.print_processor_name);
+ } else {
+ r->in.print_processor_name = NULL;
+ }
+ if (r->in.print_processor_name) {
+ _mem_save_print_processor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.print_processor_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.print_processor_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.print_processor_name));
+ if (ndr_get_array_length(ndr, &r->in.print_processor_name) > ndr_get_array_size(ndr, &r->in.print_processor_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.print_processor_name), ndr_get_array_length(ndr, &r->in.print_processor_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.print_processor_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.print_processor_name, ndr_get_array_length(ndr, &r->in.print_processor_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
+ if (_ptr_buffer) {
+ NDR_PULL_ALLOC(ndr, r->in.buffer);
+ } else {
+ r->in.buffer = NULL;
+ }
+ if (r->in.buffer) {
+ _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ ZERO_STRUCTP(r->out.count);
}
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_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ }
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
}
+_PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPrintProcDataTypes *r)
+{
+ uint32_t cntr_info_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
+ }
+ if (flags & NDR_OUT) {
+ for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
+ NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
+ }
+ for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
+ NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPrintProcDataTypes *r)
+{
+ uint32_t cntr_info_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
+ }
+ if (flags & NDR_OUT) {
+ NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
+ NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
+ }
+ for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
+ NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ return NDR_ERR_SUCCESS;
+}
+
_PUBLIC_ void ndr_print_spoolss_EnumPrintProcDataTypes(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrintProcDataTypes *r)
{
+ uint32_t cntr_info_2;
ndr_print_struct(ndr, name, "spoolss_EnumPrintProcDataTypes");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
@@ -23350,11 +23721,58 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrintProcDataTypes(struct ndr_print *ndr, co
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "spoolss_EnumPrintProcDataTypes");
ndr->depth++;
+ ndr_print_ptr(ndr, "servername", r->in.servername);
+ ndr->depth++;
+ if (r->in.servername) {
+ ndr_print_string(ndr, "servername", r->in.servername);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "print_processor_name", r->in.print_processor_name);
+ ndr->depth++;
+ if (r->in.print_processor_name) {
+ ndr_print_string(ndr, "print_processor_name", r->in.print_processor_name);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "buffer", r->in.buffer);
+ ndr->depth++;
+ if (r->in.buffer) {
+ ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "spoolss_EnumPrintProcDataTypes");
ndr->depth++;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", *r->out.info);
+ ndr->depth++;
+ if (*r->out.info) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
+ ndr->depth++;
+ for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
+ char *idx_2=NULL;
+ if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
+ ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
+ ndr_print_spoolss_PrintProcDataTypesInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
+ free(idx_2);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_ptr(ndr, "needed", r->out.needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
+ ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h
index e2160f142c..c45b796b60 100644
--- a/librpc/gen_ndr/ndr_spoolss.h
+++ b/librpc/gen_ndr/ndr_spoolss.h
@@ -323,7 +323,10 @@ enum ndr_err_code ndr_push_spoolss_DriverDirectoryInfo(struct ndr_push *ndr, int
enum ndr_err_code ndr_pull_spoolss_DriverDirectoryInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_DriverDirectoryInfo *r);
void ndr_print_spoolss_DriverDirectoryInfo(struct ndr_print *ndr, const char *name, const union spoolss_DriverDirectoryInfo *r);
size_t ndr_size_spoolss_DriverDirectoryInfo(const union spoolss_DriverDirectoryInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags);
+enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcessorInfo1 *r);
+enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcessorInfo1 *r);
void ndr_print_spoolss_PrintProcessorInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcessorInfo1 *r);
+size_t ndr_size_spoolss_PrintProcessorInfo1(const struct spoolss_PrintProcessorInfo1 *r, struct smb_iconv_convenience *ic, int flags);
enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcessorInfo *r);
enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcessorInfo *r);
void ndr_print_spoolss_PrintProcessorInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorInfo *r);
@@ -369,21 +372,46 @@ size_t ndr_size_spoolss_FormInfo(const union spoolss_FormInfo *r, uint32_t level
void ndr_print_spoolss_AddFormInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_AddFormInfo1 *r);
void ndr_print_spoolss_AddFormInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_AddFormInfo2 *r);
void ndr_print_spoolss_AddFormInfo(struct ndr_print *ndr, const char *name, const union spoolss_AddFormInfo *r);
+enum ndr_err_code ndr_push_spoolss_PortInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo1 *r);
+enum ndr_err_code ndr_pull_spoolss_PortInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo1 *r);
void ndr_print_spoolss_PortInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo1 *r);
+size_t ndr_size_spoolss_PortInfo1(const struct spoolss_PortInfo1 *r, struct smb_iconv_convenience *ic, int flags);
void ndr_print_spoolss_PortType(struct ndr_print *ndr, const char *name, uint32_t r);
+enum ndr_err_code ndr_push_spoolss_PortInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo2 *r);
+enum ndr_err_code ndr_pull_spoolss_PortInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo2 *r);
void ndr_print_spoolss_PortInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo2 *r);
+size_t ndr_size_spoolss_PortInfo2(const struct spoolss_PortInfo2 *r, struct smb_iconv_convenience *ic, int flags);
void ndr_print_spoolss_PortStatus(struct ndr_print *ndr, const char *name, enum spoolss_PortStatus r);
void ndr_print_spoolss_PortSeverity(struct ndr_print *ndr, const char *name, enum spoolss_PortSeverity r);
+enum ndr_err_code ndr_push_spoolss_PortInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo3 *r);
+enum ndr_err_code ndr_pull_spoolss_PortInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo3 *r);
void ndr_print_spoolss_PortInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo3 *r);
+size_t ndr_size_spoolss_PortInfo3(const struct spoolss_PortInfo3 *r, struct smb_iconv_convenience *ic, int flags);
+enum ndr_err_code ndr_push_spoolss_PortInfoFF(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfoFF *r);
+enum ndr_err_code ndr_pull_spoolss_PortInfoFF(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfoFF *r);
void ndr_print_spoolss_PortInfoFF(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfoFF *r);
+size_t ndr_size_spoolss_PortInfoFF(const struct spoolss_PortInfoFF *r, struct smb_iconv_convenience *ic, int flags);
enum ndr_err_code ndr_push_spoolss_PortInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PortInfo *r);
enum ndr_err_code ndr_pull_spoolss_PortInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PortInfo *r);
void ndr_print_spoolss_PortInfo(struct ndr_print *ndr, const char *name, const union spoolss_PortInfo *r);
+enum ndr_err_code ndr_push_spoolss_MonitorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo1 *r);
+enum ndr_err_code ndr_pull_spoolss_MonitorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo1 *r);
void ndr_print_spoolss_MonitorInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorInfo1 *r);
+size_t ndr_size_spoolss_MonitorInfo1(const struct spoolss_MonitorInfo1 *r, struct smb_iconv_convenience *ic, int flags);
+enum ndr_err_code ndr_push_spoolss_MonitorInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo2 *r);
+enum ndr_err_code ndr_pull_spoolss_MonitorInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo2 *r);
void ndr_print_spoolss_MonitorInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorInfo2 *r);
+size_t ndr_size_spoolss_MonitorInfo2(const struct spoolss_MonitorInfo2 *r, struct smb_iconv_convenience *ic, int flags);
enum ndr_err_code ndr_push_spoolss_MonitorInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_MonitorInfo *r);
enum ndr_err_code ndr_pull_spoolss_MonitorInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_MonitorInfo *r);
void ndr_print_spoolss_MonitorInfo(struct ndr_print *ndr, const char *name, const union spoolss_MonitorInfo *r);
+enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcDataTypesInfo1 *r);
+enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcDataTypesInfo1 *r);
+void ndr_print_spoolss_PrintProcDataTypesInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcDataTypesInfo1 *r);
+size_t ndr_size_spoolss_PrintProcDataTypesInfo1(const struct spoolss_PrintProcDataTypesInfo1 *r, struct smb_iconv_convenience *ic, int flags);
+enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcDataTypesInfo *r);
+enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcDataTypesInfo *r);
+void ndr_print_spoolss_PrintProcDataTypesInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcDataTypesInfo *r);
void ndr_print_spoolss_PrinterChangeFlags(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, enum spoolss_Field r);
void ndr_print_spoolss_NotifyType(struct ndr_print *ndr, const char *name, enum spoolss_NotifyType r);
@@ -547,6 +575,14 @@ void ndr_print_spoolss_DeleteMonitor(struct ndr_print *ndr, const char *name, in
void ndr_print_spoolss_DeletePrintProcessor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrintProcessor *r);
void ndr_print_spoolss_AddPrintProvidor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrintProvidor *r);
void ndr_print_spoolss_DeletePrintProvidor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrintProvidor *r);
+enum ndr_err_code ndr_push__spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrintProcDataTypes *r);
+enum ndr_err_code ndr_pull__spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrintProcDataTypes *r);
+void ndr_print__spoolss_EnumPrintProcDataTypes(struct ndr_print *ndr, const char *name, int flags, const struct _spoolss_EnumPrintProcDataTypes *r);
+enum ndr_err_code ndr_push___spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPrintProcDataTypes *r);
+enum ndr_err_code ndr_pull___spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPrintProcDataTypes *r);
+void ndr_print___spoolss_EnumPrintProcDataTypes(struct ndr_print *ndr, const char *name, int flags, const struct __spoolss_EnumPrintProcDataTypes *r);
+enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcDataTypes *r);
+enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcDataTypes *r);
void ndr_print_spoolss_EnumPrintProcDataTypes(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrintProcDataTypes *r);
void ndr_print_spoolss_ResetPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ResetPrinter *r);
void ndr_print_spoolss_GetPrinterDriver2(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterDriver2 *r);
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index 608c52b6eb..83a582efb2 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -1014,7 +1014,7 @@ union spoolss_DriverDirectoryInfo {
struct spoolss_PrintProcessorInfo1 {
const char * print_processor_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
-};
+}/* [gensize,public] */;
union spoolss_PrintProcessorInfo {
struct spoolss_PrintProcessorInfo1 info1;/* [case] */
@@ -1169,7 +1169,7 @@ union spoolss_AddFormInfo {
struct spoolss_PortInfo1 {
const char * port_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
-};
+}/* [gensize,public] */;
/* bitmap spoolss_PortType */
#define SPOOLSS_PORT_TYPE_WRITE ( 0x00000001 )
@@ -1183,7 +1183,7 @@ struct spoolss_PortInfo2 {
const char * description;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
uint32_t port_type;
uint32_t reserved;
-};
+}/* [gensize,public] */;
enum spoolss_PortStatus
#ifndef USE_UINT_ENUMS
@@ -1239,12 +1239,12 @@ struct spoolss_PortInfo3 {
enum spoolss_PortStatus status;
const char * status_string;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
enum spoolss_PortSeverity severity;
-};
+}/* [gensize,public] */;
struct spoolss_PortInfoFF {
const char * port_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
DATA_BLOB monitor_data;
-};
+}/* [gensize,public] */;
union spoolss_PortInfo {
struct spoolss_PortInfo1 info1;/* [case] */
@@ -1255,19 +1255,27 @@ union spoolss_PortInfo {
struct spoolss_MonitorInfo1 {
const char * monitor_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
-};
+}/* [gensize,public] */;
struct spoolss_MonitorInfo2 {
const char * monitor_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char * environment;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char * dll_name;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
-};
+}/* [gensize,public] */;
union spoolss_MonitorInfo {
struct spoolss_MonitorInfo1 info1;/* [case] */
struct spoolss_MonitorInfo2 info2;/* [case(2)] */
}/* [relative_base,nodiscriminant,public] */;
+struct spoolss_PrintProcDataTypesInfo1 {
+ const char * name_array;/* [relative,flag(LIBNDR_FLAG_STR_NULLTERM)] */
+}/* [gensize,public] */;
+
+union spoolss_PrintProcDataTypesInfo {
+ struct spoolss_PrintProcDataTypesInfo1 info1;/* [case] */
+}/* [relative_base,nodiscriminant,public] */;
+
/* bitmap spoolss_PrinterChangeFlags */
#define PRINTER_CHANGE_ADD_PRINTER ( 0x00000001 )
#define PRINTER_CHANGE_SET_PRINTER ( 0x00000002 )
@@ -2507,8 +2515,51 @@ struct spoolss_DeletePrintProvidor {
};
+struct _spoolss_EnumPrintProcDataTypes {
+ struct {
+ const char *servername;/* [unique,charset(UTF16)] */
+ const char *print_processor_name;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ DATA_BLOB *buffer;/* [unique] */
+ uint32_t offered;
+ } in;
+
+ struct {
+ DATA_BLOB *info;/* [unique] */
+ uint32_t *needed;/* [ref] */
+ uint32_t *count;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct __spoolss_EnumPrintProcDataTypes {
+ struct {
+ uint32_t level;
+ uint32_t count;
+ } in;
+
+ struct {
+ union spoolss_PrintProcDataTypesInfo *info;/* [switch_is(level)] */
+ } out;
+
+};
+
+
struct spoolss_EnumPrintProcDataTypes {
struct {
+ const char *servername;/* [unique,charset(UTF16)] */
+ const char *print_processor_name;/* [unique,charset(UTF16)] */
+ uint32_t level;
+ DATA_BLOB *buffer;/* [unique] */
+ uint32_t offered;
+ } in;
+
+ struct {
+ uint32_t *count;/* [ref] */
+ union spoolss_PrintProcDataTypesInfo **info;/* [ref,switch_is(level),size_is(,*count)] */
+ uint32_t *needed;/* [ref] */
WERROR result;
} out;
diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c
index 72a9f3187b..9cb930f979 100644
--- a/librpc/gen_ndr/srv_spoolss.c
+++ b/librpc/gen_ndr/srv_spoolss.c
@@ -4022,6 +4022,25 @@ static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct *p)
NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.count = talloc_zero(r, uint32_t);
+ if (r->out.count == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.info = talloc_zero(r, union spoolss_PrintProcDataTypesInfo *);
+ if (r->out.info == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _spoolss_EnumPrintProcDataTypes(p, r);
if (p->rng_fault_state) {
@@ -8067,6 +8086,22 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES: {
struct spoolss_EnumPrintProcDataTypes *r = (struct spoolss_EnumPrintProcDataTypes *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.count = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.count == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcDataTypesInfo *);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _spoolss_EnumPrintProcDataTypes(cli->pipes_struct, r);
return NT_STATUS_OK;
}
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index e1402f2afb..9765fd3969 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1140,7 +1140,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x0f */
- typedef struct {
+ typedef [public,gensize] struct {
[relative] nstring *print_processor_name;
} spoolss_PrintProcessorInfo1;
@@ -1509,7 +1509,7 @@ import "misc.idl", "security.idl", "winreg.idl";
[out,ref] uint32 *needed
);
- typedef struct {
+ typedef [public,gensize] struct {
[relative] nstring *port_name;
} spoolss_PortInfo1;
@@ -1520,7 +1520,7 @@ import "misc.idl", "security.idl", "winreg.idl";
SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008
} spoolss_PortType;
- typedef struct {
+ typedef [public,gensize] struct {
[relative] nstring *port_name;
[relative] nstring *monitor_name;
[relative] nstring *description;
@@ -1550,13 +1550,13 @@ import "misc.idl", "security.idl", "winreg.idl";
PORT_STATUS_TYPE_INFO = 0x00000003
} spoolss_PortSeverity;
- typedef struct {
+ typedef [public,gensize] struct {
spoolss_PortStatus status;
[relative] nstring *status_string;
spoolss_PortSeverity severity;
} spoolss_PortInfo3;
- typedef struct {
+ typedef [public,gensize] struct {
[relative] nstring *port_name;
DATA_BLOB monitor_data; /* relative ?? */
} spoolss_PortInfoFF;
@@ -1597,11 +1597,11 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x24 */
- typedef struct {
+ typedef [public,gensize] struct {
[relative] nstring *monitor_name;
} spoolss_MonitorInfo1;
- typedef struct {
+ typedef [public,gensize] struct {
[relative] nstring *monitor_name;
[relative] nstring *environment;
[relative] nstring *dll_name;
@@ -1714,7 +1714,40 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x33 */
- [todo] WERROR spoolss_EnumPrintProcDataTypes(
+
+ typedef [public,gensize] struct {
+ [relative] nstring *name_array;
+ } spoolss_PrintProcDataTypesInfo1;
+
+ typedef [nodiscriminant,relative_base,public] union {
+ [case(1)] spoolss_PrintProcDataTypesInfo1 info1;
+ [default];
+ } spoolss_PrintProcDataTypesInfo;
+
+ [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcDataTypes(
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *print_processor_name,
+ [in] uint32 level,
+ [in,unique] DATA_BLOB *buffer,
+ [in] uint32 offered,
+ [out,unique] DATA_BLOB *info,
+ [out,ref] uint32 *needed,
+ [out,ref] uint32 *count
+ );
+ [public,noopnum,noprint] void __spoolss_EnumPrintProcDataTypes(
+ [in] uint32 level,
+ [in] uint32 count,
+ [out,switch_is(level)] spoolss_PrintProcDataTypesInfo info[count]
+ );
+ [nopull,nopush] WERROR spoolss_EnumPrintProcDataTypes(
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *print_processor_name,
+ [in] uint32 level,
+ [in,unique] DATA_BLOB *buffer,
+ [in] uint32 offered,
+ [out,ref] uint32 *count,
+ [out,ref,switch_is(level),size_is(,*count)] spoolss_PrintProcDataTypesInfo **info,
+ [out,ref] uint32 *needed
);
/******************/
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index bcc2afaa6e..8fa018b112 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -405,6 +405,39 @@ uint32_t ndr_size_spoolss_EnumPrinterProcessors_info(TALLOC_CTX *mem_ctx, struct
}
/*
+ spoolss_EnumPrintProcessors
+*/
+enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcDataTypes *r)
+{
+ NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumPrintProcDataTypes,{
+ _r.in.servername = r->in.servername;
+ _r.in.print_processor_name = r->in.print_processor_name;
+ },{
+ _r.in.servername = r->in.servername;
+ _r.in.print_processor_name = r->in.print_processor_name;
+ });
+ return NDR_ERR_SUCCESS;
+}
+
+enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcDataTypes *r)
+{
+ NDR_SPOOLSS_PULL_ENUM(spoolss_EnumPrintProcDataTypes,{
+ r->in.servername = _r.in.servername;
+ r->in.print_processor_name = _r.in.print_processor_name;
+ },{
+ _r.in.servername = r->in.servername;
+ _r.in.print_processor_name = r->in.print_processor_name;
+ });
+ return NDR_ERR_SUCCESS;
+}
+
+uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+ uint32_t level, uint32_t count, union spoolss_PrintProcDataTypesInfo *info)
+{
+ NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPrintProcDataTypes);
+}
+
+/*
spoolss_GetPrinterData
*/
enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r)
diff --git a/librpc/ndr/ndr_spoolss_buf.h b/librpc/ndr/ndr_spoolss_buf.h
index 5ed848d7e0..352a14b731 100644
--- a/librpc/ndr/ndr_spoolss_buf.h
+++ b/librpc/ndr/ndr_spoolss_buf.h
@@ -33,7 +33,12 @@ uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, struct smb_icon
enum ndr_err_code ndr_push_spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcessors *r);
enum ndr_err_code ndr_pull_spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcessors *r);
uint32_t ndr_size_spoolss_EnumPrinterProcessors_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
- uint32_t level, uint32_t count, union spoolss_PrintProcessorInfo *info);
+ uint32_t level, uint32_t count, union spoolss_PrintProcessorInfo *info);
+enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcDataTypes *r);
+enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcDataTypes *r);
+uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience,
+ uint32_t level, uint32_t count, union spoolss_PrintProcDataTypesInfo *info);
+
enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r);
enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r);
enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterData *r);