diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-19 09:15:46 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-19 09:15:46 +0000 |
commit | 4e18040236c0f51a526383800fb1de8a65ab3175 (patch) | |
tree | 4d2a3d482d7d699db6a6bb1a74485b0719feeb75 /source4 | |
parent | de3f0b424f5c89b9c084c5b0d7af46585d1cbf0e (diff) | |
download | samba-4e18040236c0f51a526383800fb1de8a65ab3175.tar.gz samba-4e18040236c0f51a526383800fb1de8a65ab3175.tar.bz2 samba-4e18040236c0f51a526383800fb1de8a65ab3175.zip |
srvsvc IDL and test code from metze. Thanks!
(This used to be commit 54d3cb22dc0ddc46eb114aa104e0660b3a437cb2)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/Makefile.in | 8 | ||||
-rw-r--r-- | source4/librpc/idl/srvsvc.idl | 620 | ||||
-rw-r--r-- | source4/librpc/ndr/libndr.h | 1 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_srvsvc.c | 6067 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_srvsvc.h | 872 | ||||
-rw-r--r-- | source4/librpc/rpc/rpc_srvsvc.c | 858 | ||||
-rw-r--r-- | source4/torture/rpc/srvsvc.c | 296 | ||||
-rw-r--r-- | source4/torture/torture.c | 1 |
8 files changed, 8720 insertions, 3 deletions
diff --git a/source4/Makefile.in b/source4/Makefile.in index 2bfb51a044..2628447723 100644 --- a/source4/Makefile.in +++ b/source4/Makefile.in @@ -196,11 +196,12 @@ LIBCLIUTIL_OBJ = libcli/util/asn1.o \ LIBRAW_NDR_OBJ = librpc/ndr/ndr.o librpc/ndr/ndr_basic.o librpc/ndr/ndr_sec.o \ librpc/ndr/ndr_echo.o librpc/ndr/ndr_misc.o librpc/ndr/ndr_lsa.o \ librpc/ndr/ndr_dfs.o librpc/ndr/ndr_samr.o \ - librpc/ndr/ndr_spoolss.o librpc/ndr/ndr_spoolss_buf.o librpc/ndr/ndr_wkssvc.o + librpc/ndr/ndr_spoolss.o librpc/ndr/ndr_spoolss_buf.o \ + librpc/ndr/ndr_wkssvc.o librpc/ndr/ndr_srvsvc.o LIBRAW_RPC_OBJ = librpc/rpc/dcerpc.o librpc/rpc/rpc_echo.o librpc/rpc/rpc_lsa.o \ librpc/rpc/dcerpc_smb.o librpc/rpc/rpc_dfs.o librpc/rpc/rpc_spoolss.o \ - librpc/rpc/rpc_samr.o librpc/rpc/rpc_wkssvc.o + librpc/rpc/rpc_samr.o librpc/rpc/rpc_wkssvc.o librpc/rpc/rpc_srvsvc.o LIBRAW_OBJ = libcli/raw/rawfile.o libcli/raw/smb_signing.o \ libcli/raw/clisocket.o libcli/raw/clitransport.o \ @@ -436,7 +437,8 @@ SMBTORTURE_RAW_OBJ = torture/raw/qfsinfo.o torture/raw/qfileinfo.o torture/raw/s torture/raw/write.o torture/raw/lock.o torture/raw/rename.o torture/raw/seek.o SMBTORTURE_RPC_OBJ = torture/rpc/lsa.o torture/rpc/echo.o torture/rpc/dfs.o \ - torture/rpc/spoolss.o torture/rpc/samr.o torture/rpc/wkssvc.o + torture/rpc/spoolss.o torture/rpc/samr.o torture/rpc/wkssvc.o \ + torture/rpc/srvsvc.o SMBTORTURE_OBJ1 = torture/torture.o torture/torture_util.o torture/nbio.o torture/scanner.o \ torture/utable.o torture/denytest.o torture/mangle_test.o \ diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl new file mode 100644 index 0000000000..343e8edb93 --- /dev/null +++ b/source4/librpc/idl/srvsvc.idl @@ -0,0 +1,620 @@ +/* + srvsvc interface definitions +*/ + +[ uuid(4b324fc8-1670-01d3-1278-5a47bf6ee188), + version(3.0), + pointer_default(unique) +] interface srvsvc +{ + /******************/ + /* Function: 0x00 */ + NTSTATUS srvsvc_00( + ); + + /******************/ + /* Function: 0x01 */ + NTSTATUS srvsvc_01( + ); + + /******************/ + /* Function: 0x02 */ + NTSTATUS srvsvc_02( + ); + + /******************/ + /* Function: 0x03 */ + NTSTATUS srvsvc_03( + ); + + /******************/ + /* Function: 0x04 */ + NTSTATUS srvsvc_04( + ); + + /******************/ + /* Function: 0x05 */ + NTSTATUS srvsvc_05( + ); + + /******************/ + /* Function: 0x06 */ + NTSTATUS srvsvc_06( + ); + + /******************/ + /* Function: 0x07 */ + NTSTATUS srvsvc_07( + ); + + /******************/ + /* Function: 0x08 */ + + typedef struct { + uint32 conn_id; + } srvsvc_NetConn0; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetConn0 *array; + } srvsvc_NetConnCtr0; + + typedef struct { + uint32 conn_id; + uint32 conn_type; + uint32 num_open; + uint32 num_users; + uint32 conn_time; + unistr *user; + unistr *client; + } srvsvc_NetConn1; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetConn1 *array; + } srvsvc_NetConnCtr1; + + typedef struct { + } srvsvc_NetConnCtrDefault; + + typedef [nodiscriminant,public] union { + case(0) srvsvc_NetConnCtr0 *ctr0; + case(1) srvsvc_NetConnCtr1 *ctr1; + default srvsvc_NetConnCtrDefault ctrDefault; + } srvsvc_NetConnSubCtr; + + typedef struct { + uint32 level; + uint32 level2; + [switch_is(level)] srvsvc_NetConnSubCtr subctr; + } srvsvc_NetConnCtr; + + WERROR srvsvc_NetConnEnum( + [in] unistr *server_unc, + [in] unistr *path, + [in,out] srvsvc_NetConnCtr ctr, + [in] uint32 preferred_len, + [out] uint32 total, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x09 */ + + typedef struct { + uint32 fid; + } srvsvc_NetFile2; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetFile2 *array; + } srvsvc_NetFileCtr2; + + typedef struct { + uint32 fid; + uint32 permissions; + uint32 num_locks; + unistr *path; + unistr *user; + } srvsvc_NetFile3; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetFile3 *array; + } srvsvc_NetFileCtr3; + + typedef struct { + } srvsvc_NetFileCtrDefault; + + typedef [nodiscriminant,public] union { + case(2) srvsvc_NetFileCtr2 *ctr2; + case(3) srvsvc_NetFileCtr3 *ctr3; + default srvsvc_NetFileCtrDefault ctrDefault; + } srvsvc_NetFileSubCtr; + + typedef struct { + uint32 level; + uint32 level2; + [switch_is(level)] srvsvc_NetFileSubCtr subctr; + } srvsvc_NetFileCtr; + + WERROR srvsvc_NetFileEnum( + [in] unistr *server_unc, + [in] unistr *path, + [in] unistr *user, + [in,out] srvsvc_NetFileCtr ctr, + [in] uint32 preferred_len, + [out] uint32 total, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x0a */ + NTSTATUS srvsvc_0a( + ); + + /******************/ + /* Function: 0x0b */ + NTSTATUS srvsvc_NET_FILE_CLOSE( + ); + + /******************/ + /* Function: 0x0c */ + + typedef struct { + unistr *client; + } srvsvc_NetSess0; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetSess0 *array; + } srvsvc_NetSessCtr0; + + typedef struct { + unistr *client; + unistr *user; + uint32 num_open; + uint32 time; + uint32 idle_time; + uint32 user_flags; + } srvsvc_NetSess1; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetSess1 *array; + } srvsvc_NetSessCtr1; + + typedef struct { + unistr *client; + unistr *user; + uint32 num_open; + uint32 time; + uint32 idle_time; + uint32 user_flags; + unistr *client_type; + } srvsvc_NetSess2; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetSess2 *array; + } srvsvc_NetSessCtr2; + + typedef struct { + unistr *client; + unistr *user; + uint32 time; + uint32 idle_time; + } srvsvc_NetSess10; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetSess10 *array; + } srvsvc_NetSessCtr10; + + typedef struct { + unistr *client; + unistr *user; + uint32 num_open; + uint32 time; + uint32 idle_time; + uint32 user_flags; + unistr *client_type; + unistr *transport; + } srvsvc_NetSess502; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetSess502 *array; + } srvsvc_NetSessCtr502; + + typedef struct { + } srvsvc_NetSessCtrDefault; + + typedef [nodiscriminant,public] union { + case(0) srvsvc_NetSessCtr0 *ctr0; + case(1) srvsvc_NetSessCtr1 *ctr1; + case(2) srvsvc_NetSessCtr2 *ctr2; + case(10) srvsvc_NetSessCtr10 *ctr10; + case(502) srvsvc_NetSessCtr502 *ctr502; + default srvsvc_NetSessCtrDefault ctrDefault; + } srvsvc_NetSessSubCtr; + + typedef struct { + uint32 level; + uint32 level2; + [switch_is(level)] srvsvc_NetSessSubCtr subctr; + } srvsvc_NetSessCtr; + + WERROR srvsvc_NetSessEnum( + [in] unistr *server_unc, + [in] unistr *client, + [in] unistr *user, + [in,out] srvsvc_NetSessCtr ctr, + [in] uint32 preferred_len, + [out] uint32 total, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x0d */ + NTSTATUS srvsvc_0d( + ); + + /******************/ + /* Function: 0x0e */ + NTSTATUS srvsvc_NET_SHARE_ADD( + ); + + /******************/ + /* Function: 0x0f */ + + typedef struct { + unistr *name; + } srvsvc_NetShare0; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetShare0 *array; + } srvsvc_NetShareCtr0; + + typedef struct { + unistr *name; + uint32 type; + unistr *comment; + } srvsvc_NetShare1; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetShare1 *array; + } srvsvc_NetShareCtr1; + + typedef struct { + unistr *name; + uint32 type; + unistr *comment; + uint32 permissions; + uint32 max_users; + uint32 current_users; + unistr *path; + uint32 *password; + } srvsvc_NetShare2; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetShare2 *array; + } srvsvc_NetShareCtr2; + + typedef struct { + unistr *name; + uint32 type; + unistr *comment; + uint32 csc_policy; + } srvsvc_NetShare501; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetShare501 *array; + } srvsvc_NetShareCtr501; + + typedef struct { + unistr *name; + uint32 type; + unistr *comment; + uint32 permissions; + uint32 max_users; + uint32 current_users; + unistr *path; + uint32 *password; + uint32 unknown; + [subcontext] security_descriptor *sd; + } srvsvc_NetShare502; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetShare502 *array; + } srvsvc_NetShareCtr502; + + typedef struct { + } srvsvc_NetShareCtrDefault; + + typedef [nodiscriminant,public] union { + case(0) srvsvc_NetShareCtr0 *ctr0; + case(1) srvsvc_NetShareCtr1 *ctr1; + case(2) srvsvc_NetShareCtr2 *ctr2; + case(501) srvsvc_NetShareCtr501 *ctr501; + case(502) srvsvc_NetShareCtr502 *ctr502; + default srvsvc_NetShareCtrDefault ctrDefault; + } srvsvc_NetShareSubCtr; + + typedef struct { + uint32 level; + uint32 level2; + [switch_is(level)] srvsvc_NetShareSubCtr subctr; + } srvsvc_NetShareCtr; + + WERROR srvsvc_NetShareEnumAll( + [in] unistr *server_unc, + [in,out] srvsvc_NetShareCtr ctr, + [in] uint32 preferred_len, + [out] uint32 total, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x10 */ + NTSTATUS srvsvc_NET_SHARE_GET_INFO( + ); + + /******************/ + /* Function: 0x11 */ + NTSTATUS srvsvc_NET_SHARE_SET_INFO( + ); + + /******************/ + /* Function: 0x12 */ + NTSTATUS srvsvc_NET_SHARE_DEL( + ); + + /******************/ + /* Function: 0x13 */ + NTSTATUS srvsvc_NET_SHARE_DEL_STICKY( + ); + + /******************/ + /* Function: 0x14 */ + NTSTATUS srvsvc_14( + ); + + /******************/ + /* Function: 0x15 */ + NTSTATUS srvsvc_NET_SRV_GET_INFO( + ); + + /******************/ + /* Function: 0x16 */ + NTSTATUS srvsvc_NET_SRV_SET_INFO( + ); + + /******************/ + /* Function: 0x17 */ + + typedef struct { + uint32 unknown; + uint32 size; + [size_is(size)] uint8 *disk; + } srvsvc_NetDisk0; + + typedef struct { + uint32 count; + uint32 unknown1; + uint32 unknown2; + [size_is(count)] srvsvc_NetDisk0 *array; + } srvsvc_NetDiskCtr0; + + typedef struct { + uint32 dummy; + } srvsvc_NetDisk1; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetDisk1 *array; + } srvsvc_NetDiskCtr1; + + typedef struct { + uint32 dummy; + } srvsvc_NetDisk2; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetDisk2 *array; + } srvsvc_NetDiskCtr2; + + typedef struct { + uint32 dummy; + } srvsvc_NetDisk3; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetDisk3 *array; + } srvsvc_NetDiskCtr3; + + typedef struct { + } srvsvc_NetDiskCtrDefault; + + typedef [nodiscriminant,public] union { + case(0) srvsvc_NetDiskCtr0 ctr0; + case(1) srvsvc_NetDiskCtr1 ctr1; + case(2) srvsvc_NetDiskCtr2 ctr2; + case(3) srvsvc_NetDiskCtr3 ctr3; + default srvsvc_NetDiskCtrDefault ctrDefault; + } srvsvc_NetDiskSubCtr; + + typedef struct { + uint32 num1; + srvsvc_NetDiskCtr0 *ctr0; + } srvsvc_NetDiskCtr; + + WERROR srvsvc_NetDiskEnum( + [in] unistr *server_unc, + [in] uint32 level, + [in] uint32 unknown1, + [in] uint32 unknown2, + [in] uint32 preferred_len, + [out] srvsvc_NetDiskCtr ctr, + [out] uint32 total, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x18 */ + NTSTATUS srvsvc_18( + ); + + /******************/ + /* Function: 0x19 */ + NTSTATUS srvsvc_19( + ); + + /******************/ + /* Function: 0x1a */ + + typedef struct { + uint32 count; + [size_is(count)] uint8 *addr; + } srvsvc_TransportAddress; + + typedef struct { + uint32 vcs; + unistr *name; + srvsvc_TransportAddress *addr; + uint32 addr_len; + unistr *net_addr; + } srvsvc_NetTransport0; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetTransport0 *array; + } srvsvc_NetTransportCtr0; + + typedef struct { + uint32 vcs; + unistr *name; + srvsvc_TransportAddress *addr; + uint32 addr_len; + unistr *net_addr; + unistr *domain; + } srvsvc_NetTransport1; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetTransport1 *array; + } srvsvc_NetTransportCtr1; + + typedef struct { + uint32 dummy; + } srvsvc_NetTransport2; + + typedef struct { + uint32 count; + [size_is(count)] srvsvc_NetTransport2 *array; + } srvsvc_NetTransportCtr2; + + typedef struct { + } srvsvc_NetTransportCtrDefault; + + typedef [nodiscriminant,public] union { + case(0) srvsvc_NetTransportCtr0 *ctr0; + case(1) srvsvc_NetTransportCtr1 *ctr1; + case(2) srvsvc_NetTransportCtr2 *ctr2; + default srvsvc_NetTransportCtrDefault ctrDefault; + } srvsvc_NetTransportSubCtr; + + typedef struct { + uint32 level; + uint32 level2; + [switch_is(level)] srvsvc_NetTransportSubCtr subctr; + } srvsvc_NetTransportCtr; + + WERROR srvsvc_NetTransportEnum( + [in] unistr *server_unc, + [in,out] srvsvc_NetTransportCtr ctr, + [in] uint32 preferred_len, + [out] uint32 total, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x1b */ + NTSTATUS srvsvc_1b( + ); + + /******************/ + /* Function: 0x1c */ + NTSTATUS srvsvc_NET_REMOTE_TOD( + ); + + /******************/ + /* Function: 0x1d */ + NTSTATUS srvsvc_1d( + ); + + /******************/ + /* Function: 0x1e */ + NTSTATUS srvsvc_1e( + ); + + /******************/ + /* Function: 0x1f */ + NTSTATUS srvsvc_1f( + ); + + /******************/ + /* Function: 0x20 */ + NTSTATUS srvsvc_20( + ); + + /******************/ + /* Function: 0x21 */ + NTSTATUS srvsvc_NET_NAME_VALIDATE( + ); + + /******************/ + /* Function: 0x22 */ + NTSTATUS srvsvc_22( + ); + + /******************/ + /* Function: 0x23 */ + NTSTATUS srvsvc_23( + ); + + /******************/ + /* Function: 0x24 */ + WERROR srvsvc_NetShareEnum( + [in] unistr *server_unc, + [in,out] srvsvc_NetShareCtr ctr, + [in] uint32 preferred_len, + [out] uint32 total, + [in,out] uint32 *resume_handle + ); + + /******************/ + /* Function: 0x25 */ + NTSTATUS srvsvc_25( + ); + + /******************/ + /* Function: 0x26 */ + NTSTATUS srvsvc_26( + ); + + /******************/ + /* Function: 0x27 */ + NTSTATUS srvsvc_NET_FILE_QUERY_SECDESC( + ); + + /******************/ + /* Function: 0x28 */ + NTSTATUS srvsvc_NET_FILE_SET_SECDESC( + ); +} diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index 8186aa0a13..6893fb4a86 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -196,3 +196,4 @@ typedef void (*ndr_print_union_fn_t)(struct ndr_print *, const char *, uint16, v #include "librpc/ndr/ndr_spoolss_buf.h" #include "librpc/ndr/ndr_samr.h" #include "librpc/ndr/ndr_wkssvc.h" +#include "librpc/ndr/ndr_srvsvc.h" diff --git a/source4/librpc/ndr/ndr_srvsvc.c b/source4/librpc/ndr/ndr_srvsvc.c new file mode 100644 index 0000000000..facb181684 --- /dev/null +++ b/source4/librpc/ndr/ndr_srvsvc.c @@ -0,0 +1,6067 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" + +NTSTATUS ndr_push_srvsvc_00(struct ndr_push *ndr, struct srvsvc_00 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_01(struct ndr_push *ndr, struct srvsvc_01 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_02(struct ndr_push *ndr, struct srvsvc_02 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_03(struct ndr_push *ndr, struct srvsvc_03 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_04(struct ndr_push *ndr, struct srvsvc_04 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_05(struct ndr_push *ndr, struct srvsvc_05 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_06(struct ndr_push *ndr, struct srvsvc_06 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_07(struct ndr_push *ndr, struct srvsvc_07 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConn0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConn0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->conn_id)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetConn0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConn1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConn1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->conn_id)); + NDR_CHECK(ndr_push_uint32(ndr, r->conn_type)); + NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); + NDR_CHECK(ndr_push_uint32(ndr, r->num_users)); + NDR_CHECK(ndr_push_uint32(ndr, r->conn_time)); + NDR_CHECK(ndr_push_ptr(ndr, r->user)); + NDR_CHECK(ndr_push_ptr(ndr, r->client)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->user) { + NDR_CHECK(ndr_push_unistr(ndr, r->user)); + } + if (r->client) { + NDR_CHECK(ndr_push_unistr(ndr, r->client)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetConn1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConnCtrDefault(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConnCtrDefault *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 1)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConnSubCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetConnSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + switch (level) { + case 0: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); + break; + + case 1: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); + break; + + default: + NDR_CHECK(ndr_push_srvsvc_NetConnCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; + + } + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + 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: + NDR_CHECK(ndr_push_srvsvc_NetConnCtrDefault(ndr, ndr_flags, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetConnCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->level)); + NDR_CHECK(ndr_push_uint32(ndr, r->level2)); + NDR_CHECK(ndr_push_srvsvc_NetConnSubCtr(ndr, NDR_SCALARS, r->level, &r->subctr)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + NDR_CHECK(ndr_push_srvsvc_NetConnSubCtr(ndr, NDR_BUFFERS, r->level, &r->subctr)); +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, struct srvsvc_NetConnEnum *r) +{ + NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); + if (r->in.server_unc) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); + } + NDR_CHECK(ndr_push_ptr(ndr, r->in.path)); + if (r->in.path) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.path)); + } + NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ctr)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); + if (r->in.resume_handle) { + NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); + } + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFile2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFile2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->fid)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFile2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFile3(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFile3 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->fid)); + NDR_CHECK(ndr_push_uint32(ndr, r->permissions)); + NDR_CHECK(ndr_push_uint32(ndr, r->num_locks)); + NDR_CHECK(ndr_push_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_ptr(ndr, r->user)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->path) { + NDR_CHECK(ndr_push_unistr(ndr, r->path)); + } + if (r->user) { + NDR_CHECK(ndr_push_unistr(ndr, r->user)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFile3)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFileCtrDefault(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFileCtrDefault *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 1)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFileSubCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetFileSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + switch (level) { + case 2: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); + break; + + case 3: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr3)); + break; + + default: + NDR_CHECK(ndr_push_srvsvc_NetFileCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; + + } + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + 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: + NDR_CHECK(ndr_push_srvsvc_NetFileCtrDefault(ndr, ndr_flags, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetFileCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->level)); + NDR_CHECK(ndr_push_uint32(ndr, r->level2)); + NDR_CHECK(ndr_push_srvsvc_NetFileSubCtr(ndr, NDR_SCALARS, r->level, &r->subctr)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + NDR_CHECK(ndr_push_srvsvc_NetFileSubCtr(ndr, NDR_BUFFERS, r->level, &r->subctr)); +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, struct srvsvc_NetFileEnum *r) +{ + NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); + if (r->in.server_unc) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); + } + NDR_CHECK(ndr_push_ptr(ndr, r->in.path)); + if (r->in.path) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.path)); + } + NDR_CHECK(ndr_push_ptr(ndr, r->in.user)); + if (r->in.user) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.user)); + } + NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ctr)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); + if (r->in.resume_handle) { + NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); + } + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_0a(struct ndr_push *ndr, struct srvsvc_0a *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_FILE_CLOSE(struct ndr_push *ndr, struct srvsvc_NET_FILE_CLOSE *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSess0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->client)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_push_unistr(ndr, r->client)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSess1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->client)); + NDR_CHECK(ndr_push_ptr(ndr, r->user)); + NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); + NDR_CHECK(ndr_push_uint32(ndr, r->time)); + NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); + NDR_CHECK(ndr_push_uint32(ndr, r->user_flags)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_push_unistr(ndr, r->client)); + } + if (r->user) { + NDR_CHECK(ndr_push_unistr(ndr, r->user)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSess2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->client)); + NDR_CHECK(ndr_push_ptr(ndr, r->user)); + NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); + NDR_CHECK(ndr_push_uint32(ndr, r->time)); + NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); + NDR_CHECK(ndr_push_uint32(ndr, r->user_flags)); + NDR_CHECK(ndr_push_ptr(ndr, r->client_type)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_push_unistr(ndr, r->client)); + } + if (r->user) { + NDR_CHECK(ndr_push_unistr(ndr, r->user)); + } + if (r->client_type) { + NDR_CHECK(ndr_push_unistr(ndr, r->client_type)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSess10(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess10 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->client)); + NDR_CHECK(ndr_push_ptr(ndr, r->user)); + NDR_CHECK(ndr_push_uint32(ndr, r->time)); + NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_push_unistr(ndr, r->client)); + } + if (r->user) { + NDR_CHECK(ndr_push_unistr(ndr, r->user)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess10)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSess502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSess502 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->client)); + NDR_CHECK(ndr_push_ptr(ndr, r->user)); + NDR_CHECK(ndr_push_uint32(ndr, r->num_open)); + NDR_CHECK(ndr_push_uint32(ndr, r->time)); + NDR_CHECK(ndr_push_uint32(ndr, r->idle_time)); + NDR_CHECK(ndr_push_uint32(ndr, r->user_flags)); + NDR_CHECK(ndr_push_ptr(ndr, r->client_type)); + NDR_CHECK(ndr_push_ptr(ndr, r->transport)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_push_unistr(ndr, r->client)); + } + if (r->user) { + NDR_CHECK(ndr_push_unistr(ndr, r->user)); + } + if (r->client_type) { + NDR_CHECK(ndr_push_unistr(ndr, r->client_type)); + } + if (r->transport) { + NDR_CHECK(ndr_push_unistr(ndr, r->transport)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSess502)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessCtrDefault(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtrDefault *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 1)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessSubCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetSessSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + switch (level) { + case 0: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); + break; + + case 1: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); + break; + + case 10: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr10)); + break; + + case 502: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr502)); + break; + + default: + NDR_CHECK(ndr_push_srvsvc_NetSessCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; + + } + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + 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: + NDR_CHECK(ndr_push_srvsvc_NetSessCtrDefault(ndr, ndr_flags, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetSessCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->level)); + NDR_CHECK(ndr_push_uint32(ndr, r->level2)); + NDR_CHECK(ndr_push_srvsvc_NetSessSubCtr(ndr, NDR_SCALARS, r->level, &r->subctr)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + NDR_CHECK(ndr_push_srvsvc_NetSessSubCtr(ndr, NDR_BUFFERS, r->level, &r->subctr)); +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, struct srvsvc_NetSessEnum *r) +{ + NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); + if (r->in.server_unc) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); + } + NDR_CHECK(ndr_push_ptr(ndr, r->in.client)); + if (r->in.client) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.client)); + } + NDR_CHECK(ndr_push_ptr(ndr, r->in.user)); + if (r->in.user) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.user)); + } + NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ctr)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); + if (r->in.resume_handle) { + NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); + } + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_0d(struct ndr_push *ndr, struct srvsvc_0d *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_SHARE_ADD(struct ndr_push *ndr, struct srvsvc_NET_SHARE_ADD *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShare0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->name)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_push_unistr(ndr, r->name)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShare1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_uint32(ndr, r->type)); + NDR_CHECK(ndr_push_ptr(ndr, r->comment)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_push_unistr(ndr, r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_push_unistr(ndr, r->comment)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShare2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_uint32(ndr, r->type)); + NDR_CHECK(ndr_push_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_uint32(ndr, r->permissions)); + NDR_CHECK(ndr_push_uint32(ndr, r->max_users)); + NDR_CHECK(ndr_push_uint32(ndr, r->current_users)); + NDR_CHECK(ndr_push_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_ptr(ndr, r->password)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_push_unistr(ndr, r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_push_unistr(ndr, r->comment)); + } + if (r->path) { + NDR_CHECK(ndr_push_unistr(ndr, r->path)); + } + if (r->password) { + NDR_CHECK(ndr_push_uint32(ndr, *r->password)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShare501(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare501 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_uint32(ndr, r->type)); + NDR_CHECK(ndr_push_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_uint32(ndr, r->csc_policy)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_push_unistr(ndr, r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_push_unistr(ndr, r->comment)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare501)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShare502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShare502 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_uint32(ndr, r->type)); + NDR_CHECK(ndr_push_ptr(ndr, r->comment)); + NDR_CHECK(ndr_push_uint32(ndr, r->permissions)); + NDR_CHECK(ndr_push_uint32(ndr, r->max_users)); + NDR_CHECK(ndr_push_uint32(ndr, r->current_users)); + NDR_CHECK(ndr_push_ptr(ndr, r->path)); + NDR_CHECK(ndr_push_ptr(ndr, r->password)); + NDR_CHECK(ndr_push_uint32(ndr, r->unknown)); + NDR_CHECK(ndr_push_ptr(ndr, r->sd)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_push_unistr(ndr, r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_push_unistr(ndr, r->comment)); + } + if (r->path) { + NDR_CHECK(ndr_push_unistr(ndr, r->path)); + } + if (r->password) { + NDR_CHECK(ndr_push_uint32(ndr, *r->password)); + } + if (r->sd) { + NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sd)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShare502)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareCtrDefault(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtrDefault *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 1)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareSubCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetShareSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + switch (level) { + case 0: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); + break; + + case 1: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); + break; + + case 501: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr501)); + break; + + case 502: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr502)); + break; + + default: + NDR_CHECK(ndr_push_srvsvc_NetShareCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; + + } + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + 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; + + default: + NDR_CHECK(ndr_push_srvsvc_NetShareCtrDefault(ndr, ndr_flags, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetShareCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->level)); + NDR_CHECK(ndr_push_uint32(ndr, r->level2)); + NDR_CHECK(ndr_push_srvsvc_NetShareSubCtr(ndr, NDR_SCALARS, r->level, &r->subctr)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + NDR_CHECK(ndr_push_srvsvc_NetShareSubCtr(ndr, NDR_BUFFERS, r->level, &r->subctr)); +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, struct srvsvc_NetShareEnumAll *r) +{ + NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); + if (r->in.server_unc) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); + } + NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ctr)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); + if (r->in.resume_handle) { + NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); + } + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_SHARE_GET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SHARE_GET_INFO *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_SHARE_SET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SHARE_SET_INFO *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_SHARE_DEL(struct ndr_push *ndr, struct srvsvc_NET_SHARE_DEL *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_SHARE_DEL_STICKY(struct ndr_push *ndr, struct srvsvc_NET_SHARE_DEL_STICKY *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_14(struct ndr_push *ndr, struct srvsvc_14 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_SRV_GET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SRV_GET_INFO *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_SRV_SET_INFO(struct ndr_push *ndr, struct srvsvc_NET_SRV_SET_INFO *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDisk0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDisk0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->unknown)); + NDR_CHECK(ndr_push_uint32(ndr, r->size)); + NDR_CHECK(ndr_push_ptr(ndr, r->disk)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->disk) { + NDR_CHECK(ndr_push_uint32(ndr, r->size)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->disk, r->size)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDiskCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDiskCtr0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_uint32(ndr, r->unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, r->unknown2)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetDisk0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDisk1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDisk1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->dummy)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDiskCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDiskCtr1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetDisk1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDisk2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDisk2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->dummy)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDiskCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDiskCtr2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetDisk2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDisk3(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDisk3 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->dummy)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDiskCtr3(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDiskCtr3 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetDisk3)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDiskCtrDefault(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetDiskCtrDefault *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 1)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDiskSubCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetDiskSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + switch (level) { + case 0: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr0(ndr, NDR_SCALARS, &r->ctr0)); + break; + + case 1: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr1(ndr, NDR_SCALARS, &r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr2(ndr, NDR_SCALARS, &r->ctr2)); + break; + + case 3: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr3(ndr, NDR_SCALARS, &r->ctr3)); + break; + + default: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; + + } + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + switch (level) { + case 0: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr0(ndr, ndr_flags, &r->ctr0)); + break; + + case 1: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr1(ndr, ndr_flags, &r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr2(ndr, ndr_flags, &r->ctr2)); + break; + + case 3: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtr3(ndr, ndr_flags, &r->ctr3)); + break; + + default: + NDR_CHECK(ndr_push_srvsvc_NetDiskCtrDefault(ndr, ndr_flags, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, struct srvsvc_NetDiskEnum *r) +{ + NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); + if (r->in.server_unc) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); + } + NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.unknown2)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); + if (r->in.resume_handle) { + NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); + } + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_18(struct ndr_push *ndr, struct srvsvc_18 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_19(struct ndr_push *ndr, struct srvsvc_19 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_TransportAddress(struct ndr_push *ndr, int ndr_flags, struct srvsvc_TransportAddress *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->addr)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->addr) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr, r->count)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransport0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransport0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->vcs)); + NDR_CHECK(ndr_push_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_ptr(ndr, r->addr)); + NDR_CHECK(ndr_push_uint32(ndr, r->addr_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->net_addr)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_push_unistr(ndr, r->name)); + } + if (r->addr) { + NDR_CHECK(ndr_push_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); + } + if (r->net_addr) { + NDR_CHECK(ndr_push_unistr(ndr, r->net_addr)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransport0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransport1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransport1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->vcs)); + NDR_CHECK(ndr_push_ptr(ndr, r->name)); + NDR_CHECK(ndr_push_ptr(ndr, r->addr)); + NDR_CHECK(ndr_push_uint32(ndr, r->addr_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->net_addr)); + NDR_CHECK(ndr_push_ptr(ndr, r->domain)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_push_unistr(ndr, r->name)); + } + if (r->addr) { + NDR_CHECK(ndr_push_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); + } + if (r->net_addr) { + NDR_CHECK(ndr_push_unistr(ndr, r->net_addr)); + } + if (r->domain) { + NDR_CHECK(ndr_push_unistr(ndr, r->domain)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransport1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransport2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransport2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->dummy)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_ptr(ndr, r->array)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, r->count)); + NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->array, sizeof(r->array[0]), r->count, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransport2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransportCtrDefault(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtrDefault *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 1)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransportSubCtr(struct ndr_push *ndr, int ndr_flags, uint16 level, union srvsvc_NetTransportSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + switch (level) { + case 0: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr0)); + break; + + case 1: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_push_ptr(ndr, r->ctr2)); + break; + + default: + NDR_CHECK(ndr_push_srvsvc_NetTransportCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; + + } + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + 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; + + default: + NDR_CHECK(ndr_push_srvsvc_NetTransportCtrDefault(ndr, ndr_flags, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, struct srvsvc_NetTransportCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_push_struct_start(ndr)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, r->level)); + NDR_CHECK(ndr_push_uint32(ndr, r->level2)); + NDR_CHECK(ndr_push_srvsvc_NetTransportSubCtr(ndr, NDR_SCALARS, r->level, &r->subctr)); + ndr_push_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + NDR_CHECK(ndr_push_srvsvc_NetTransportSubCtr(ndr, NDR_BUFFERS, r->level, &r->subctr)); +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, struct srvsvc_NetTransportEnum *r) +{ + NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); + if (r->in.server_unc) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); + } + NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ctr)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); + if (r->in.resume_handle) { + NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); + } + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_1b(struct ndr_push *ndr, struct srvsvc_1b *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_REMOTE_TOD(struct ndr_push *ndr, struct srvsvc_NET_REMOTE_TOD *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_1d(struct ndr_push *ndr, struct srvsvc_1d *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_1e(struct ndr_push *ndr, struct srvsvc_1e *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_1f(struct ndr_push *ndr, struct srvsvc_1f *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_20(struct ndr_push *ndr, struct srvsvc_20 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_NAME_VALIDATE(struct ndr_push *ndr, struct srvsvc_NET_NAME_VALIDATE *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_22(struct ndr_push *ndr, struct srvsvc_22 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_23(struct ndr_push *ndr, struct srvsvc_23 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, struct srvsvc_NetShareEnum *r) +{ + NDR_CHECK(ndr_push_ptr(ndr, r->in.server_unc)); + if (r->in.server_unc) { + NDR_CHECK(ndr_push_unistr(ndr, r->in.server_unc)); + } + NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.ctr)); + NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_len)); + NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle)); + if (r->in.resume_handle) { + NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); + } + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_25(struct ndr_push *ndr, struct srvsvc_25 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_26(struct ndr_push *ndr, struct srvsvc_26 *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_FILE_QUERY_SECDESC(struct ndr_push *ndr, struct srvsvc_NET_FILE_QUERY_SECDESC *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_push_srvsvc_NET_FILE_SET_SECDESC(struct ndr_push *ndr, struct srvsvc_NET_FILE_SET_SECDESC *r) +{ + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_00(struct ndr_pull *ndr, struct srvsvc_00 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_01(struct ndr_pull *ndr, struct srvsvc_01 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_02(struct ndr_pull *ndr, struct srvsvc_02 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_03(struct ndr_pull *ndr, struct srvsvc_03 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_04(struct ndr_pull *ndr, struct srvsvc_04 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_05(struct ndr_pull *ndr, struct srvsvc_05 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_06(struct ndr_pull *ndr, struct srvsvc_06 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_07(struct ndr_pull *ndr, struct srvsvc_07 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConn0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConn0 *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_id)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetConn0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConn1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConn1 *r) +{ + uint32 _ptr_user; + uint32 _ptr_client; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_id)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_type)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->conn_time)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); + if (_ptr_user) { + NDR_ALLOC(ndr, r->user); + } else { + r->user = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); + if (_ptr_client) { + NDR_ALLOC(ndr, r->client); + } else { + r->client = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->user) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); + } + if (r->client) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetConn1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConnCtrDefault(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtrDefault *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 1)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConnSubCtr(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union srvsvc_NetConnSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_struct_start(ndr)); + switch (*level) { + case 0: { + uint32 _ptr_ctr0; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); + if (_ptr_ctr0) { + NDR_ALLOC(ndr, r->ctr0); + } else { + r->ctr0 = NULL; + } + break; } + + case 1: { + uint32 _ptr_ctr1; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); + if (_ptr_ctr1) { + NDR_ALLOC(ndr, r->ctr1); + } else { + r->ctr1 = NULL; + } + break; } + + default: { + NDR_CHECK(ndr_pull_srvsvc_NetConnCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; } + + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + switch (*level) { + case 0: + if (r->ctr0) { + NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); + } + break; + + case 1: + if (r->ctr1) { + NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); + } + break; + + default: + NDR_CHECK(ndr_pull_srvsvc_NetConnCtrDefault(ndr, NDR_BUFFERS, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level2)); + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetConnSubCtr(ndr, NDR_SCALARS, &_level, &r->subctr)); + if (((NDR_SCALARS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetConnSubCtr(ndr, NDR_BUFFERS, &_level, &r->subctr)); + if (((NDR_BUFFERS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, struct srvsvc_NetConnEnum *r) +{ + uint32 _ptr_resume_handle; + NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); + if (_ptr_resume_handle) { + NDR_ALLOC(ndr, r->out.resume_handle); + } else { + r->out.resume_handle = NULL; + } + if (r->out.resume_handle) { + NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); + } + NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFile2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFile2 *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->fid)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFile2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFile3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFile3 *r) +{ + uint32 _ptr_path; + uint32 _ptr_user; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->fid)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->permissions)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->num_locks)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); + if (_ptr_user) { + NDR_ALLOC(ndr, r->user); + } else { + r->user = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->path) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); + } + if (r->user) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFile3)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFileCtrDefault(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtrDefault *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 1)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFileSubCtr(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union srvsvc_NetFileSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_struct_start(ndr)); + switch (*level) { + case 2: { + uint32 _ptr_ctr2; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); + if (_ptr_ctr2) { + NDR_ALLOC(ndr, r->ctr2); + } else { + r->ctr2 = NULL; + } + break; } + + case 3: { + uint32 _ptr_ctr3; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr3)); + if (_ptr_ctr3) { + NDR_ALLOC(ndr, r->ctr3); + } else { + r->ctr3 = NULL; + } + break; } + + default: { + NDR_CHECK(ndr_pull_srvsvc_NetFileCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; } + + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + switch (*level) { + case 2: + if (r->ctr2) { + NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); + } + break; + + case 3: + if (r->ctr3) { + NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3)); + } + break; + + default: + NDR_CHECK(ndr_pull_srvsvc_NetFileCtrDefault(ndr, NDR_BUFFERS, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level2)); + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetFileSubCtr(ndr, NDR_SCALARS, &_level, &r->subctr)); + if (((NDR_SCALARS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetFileSubCtr(ndr, NDR_BUFFERS, &_level, &r->subctr)); + if (((NDR_BUFFERS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, struct srvsvc_NetFileEnum *r) +{ + uint32 _ptr_resume_handle; + NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); + if (_ptr_resume_handle) { + NDR_ALLOC(ndr, r->out.resume_handle); + } else { + r->out.resume_handle = NULL; + } + if (r->out.resume_handle) { + NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); + } + NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_0a(struct ndr_pull *ndr, struct srvsvc_0a *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_FILE_CLOSE(struct ndr_pull *ndr, struct srvsvc_NET_FILE_CLOSE *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSess0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess0 *r) +{ + uint32 _ptr_client; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); + if (_ptr_client) { + NDR_ALLOC(ndr, r->client); + } else { + r->client = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSess1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess1 *r) +{ + uint32 _ptr_client; + uint32 _ptr_user; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); + if (_ptr_client) { + NDR_ALLOC(ndr, r->client); + } else { + r->client = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); + if (_ptr_user) { + NDR_ALLOC(ndr, r->user); + } else { + r->user = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->user_flags)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); + } + if (r->user) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSess2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess2 *r) +{ + uint32 _ptr_client; + uint32 _ptr_user; + uint32 _ptr_client_type; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); + if (_ptr_client) { + NDR_ALLOC(ndr, r->client); + } else { + r->client = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); + if (_ptr_user) { + NDR_ALLOC(ndr, r->user); + } else { + r->user = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->user_flags)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client_type)); + if (_ptr_client_type) { + NDR_ALLOC(ndr, r->client_type); + } else { + r->client_type = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); + } + if (r->user) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); + } + if (r->client_type) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client_type)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSess10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess10 *r) +{ + uint32 _ptr_client; + uint32 _ptr_user; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); + if (_ptr_client) { + NDR_ALLOC(ndr, r->client); + } else { + r->client = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); + if (_ptr_user) { + NDR_ALLOC(ndr, r->user); + } else { + r->user = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); + } + if (r->user) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess10)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSess502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSess502 *r) +{ + uint32 _ptr_client; + uint32 _ptr_user; + uint32 _ptr_client_type; + uint32 _ptr_transport; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client)); + if (_ptr_client) { + NDR_ALLOC(ndr, r->client); + } else { + r->client = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_user)); + if (_ptr_user) { + NDR_ALLOC(ndr, r->user); + } else { + r->user = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->num_open)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->time)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->idle_time)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->user_flags)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_client_type)); + if (_ptr_client_type) { + NDR_ALLOC(ndr, r->client_type); + } else { + r->client_type = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_transport)); + if (_ptr_transport) { + NDR_ALLOC(ndr, r->transport); + } else { + r->transport = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->client) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client)); + } + if (r->user) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->user)); + } + if (r->client_type) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->client_type)); + } + if (r->transport) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->transport)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSess502)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessCtrDefault(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtrDefault *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 1)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessSubCtr(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union srvsvc_NetSessSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_struct_start(ndr)); + switch (*level) { + case 0: { + uint32 _ptr_ctr0; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); + if (_ptr_ctr0) { + NDR_ALLOC(ndr, r->ctr0); + } else { + r->ctr0 = NULL; + } + break; } + + case 1: { + uint32 _ptr_ctr1; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); + if (_ptr_ctr1) { + NDR_ALLOC(ndr, r->ctr1); + } else { + r->ctr1 = NULL; + } + break; } + + case 2: { + uint32 _ptr_ctr2; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); + if (_ptr_ctr2) { + NDR_ALLOC(ndr, r->ctr2); + } else { + r->ctr2 = NULL; + } + break; } + + case 10: { + uint32 _ptr_ctr10; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr10)); + if (_ptr_ctr10) { + NDR_ALLOC(ndr, r->ctr10); + } else { + r->ctr10 = NULL; + } + break; } + + case 502: { + uint32 _ptr_ctr502; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr502)); + if (_ptr_ctr502) { + NDR_ALLOC(ndr, r->ctr502); + } else { + r->ctr502 = NULL; + } + break; } + + default: { + NDR_CHECK(ndr_pull_srvsvc_NetSessCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; } + + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + switch (*level) { + case 0: + if (r->ctr0) { + NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); + } + break; + + case 1: + if (r->ctr1) { + NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); + } + break; + + case 2: + if (r->ctr2) { + NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); + } + break; + + case 10: + if (r->ctr10) { + NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10)); + } + break; + + case 502: + if (r->ctr502) { + NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502)); + } + break; + + default: + NDR_CHECK(ndr_pull_srvsvc_NetSessCtrDefault(ndr, NDR_BUFFERS, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level2)); + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetSessSubCtr(ndr, NDR_SCALARS, &_level, &r->subctr)); + if (((NDR_SCALARS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetSessSubCtr(ndr, NDR_BUFFERS, &_level, &r->subctr)); + if (((NDR_BUFFERS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, struct srvsvc_NetSessEnum *r) +{ + uint32 _ptr_resume_handle; + NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); + if (_ptr_resume_handle) { + NDR_ALLOC(ndr, r->out.resume_handle); + } else { + r->out.resume_handle = NULL; + } + if (r->out.resume_handle) { + NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); + } + NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_0d(struct ndr_pull *ndr, struct srvsvc_0d *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_SHARE_ADD(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_ADD *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShare0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare0 *r) +{ + uint32 _ptr_name; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_ALLOC(ndr, r->name); + } else { + r->name = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShare1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare1 *r) +{ + uint32 _ptr_name; + uint32 _ptr_comment; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_ALLOC(ndr, r->name); + } else { + r->name = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShare2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare2 *r) +{ + uint32 _ptr_name; + uint32 _ptr_comment; + uint32 _ptr_path; + uint32 _ptr_password; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_ALLOC(ndr, r->name); + } else { + r->name = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->permissions)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->max_users)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->current_users)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_password)); + if (_ptr_password) { + NDR_ALLOC(ndr, r->password); + } else { + r->password = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); + } + if (r->path) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); + } + if (r->password) { + NDR_CHECK(ndr_pull_uint32(ndr, r->password)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShare501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare501 *r) +{ + uint32 _ptr_name; + uint32 _ptr_comment; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_ALLOC(ndr, r->name); + } else { + r->name = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->csc_policy)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare501)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShare502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShare502 *r) +{ + uint32 _ptr_name; + uint32 _ptr_comment; + uint32 _ptr_path; + uint32 _ptr_password; + uint32 _ptr_sd; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_ALLOC(ndr, r->name); + } else { + r->name = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->type)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_comment)); + if (_ptr_comment) { + NDR_ALLOC(ndr, r->comment); + } else { + r->comment = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->permissions)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->max_users)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->current_users)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_path)); + if (_ptr_path) { + NDR_ALLOC(ndr, r->path); + } else { + r->path = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_password)); + if (_ptr_password) { + NDR_ALLOC(ndr, r->password); + } else { + r->password = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sd)); + if (_ptr_sd) { + NDR_ALLOC(ndr, r->sd); + } else { + r->sd = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); + } + if (r->comment) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->comment)); + } + if (r->path) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->path)); + } + if (r->password) { + NDR_CHECK(ndr_pull_uint32(ndr, r->password)); + } + if (r->sd) { + NDR_CHECK(ndr_pull_subcontext_flags_fn(ndr, r->sd, (ndr_pull_flags_fn_t) ndr_pull_security_descriptor)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShare502)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareCtrDefault(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtrDefault *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 1)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareSubCtr(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union srvsvc_NetShareSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_struct_start(ndr)); + switch (*level) { + case 0: { + uint32 _ptr_ctr0; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); + if (_ptr_ctr0) { + NDR_ALLOC(ndr, r->ctr0); + } else { + r->ctr0 = NULL; + } + break; } + + case 1: { + uint32 _ptr_ctr1; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); + if (_ptr_ctr1) { + NDR_ALLOC(ndr, r->ctr1); + } else { + r->ctr1 = NULL; + } + break; } + + case 2: { + uint32 _ptr_ctr2; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); + if (_ptr_ctr2) { + NDR_ALLOC(ndr, r->ctr2); + } else { + r->ctr2 = NULL; + } + break; } + + case 501: { + uint32 _ptr_ctr501; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr501)); + if (_ptr_ctr501) { + NDR_ALLOC(ndr, r->ctr501); + } else { + r->ctr501 = NULL; + } + break; } + + case 502: { + uint32 _ptr_ctr502; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr502)); + if (_ptr_ctr502) { + NDR_ALLOC(ndr, r->ctr502); + } else { + r->ctr502 = NULL; + } + break; } + + default: { + NDR_CHECK(ndr_pull_srvsvc_NetShareCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; } + + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + switch (*level) { + case 0: + if (r->ctr0) { + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); + } + break; + + case 1: + if (r->ctr1) { + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); + } + break; + + case 2: + if (r->ctr2) { + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); + } + break; + + case 501: + if (r->ctr501) { + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501)); + } + break; + + case 502: + if (r->ctr502) { + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502)); + } + break; + + default: + NDR_CHECK(ndr_pull_srvsvc_NetShareCtrDefault(ndr, NDR_BUFFERS, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level2)); + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetShareSubCtr(ndr, NDR_SCALARS, &_level, &r->subctr)); + if (((NDR_SCALARS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetShareSubCtr(ndr, NDR_BUFFERS, &_level, &r->subctr)); + if (((NDR_BUFFERS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, struct srvsvc_NetShareEnumAll *r) +{ + uint32 _ptr_resume_handle; + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); + if (_ptr_resume_handle) { + NDR_ALLOC(ndr, r->out.resume_handle); + } else { + r->out.resume_handle = NULL; + } + if (r->out.resume_handle) { + NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); + } + NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_SHARE_GET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_GET_INFO *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_SHARE_SET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_SET_INFO *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_SHARE_DEL(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_DEL *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_SHARE_DEL_STICKY(struct ndr_pull *ndr, struct srvsvc_NET_SHARE_DEL_STICKY *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_14(struct ndr_pull *ndr, struct srvsvc_14 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_SRV_GET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SRV_GET_INFO *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_SRV_SET_INFO(struct ndr_pull *ndr, struct srvsvc_NET_SRV_SET_INFO *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDisk0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDisk0 *r) +{ + uint32 _ptr_disk; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->size)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_disk)); + if (_ptr_disk) { + NDR_ALLOC(ndr, r->disk); + } else { + r->disk = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->disk) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->size > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->size); + } + } + NDR_ALLOC_N_SIZE(ndr, r->disk, r->size, sizeof(r->disk[0])); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->disk, r->size)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtr0 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetDisk0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDisk1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDisk1 *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->dummy)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtr1 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetDisk1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDisk2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDisk2 *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->dummy)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtr2 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetDisk2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDisk3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDisk3 *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->dummy)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtr3 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetDisk3)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskCtrDefault(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtrDefault *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 1)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskSubCtr(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union srvsvc_NetDiskSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_struct_start(ndr)); + switch (*level) { + case 0: { + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr0(ndr, NDR_SCALARS, &r->ctr0)); + break; } + + case 1: { + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr1(ndr, NDR_SCALARS, &r->ctr1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr2(ndr, NDR_SCALARS, &r->ctr2)); + break; } + + case 3: { + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr3(ndr, NDR_SCALARS, &r->ctr3)); + break; } + + default: { + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; } + + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + switch (*level) { + case 0: + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr0(ndr, NDR_BUFFERS, &r->ctr0)); + break; + + case 1: + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr1(ndr, NDR_BUFFERS, &r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr2(ndr, NDR_BUFFERS, &r->ctr2)); + break; + + case 3: + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr3(ndr, NDR_BUFFERS, &r->ctr3)); + break; + + default: + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtrDefault(ndr, NDR_BUFFERS, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskCtr *r) +{ + uint32 _ptr_ctr0; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->num1)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); + if (_ptr_ctr0) { + NDR_ALLOC(ndr, r->ctr0); + } else { + r->ctr0 = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->ctr0) { + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, struct srvsvc_NetDiskEnum *r) +{ + uint32 _ptr_resume_handle; + NDR_CHECK(ndr_pull_srvsvc_NetDiskCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); + if (_ptr_resume_handle) { + NDR_ALLOC(ndr, r->out.resume_handle); + } else { + r->out.resume_handle = NULL; + } + if (r->out.resume_handle) { + NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); + } + NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_18(struct ndr_pull *ndr, struct srvsvc_18 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_19(struct ndr_pull *ndr, struct srvsvc_19 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_TransportAddress(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_TransportAddress *r) +{ + uint32 _ptr_addr; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_addr)); + if (_ptr_addr) { + NDR_ALLOC(ndr, r->addr); + } else { + r->addr = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->addr) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->addr, r->count, sizeof(r->addr[0])); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr, r->count)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransport0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransport0 *r) +{ + uint32 _ptr_name; + uint32 _ptr_addr; + uint32 _ptr_net_addr; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->vcs)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_ALLOC(ndr, r->name); + } else { + r->name = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_addr)); + if (_ptr_addr) { + NDR_ALLOC(ndr, r->addr); + } else { + r->addr = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->addr_len)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_net_addr)); + if (_ptr_net_addr) { + NDR_ALLOC(ndr, r->net_addr); + } else { + r->net_addr = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); + } + if (r->addr) { + NDR_CHECK(ndr_pull_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); + } + if (r->net_addr) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->net_addr)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransport0)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransport1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransport1 *r) +{ + uint32 _ptr_name; + uint32 _ptr_addr; + uint32 _ptr_net_addr; + uint32 _ptr_domain; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->vcs)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_ALLOC(ndr, r->name); + } else { + r->name = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_addr)); + if (_ptr_addr) { + NDR_ALLOC(ndr, r->addr); + } else { + r->addr = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &r->addr_len)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_net_addr)); + if (_ptr_net_addr) { + NDR_ALLOC(ndr, r->net_addr); + } else { + r->net_addr = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_domain)); + if (_ptr_domain) { + NDR_ALLOC(ndr, r->domain); + } else { + r->domain = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->name) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->name)); + } + if (r->addr) { + NDR_CHECK(ndr_pull_srvsvc_TransportAddress(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr)); + } + if (r->net_addr) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->net_addr)); + } + if (r->domain) { + NDR_CHECK(ndr_pull_unistr(ndr, &r->domain)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransport1)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransport2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransport2 *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->dummy)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r) +{ + uint32 _ptr_array; + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + if (r->array) { + { + uint32 _array_size; + NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); + if (r->count > _array_size) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); + } + } + NDR_ALLOC_N_SIZE(ndr, r->array, r->count, sizeof(r->array[0])); + NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->array, sizeof(r->array[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransport2)); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransportCtrDefault(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtrDefault *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 1)); + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransportSubCtr(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union srvsvc_NetTransportSubCtr *r) +{ + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_struct_start(ndr)); + switch (*level) { + case 0: { + uint32 _ptr_ctr0; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr0)); + if (_ptr_ctr0) { + NDR_ALLOC(ndr, r->ctr0); + } else { + r->ctr0 = NULL; + } + break; } + + case 1: { + uint32 _ptr_ctr1; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr1)); + if (_ptr_ctr1) { + NDR_ALLOC(ndr, r->ctr1); + } else { + r->ctr1 = NULL; + } + break; } + + case 2: { + uint32 _ptr_ctr2; + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_ctr2)); + if (_ptr_ctr2) { + NDR_ALLOC(ndr, r->ctr2); + } else { + r->ctr2 = NULL; + } + break; } + + default: { + NDR_CHECK(ndr_pull_srvsvc_NetTransportCtrDefault(ndr, NDR_SCALARS, &r->ctrDefault)); + break; } + + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + switch (*level) { + case 0: + if (r->ctr0) { + NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0)); + } + break; + + case 1: + if (r->ctr1) { + NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); + } + break; + + case 2: + if (r->ctr2) { + NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2)); + } + break; + + default: + NDR_CHECK(ndr_pull_srvsvc_NetTransportCtrDefault(ndr, NDR_BUFFERS, &r->ctrDefault)); + break; + + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr *r) +{ + NDR_CHECK(ndr_pull_struct_start(ndr)); + if (!(ndr_flags & NDR_SCALARS)) goto buffers; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->level2)); + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetTransportSubCtr(ndr, NDR_SCALARS, &_level, &r->subctr)); + if (((NDR_SCALARS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } + ndr_pull_struct_end(ndr); +buffers: + if (!(ndr_flags & NDR_BUFFERS)) goto done; + { uint16 _level = r->level; + NDR_CHECK(ndr_pull_srvsvc_NetTransportSubCtr(ndr, NDR_BUFFERS, &_level, &r->subctr)); + if (((NDR_BUFFERS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in subctr"); + } +done: + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, struct srvsvc_NetTransportEnum *r) +{ + uint32 _ptr_resume_handle; + NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); + if (_ptr_resume_handle) { + NDR_ALLOC(ndr, r->out.resume_handle); + } else { + r->out.resume_handle = NULL; + } + if (r->out.resume_handle) { + NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); + } + NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_1b(struct ndr_pull *ndr, struct srvsvc_1b *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_REMOTE_TOD(struct ndr_pull *ndr, struct srvsvc_NET_REMOTE_TOD *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_1d(struct ndr_pull *ndr, struct srvsvc_1d *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_1e(struct ndr_pull *ndr, struct srvsvc_1e *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_1f(struct ndr_pull *ndr, struct srvsvc_1f *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_20(struct ndr_pull *ndr, struct srvsvc_20 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_NAME_VALIDATE(struct ndr_pull *ndr, struct srvsvc_NET_NAME_VALIDATE *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_22(struct ndr_pull *ndr, struct srvsvc_22 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_23(struct ndr_pull *ndr, struct srvsvc_23 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, struct srvsvc_NetShareEnum *r) +{ + uint32 _ptr_resume_handle; + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.ctr)); + NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total)); + NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle)); + if (_ptr_resume_handle) { + NDR_ALLOC(ndr, r->out.resume_handle); + } else { + r->out.resume_handle = NULL; + } + if (r->out.resume_handle) { + NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); + } + NDR_CHECK(ndr_pull_WERROR(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_25(struct ndr_pull *ndr, struct srvsvc_25 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_26(struct ndr_pull *ndr, struct srvsvc_26 *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_FILE_QUERY_SECDESC(struct ndr_pull *ndr, struct srvsvc_NET_FILE_QUERY_SECDESC *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_srvsvc_NET_FILE_SET_SECDESC(struct ndr_pull *ndr, struct srvsvc_NET_FILE_SET_SECDESC *r) +{ + NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); + + return NT_STATUS_OK; +} + +void ndr_print_srvsvc_00(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_00 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_00"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_00"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_00"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_01(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_01 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_01"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_01"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_01"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_02(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_02 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_02"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_02"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_02"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_03(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_03 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_03"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_03"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_03"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_04(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_04 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_04"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_04"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_04"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_05(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_05 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_05"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_05"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_05"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_06(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_06 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_06"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_06"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_06"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_07(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_07 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_07"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_07"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_07"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NetConn0(struct ndr_print *ndr, const char *name, struct srvsvc_NetConn0 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetConn0"); + ndr->depth++; + ndr_print_uint32(ndr, "conn_id", r->conn_id); + ndr->depth--; +} + +void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetConnCtr0 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetConn0); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetConn1(struct ndr_print *ndr, const char *name, struct srvsvc_NetConn1 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetConn1"); + 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_unistr(ndr, "user", r->user); + } + ndr->depth--; + ndr_print_ptr(ndr, "client", r->client); + ndr->depth++; + if (r->client) { + ndr_print_unistr(ndr, "client", r->client); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetConnCtr1 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetConn1); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetConnCtrDefault(struct ndr_print *ndr, const char *name, struct srvsvc_NetConnCtrDefault *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetConnCtrDefault"); + ndr->depth++; + ndr->depth--; +} + +void ndr_print_srvsvc_NetConnSubCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetConnSubCtr *r) +{ + ndr_print_union(ndr, name, level, "srvsvc_NetConnSubCtr"); + 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: + ndr_print_srvsvc_NetConnCtrDefault(ndr, "ctrDefault", &r->ctrDefault); + break; + + } +} + +void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, struct srvsvc_NetConnCtr *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetConnCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->level); + ndr_print_uint32(ndr, "level2", r->level2); + ndr_print_srvsvc_NetConnSubCtr(ndr, "subctr", r->level, &r->subctr); + ndr->depth--; +} + +void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetConnEnum *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetConnEnum"); + ndr->depth++; + 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_unistr(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_unistr(ndr, "path", r->in.path); + } + ndr->depth--; + ndr_print_srvsvc_NetConnCtr(ndr, "ctr", &r->in.ctr); + ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); + 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_srvsvc_NetConnCtr(ndr, "ctr", &r->out.ctr); + ndr_print_uint32(ndr, "total", r->out.total); + 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--; +} + +void ndr_print_srvsvc_NetFile2(struct ndr_print *ndr, const char *name, struct srvsvc_NetFile2 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetFile2"); + ndr->depth++; + ndr_print_uint32(ndr, "fid", r->fid); + ndr->depth--; +} + +void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetFileCtr2 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetFile2); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetFile3(struct ndr_print *ndr, const char *name, struct srvsvc_NetFile3 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetFile3"); + 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_unistr(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "user", r->user); + ndr->depth++; + if (r->user) { + ndr_print_unistr(ndr, "user", r->user); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, struct srvsvc_NetFileCtr3 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetFile3); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetFileCtrDefault(struct ndr_print *ndr, const char *name, struct srvsvc_NetFileCtrDefault *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetFileCtrDefault"); + ndr->depth++; + ndr->depth--; +} + +void ndr_print_srvsvc_NetFileSubCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetFileSubCtr *r) +{ + ndr_print_union(ndr, name, level, "srvsvc_NetFileSubCtr"); + 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: + ndr_print_srvsvc_NetFileCtrDefault(ndr, "ctrDefault", &r->ctrDefault); + break; + + } +} + +void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, struct srvsvc_NetFileCtr *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetFileCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->level); + ndr_print_uint32(ndr, "level2", r->level2); + ndr_print_srvsvc_NetFileSubCtr(ndr, "subctr", r->level, &r->subctr); + ndr->depth--; +} + +void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetFileEnum *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetFileEnum"); + ndr->depth++; + 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_unistr(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_unistr(ndr, "path", r->in.path); + } + ndr->depth--; + ndr_print_ptr(ndr, "user", r->in.user); + ndr->depth++; + if (r->in.user) { + ndr_print_unistr(ndr, "user", r->in.user); + } + ndr->depth--; + ndr_print_srvsvc_NetFileCtr(ndr, "ctr", &r->in.ctr); + ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); + 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_srvsvc_NetFileCtr(ndr, "ctr", &r->out.ctr); + ndr_print_uint32(ndr, "total", r->out.total); + 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--; +} + +void ndr_print_srvsvc_0a(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_0a *r) +{ + ndr_print_struct(ndr, name, "srvsvc_0a"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_0a"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_0a"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_FILE_CLOSE(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_FILE_CLOSE *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_FILE_CLOSE"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_FILE_CLOSE"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_FILE_CLOSE"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NetSess0(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess0 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSess0"); + ndr->depth++; + ndr_print_ptr(ndr, "client", r->client); + ndr->depth++; + if (r->client) { + ndr_print_unistr(ndr, "client", r->client); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr0 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess0); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSess1(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess1 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSess1"); + ndr->depth++; + ndr_print_ptr(ndr, "client", r->client); + ndr->depth++; + if (r->client) { + ndr_print_unistr(ndr, "client", r->client); + } + ndr->depth--; + ndr_print_ptr(ndr, "user", r->user); + ndr->depth++; + if (r->user) { + ndr_print_unistr(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--; +} + +void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr1 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess1); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSess2(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess2 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSess2"); + ndr->depth++; + ndr_print_ptr(ndr, "client", r->client); + ndr->depth++; + if (r->client) { + ndr_print_unistr(ndr, "client", r->client); + } + ndr->depth--; + ndr_print_ptr(ndr, "user", r->user); + ndr->depth++; + if (r->user) { + ndr_print_unistr(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_unistr(ndr, "client_type", r->client_type); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr2 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess2); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSess10(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess10 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSess10"); + ndr->depth++; + ndr_print_ptr(ndr, "client", r->client); + ndr->depth++; + if (r->client) { + ndr_print_unistr(ndr, "client", r->client); + } + ndr->depth--; + ndr_print_ptr(ndr, "user", r->user); + ndr->depth++; + if (r->user) { + ndr_print_unistr(ndr, "user", r->user); + } + ndr->depth--; + ndr_print_uint32(ndr, "time", r->time); + ndr_print_uint32(ndr, "idle_time", r->idle_time); + ndr->depth--; +} + +void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr10 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess10); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSess502(struct ndr_print *ndr, const char *name, struct srvsvc_NetSess502 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSess502"); + ndr->depth++; + ndr_print_ptr(ndr, "client", r->client); + ndr->depth++; + if (r->client) { + ndr_print_unistr(ndr, "client", r->client); + } + ndr->depth--; + ndr_print_ptr(ndr, "user", r->user); + ndr->depth++; + if (r->user) { + ndr_print_unistr(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_unistr(ndr, "client_type", r->client_type); + } + ndr->depth--; + ndr_print_ptr(ndr, "transport", r->transport); + ndr->depth++; + if (r->transport) { + ndr_print_unistr(ndr, "transport", r->transport); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr502 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetSess502); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSessCtrDefault(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtrDefault *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSessCtrDefault"); + ndr->depth++; + ndr->depth--; +} + +void ndr_print_srvsvc_NetSessSubCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetSessSubCtr *r) +{ + ndr_print_union(ndr, name, level, "srvsvc_NetSessSubCtr"); + 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: + ndr_print_srvsvc_NetSessCtrDefault(ndr, "ctrDefault", &r->ctrDefault); + break; + + } +} + +void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, struct srvsvc_NetSessCtr *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSessCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->level); + ndr_print_uint32(ndr, "level2", r->level2); + ndr_print_srvsvc_NetSessSubCtr(ndr, "subctr", r->level, &r->subctr); + ndr->depth--; +} + +void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetSessEnum *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetSessEnum"); + ndr->depth++; + 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_unistr(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_unistr(ndr, "client", r->in.client); + } + ndr->depth--; + ndr_print_ptr(ndr, "user", r->in.user); + ndr->depth++; + if (r->in.user) { + ndr_print_unistr(ndr, "user", r->in.user); + } + ndr->depth--; + ndr_print_srvsvc_NetSessCtr(ndr, "ctr", &r->in.ctr); + ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); + 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_srvsvc_NetSessCtr(ndr, "ctr", &r->out.ctr); + ndr_print_uint32(ndr, "total", r->out.total); + 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--; +} + +void ndr_print_srvsvc_0d(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_0d *r) +{ + ndr_print_struct(ndr, name, "srvsvc_0d"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_0d"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_0d"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_SHARE_ADD(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_ADD *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_ADD"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_ADD"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_ADD"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NetShare0(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare0 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShare0"); + ndr->depth++; + ndr_print_ptr(ndr, "name", r->name); + ndr->depth++; + if (r->name) { + ndr_print_unistr(ndr, "name", r->name); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr0 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare0); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShare1(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare1 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShare1"); + ndr->depth++; + ndr_print_ptr(ndr, "name", r->name); + ndr->depth++; + if (r->name) { + ndr_print_unistr(ndr, "name", r->name); + } + ndr->depth--; + ndr_print_uint32(ndr, "type", r->type); + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_unistr(ndr, "comment", r->comment); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr1 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare1); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShare2(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare2 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShare2"); + ndr->depth++; + ndr_print_ptr(ndr, "name", r->name); + ndr->depth++; + if (r->name) { + ndr_print_unistr(ndr, "name", r->name); + } + ndr->depth--; + ndr_print_uint32(ndr, "type", r->type); + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_unistr(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_unistr(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "password", r->password); + ndr->depth++; + if (r->password) { + ndr_print_uint32(ndr, "password", *r->password); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr2 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare2); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShare501(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare501 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShare501"); + ndr->depth++; + ndr_print_ptr(ndr, "name", r->name); + ndr->depth++; + if (r->name) { + ndr_print_unistr(ndr, "name", r->name); + } + ndr->depth--; + ndr_print_uint32(ndr, "type", r->type); + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_unistr(ndr, "comment", r->comment); + } + ndr->depth--; + ndr_print_uint32(ndr, "csc_policy", r->csc_policy); + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr501 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare501); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShare502(struct ndr_print *ndr, const char *name, struct srvsvc_NetShare502 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShare502"); + ndr->depth++; + ndr_print_ptr(ndr, "name", r->name); + ndr->depth++; + if (r->name) { + ndr_print_unistr(ndr, "name", r->name); + } + ndr->depth--; + ndr_print_uint32(ndr, "type", r->type); + ndr_print_ptr(ndr, "comment", r->comment); + ndr->depth++; + if (r->comment) { + ndr_print_unistr(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_unistr(ndr, "path", r->path); + } + ndr->depth--; + ndr_print_ptr(ndr, "password", r->password); + ndr->depth++; + if (r->password) { + ndr_print_uint32(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--; +} + +void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr502 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetShare502); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareCtrDefault(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtrDefault *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShareCtrDefault"); + ndr->depth++; + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareSubCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetShareSubCtr *r) +{ + ndr_print_union(ndr, name, level, "srvsvc_NetShareSubCtr"); + 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; + + default: + ndr_print_srvsvc_NetShareCtrDefault(ndr, "ctrDefault", &r->ctrDefault); + break; + + } +} + +void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, struct srvsvc_NetShareCtr *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShareCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->level); + ndr_print_uint32(ndr, "level2", r->level2); + ndr_print_srvsvc_NetShareSubCtr(ndr, "subctr", r->level, &r->subctr); + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetShareEnumAll *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll"); + ndr->depth++; + 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_unistr(ndr, "server_unc", r->in.server_unc); + } + ndr->depth--; + ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->in.ctr); + ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); + 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_srvsvc_NetShareCtr(ndr, "ctr", &r->out.ctr); + ndr_print_uint32(ndr, "total", r->out.total); + 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--; +} + +void ndr_print_srvsvc_NET_SHARE_GET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_GET_INFO *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_GET_INFO"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_GET_INFO"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_GET_INFO"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_SHARE_SET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_SET_INFO *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_SET_INFO"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_SET_INFO"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_SET_INFO"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_SHARE_DEL(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_DEL *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_DEL"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_DEL"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_DEL"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_SHARE_DEL_STICKY(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SHARE_DEL_STICKY *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_SHARE_DEL_STICKY"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_SHARE_DEL_STICKY"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_SHARE_DEL_STICKY"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_14(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_14 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_14"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_14"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_14"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_SRV_GET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SRV_GET_INFO *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_SRV_GET_INFO"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_SRV_GET_INFO"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_SRV_GET_INFO"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_SRV_SET_INFO(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_SRV_SET_INFO *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_SRV_SET_INFO"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_SRV_SET_INFO"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_SRV_SET_INFO"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NetDisk0(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk0 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDisk0"); + ndr->depth++; + ndr_print_uint32(ndr, "unknown", r->unknown); + ndr_print_uint32(ndr, "size", r->size); + ndr_print_ptr(ndr, "disk", r->disk); + ndr->depth++; + if (r->disk) { + ndr_print_array_uint8(ndr, "disk", r->disk, r->size); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetDiskCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr0 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr0"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_uint32(ndr, "unknown2", r->unknown2); + ndr_print_ptr(ndr, "array", r->array); + ndr->depth++; + if (r->array) { + ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk0); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetDisk1(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk1 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDisk1"); + ndr->depth++; + ndr_print_uint32(ndr, "dummy", r->dummy); + ndr->depth--; +} + +void ndr_print_srvsvc_NetDiskCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr1 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr1"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "array", r->array); + ndr->depth++; + if (r->array) { + ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk1); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetDisk2(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk2 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDisk2"); + ndr->depth++; + ndr_print_uint32(ndr, "dummy", r->dummy); + ndr->depth--; +} + +void ndr_print_srvsvc_NetDiskCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr2 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr2"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "array", r->array); + ndr->depth++; + if (r->array) { + ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk2); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetDisk3(struct ndr_print *ndr, const char *name, struct srvsvc_NetDisk3 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDisk3"); + ndr->depth++; + ndr_print_uint32(ndr, "dummy", r->dummy); + ndr->depth--; +} + +void ndr_print_srvsvc_NetDiskCtr3(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr3 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr3"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "array", r->array); + ndr->depth++; + if (r->array) { + ndr_print_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetDisk3); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetDiskCtrDefault(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtrDefault *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDiskCtrDefault"); + ndr->depth++; + ndr->depth--; +} + +void ndr_print_srvsvc_NetDiskSubCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetDiskSubCtr *r) +{ + ndr_print_union(ndr, name, level, "srvsvc_NetDiskSubCtr"); + switch (level) { + case 0: + ndr_print_srvsvc_NetDiskCtr0(ndr, "ctr0", &r->ctr0); + break; + + case 1: + ndr_print_srvsvc_NetDiskCtr1(ndr, "ctr1", &r->ctr1); + break; + + case 2: + ndr_print_srvsvc_NetDiskCtr2(ndr, "ctr2", &r->ctr2); + break; + + case 3: + ndr_print_srvsvc_NetDiskCtr3(ndr, "ctr3", &r->ctr3); + break; + + default: + ndr_print_srvsvc_NetDiskCtrDefault(ndr, "ctrDefault", &r->ctrDefault); + break; + + } +} + +void ndr_print_srvsvc_NetDiskCtr(struct ndr_print *ndr, const char *name, struct srvsvc_NetDiskCtr *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDiskCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "num1", r->num1); + ndr_print_ptr(ndr, "ctr0", r->ctr0); + ndr->depth++; + if (r->ctr0) { + ndr_print_srvsvc_NetDiskCtr0(ndr, "ctr0", r->ctr0); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetDiskEnum *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum"); + ndr->depth++; + 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_unistr(ndr, "server_unc", r->in.server_unc); + } + ndr->depth--; + ndr_print_uint32(ndr, "level", r->in.level); + ndr_print_uint32(ndr, "unknown1", r->in.unknown1); + ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); + 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_srvsvc_NetDiskCtr(ndr, "ctr", &r->out.ctr); + ndr_print_uint32(ndr, "total", r->out.total); + 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--; +} + +void ndr_print_srvsvc_18(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_18 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_18"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_18"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_18"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_19(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_19 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_19"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_19"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_19"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_TransportAddress(struct ndr_print *ndr, const char *name, struct srvsvc_TransportAddress *r) +{ + ndr_print_struct(ndr, name, "srvsvc_TransportAddress"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "addr", r->addr); + ndr->depth++; + if (r->addr) { + ndr_print_array_uint8(ndr, "addr", r->addr, r->count); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransport0(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransport0 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetTransport0"); + ndr->depth++; + ndr_print_uint32(ndr, "vcs", r->vcs); + ndr_print_ptr(ndr, "name", r->name); + ndr->depth++; + if (r->name) { + ndr_print_unistr(ndr, "name", r->name); + } + ndr->depth--; + ndr_print_ptr(ndr, "addr", r->addr); + ndr->depth++; + if (r->addr) { + ndr_print_srvsvc_TransportAddress(ndr, "addr", r->addr); + } + 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_unistr(ndr, "net_addr", r->net_addr); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtr0 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetTransport0); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransport1(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransport1 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetTransport1"); + ndr->depth++; + ndr_print_uint32(ndr, "vcs", r->vcs); + ndr_print_ptr(ndr, "name", r->name); + ndr->depth++; + if (r->name) { + ndr_print_unistr(ndr, "name", r->name); + } + ndr->depth--; + ndr_print_ptr(ndr, "addr", r->addr); + ndr->depth++; + if (r->addr) { + ndr_print_srvsvc_TransportAddress(ndr, "addr", r->addr); + } + 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_unistr(ndr, "net_addr", r->net_addr); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain", r->domain); + ndr->depth++; + if (r->domain) { + ndr_print_unistr(ndr, "domain", r->domain); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtr1 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetTransport1); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransport2(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransport2 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetTransport2"); + ndr->depth++; + ndr_print_uint32(ndr, "dummy", r->dummy); + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtr2 *r) +{ + 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_array(ndr, "array", r->array, sizeof(r->array[0]), r->count, (ndr_print_fn_t)ndr_print_srvsvc_NetTransport2); + } + ndr->depth--; + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransportCtrDefault(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtrDefault *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetTransportCtrDefault"); + ndr->depth++; + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransportSubCtr(struct ndr_print *ndr, const char *name, uint16 level, union srvsvc_NetTransportSubCtr *r) +{ + ndr_print_union(ndr, name, level, "srvsvc_NetTransportSubCtr"); + 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; + + default: + ndr_print_srvsvc_NetTransportCtrDefault(ndr, "ctrDefault", &r->ctrDefault); + break; + + } +} + +void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, struct srvsvc_NetTransportCtr *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->level); + ndr_print_uint32(ndr, "level2", r->level2); + ndr_print_srvsvc_NetTransportSubCtr(ndr, "subctr", r->level, &r->subctr); + ndr->depth--; +} + +void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetTransportEnum *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum"); + ndr->depth++; + 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_unistr(ndr, "server_unc", r->in.server_unc); + } + ndr->depth--; + ndr_print_srvsvc_NetTransportCtr(ndr, "ctr", &r->in.ctr); + ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); + 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_srvsvc_NetTransportCtr(ndr, "ctr", &r->out.ctr); + ndr_print_uint32(ndr, "total", r->out.total); + 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--; +} + +void ndr_print_srvsvc_1b(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1b *r) +{ + ndr_print_struct(ndr, name, "srvsvc_1b"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_1b"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_1b"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_REMOTE_TOD(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_REMOTE_TOD *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_REMOTE_TOD"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_REMOTE_TOD"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_REMOTE_TOD"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_1d(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1d *r) +{ + ndr_print_struct(ndr, name, "srvsvc_1d"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_1d"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_1d"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_1e(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1e *r) +{ + ndr_print_struct(ndr, name, "srvsvc_1e"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_1e"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_1e"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_1f(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_1f *r) +{ + ndr_print_struct(ndr, name, "srvsvc_1f"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_1f"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_1f"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_20(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_20 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_20"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_20"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_20"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_NAME_VALIDATE(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_NAME_VALIDATE *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_NAME_VALIDATE"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_NAME_VALIDATE"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_NAME_VALIDATE"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_22(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_22 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_22"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_22"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_22"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_23(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_23 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_23"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_23"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_23"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NetShareEnum *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShareEnum"); + ndr->depth++; + 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_unistr(ndr, "server_unc", r->in.server_unc); + } + ndr->depth--; + ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->in.ctr); + ndr_print_uint32(ndr, "preferred_len", r->in.preferred_len); + 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_srvsvc_NetShareCtr(ndr, "ctr", &r->out.ctr); + ndr_print_uint32(ndr, "total", r->out.total); + 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--; +} + +void ndr_print_srvsvc_25(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_25 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_25"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_25"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_25"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_26(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_26 *r) +{ + ndr_print_struct(ndr, name, "srvsvc_26"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_26"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_26"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_FILE_QUERY_SECDESC(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_FILE_QUERY_SECDESC *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_FILE_QUERY_SECDESC"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_FILE_QUERY_SECDESC"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_FILE_QUERY_SECDESC"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +void ndr_print_srvsvc_NET_FILE_SET_SECDESC(struct ndr_print *ndr, const char *name, int flags, struct srvsvc_NET_FILE_SET_SECDESC *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NET_FILE_SET_SECDESC"); + ndr->depth++; + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "srvsvc_NET_FILE_SET_SECDESC"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "srvsvc_NET_FILE_SET_SECDESC"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", &r->out.result); + ndr->depth--; + } + ndr->depth--; +} + diff --git a/source4/librpc/ndr/ndr_srvsvc.h b/source4/librpc/ndr/ndr_srvsvc.h new file mode 100644 index 0000000000..c017c88a93 --- /dev/null +++ b/source4/librpc/ndr/ndr_srvsvc.h @@ -0,0 +1,872 @@ +/* header auto-generated by pidl */ + +#define DCERPC_SRVSVC_UUID "4b324fc8-1670-01d3-1278-5a47bf6ee188" +#define DCERPC_SRVSVC_VERSION 3.0 +#define DCERPC_SRVSVC_NAME "srvsvc" + +#define DCERPC_SRVSVC_00 0 +#define DCERPC_SRVSVC_01 1 +#define DCERPC_SRVSVC_02 2 +#define DCERPC_SRVSVC_03 3 +#define DCERPC_SRVSVC_04 4 +#define DCERPC_SRVSVC_05 5 +#define DCERPC_SRVSVC_06 6 +#define DCERPC_SRVSVC_07 7 +#define DCERPC_SRVSVC_NETCONNENUM 8 +#define DCERPC_SRVSVC_NETFILEENUM 9 +#define DCERPC_SRVSVC_0A 10 +#define DCERPC_SRVSVC_NET_FILE_CLOSE 11 +#define DCERPC_SRVSVC_NETSESSENUM 12 +#define DCERPC_SRVSVC_0D 13 +#define DCERPC_SRVSVC_NET_SHARE_ADD 14 +#define DCERPC_SRVSVC_NETSHAREENUMALL 15 +#define DCERPC_SRVSVC_NET_SHARE_GET_INFO 16 +#define DCERPC_SRVSVC_NET_SHARE_SET_INFO 17 +#define DCERPC_SRVSVC_NET_SHARE_DEL 18 +#define DCERPC_SRVSVC_NET_SHARE_DEL_STICKY 19 +#define DCERPC_SRVSVC_14 20 +#define DCERPC_SRVSVC_NET_SRV_GET_INFO 21 +#define DCERPC_SRVSVC_NET_SRV_SET_INFO 22 +#define DCERPC_SRVSVC_NETDISKENUM 23 +#define DCERPC_SRVSVC_18 24 +#define DCERPC_SRVSVC_19 25 +#define DCERPC_SRVSVC_NETTRANSPORTENUM 26 +#define DCERPC_SRVSVC_1B 27 +#define DCERPC_SRVSVC_NET_REMOTE_TOD 28 +#define DCERPC_SRVSVC_1D 29 +#define DCERPC_SRVSVC_1E 30 +#define DCERPC_SRVSVC_1F 31 +#define DCERPC_SRVSVC_20 32 +#define DCERPC_SRVSVC_NET_NAME_VALIDATE 33 +#define DCERPC_SRVSVC_22 34 +#define DCERPC_SRVSVC_23 35 +#define DCERPC_SRVSVC_NETSHAREENUM 36 +#define DCERPC_SRVSVC_25 37 +#define DCERPC_SRVSVC_26 38 +#define DCERPC_SRVSVC_NET_FILE_QUERY_SECDESC 39 +#define DCERPC_SRVSVC_NET_FILE_SET_SECDESC 40 + + +struct srvsvc_00 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_01 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_02 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_03 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_04 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_05 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_06 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_07 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NetConn0 { + uint32 conn_id; +}; + +struct srvsvc_NetConnCtr0 { + uint32 count; + struct srvsvc_NetConn0 *array; +}; + +struct srvsvc_NetConn1 { + uint32 conn_id; + uint32 conn_type; + uint32 num_open; + uint32 num_users; + uint32 conn_time; + const char *user; + const char *client; +}; + +struct srvsvc_NetConnCtr1 { + uint32 count; + struct srvsvc_NetConn1 *array; +}; + +struct srvsvc_NetConnCtrDefault { +}; + +union srvsvc_NetConnSubCtr { +/* [case(0)] */ struct srvsvc_NetConnCtr0 *ctr0; +/* [case(1)] */ struct srvsvc_NetConnCtr1 *ctr1; +/* [case(default)] */ struct srvsvc_NetConnCtrDefault ctrDefault; +}; + +struct srvsvc_NetConnCtr { + uint32 level; + uint32 level2; + union srvsvc_NetConnSubCtr subctr; +}; + +struct srvsvc_NetConnEnum { + struct { + const char *server_unc; + const char *path; + struct srvsvc_NetConnCtr ctr; + uint32 preferred_len; + uint32 *resume_handle; + } in; + + struct { + struct srvsvc_NetConnCtr ctr; + uint32 total; + uint32 *resume_handle; + WERROR result; + } out; + +}; + +struct srvsvc_NetFile2 { + uint32 fid; +}; + +struct srvsvc_NetFileCtr2 { + uint32 count; + struct srvsvc_NetFile2 *array; +}; + +struct srvsvc_NetFile3 { + uint32 fid; + uint32 permissions; + uint32 num_locks; + const char *path; + const char *user; +}; + +struct srvsvc_NetFileCtr3 { + uint32 count; + struct srvsvc_NetFile3 *array; +}; + +struct srvsvc_NetFileCtrDefault { +}; + +union srvsvc_NetFileSubCtr { +/* [case(2)] */ struct srvsvc_NetFileCtr2 *ctr2; +/* [case(3)] */ struct srvsvc_NetFileCtr3 *ctr3; +/* [case(default)] */ struct srvsvc_NetFileCtrDefault ctrDefault; +}; + +struct srvsvc_NetFileCtr { + uint32 level; + uint32 level2; + union srvsvc_NetFileSubCtr subctr; +}; + +struct srvsvc_NetFileEnum { + struct { + const char *server_unc; + const char *path; + const char *user; + struct srvsvc_NetFileCtr ctr; + uint32 preferred_len; + uint32 *resume_handle; + } in; + + struct { + struct srvsvc_NetFileCtr ctr; + uint32 total; + uint32 *resume_handle; + WERROR result; + } out; + +}; + +struct srvsvc_0a { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_FILE_CLOSE { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NetSess0 { + const char *client; +}; + +struct srvsvc_NetSessCtr0 { + uint32 count; + struct srvsvc_NetSess0 *array; +}; + +struct srvsvc_NetSess1 { + const char *client; + const char *user; + uint32 num_open; + uint32 time; + uint32 idle_time; + uint32 user_flags; +}; + +struct srvsvc_NetSessCtr1 { + uint32 count; + struct srvsvc_NetSess1 *array; +}; + +struct srvsvc_NetSess2 { + const char *client; + const char *user; + uint32 num_open; + uint32 time; + uint32 idle_time; + uint32 user_flags; + const char *client_type; +}; + +struct srvsvc_NetSessCtr2 { + uint32 count; + struct srvsvc_NetSess2 *array; +}; + +struct srvsvc_NetSess10 { + const char *client; + const char *user; + uint32 time; + uint32 idle_time; +}; + +struct srvsvc_NetSessCtr10 { + uint32 count; + struct srvsvc_NetSess10 *array; +}; + +struct srvsvc_NetSess502 { + const char *client; + const char *user; + uint32 num_open; + uint32 time; + uint32 idle_time; + uint32 user_flags; + const char *client_type; + const char *transport; +}; + +struct srvsvc_NetSessCtr502 { + uint32 count; + struct srvsvc_NetSess502 *array; +}; + +struct srvsvc_NetSessCtrDefault { +}; + +union srvsvc_NetSessSubCtr { +/* [case(0)] */ struct srvsvc_NetSessCtr0 *ctr0; +/* [case(1)] */ struct srvsvc_NetSessCtr1 *ctr1; +/* [case(2)] */ struct srvsvc_NetSessCtr2 *ctr2; +/* [case(10)] */ struct srvsvc_NetSessCtr10 *ctr10; +/* [case(502)] */ struct srvsvc_NetSessCtr502 *ctr502; +/* [case(default)] */ struct srvsvc_NetSessCtrDefault ctrDefault; +}; + +struct srvsvc_NetSessCtr { + uint32 level; + uint32 level2; + union srvsvc_NetSessSubCtr subctr; +}; + +struct srvsvc_NetSessEnum { + struct { + const char *server_unc; + const char *client; + const char *user; + struct srvsvc_NetSessCtr ctr; + uint32 preferred_len; + uint32 *resume_handle; + } in; + + struct { + struct srvsvc_NetSessCtr ctr; + uint32 total; + uint32 *resume_handle; + WERROR result; + } out; + +}; + +struct srvsvc_0d { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_SHARE_ADD { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NetShare0 { + const char *name; +}; + +struct srvsvc_NetShareCtr0 { + uint32 count; + struct srvsvc_NetShare0 *array; +}; + +struct srvsvc_NetShare1 { + const char *name; + uint32 type; + const char *comment; +}; + +struct srvsvc_NetShareCtr1 { + uint32 count; + struct srvsvc_NetShare1 *array; +}; + +struct srvsvc_NetShare2 { + const char *name; + uint32 type; + const char *comment; + uint32 permissions; + uint32 max_users; + uint32 current_users; + const char *path; + uint32 *password; +}; + +struct srvsvc_NetShareCtr2 { + uint32 count; + struct srvsvc_NetShare2 *array; +}; + +struct srvsvc_NetShare501 { + const char *name; + uint32 type; + const char *comment; + uint32 csc_policy; +}; + +struct srvsvc_NetShareCtr501 { + uint32 count; + struct srvsvc_NetShare501 *array; +}; + +struct srvsvc_NetShare502 { + const char *name; + uint32 type; + const char *comment; + uint32 permissions; + uint32 max_users; + uint32 current_users; + const char *path; + uint32 *password; + uint32 unknown; + struct security_descriptor *sd; +}; + +struct srvsvc_NetShareCtr502 { + uint32 count; + struct srvsvc_NetShare502 *array; +}; + +struct srvsvc_NetShareCtrDefault { +}; + +union srvsvc_NetShareSubCtr { +/* [case(0)] */ struct srvsvc_NetShareCtr0 *ctr0; +/* [case(1)] */ struct srvsvc_NetShareCtr1 *ctr1; +/* [case(2)] */ struct srvsvc_NetShareCtr2 *ctr2; +/* [case(501)] */ struct srvsvc_NetShareCtr501 *ctr501; +/* [case(502)] */ struct srvsvc_NetShareCtr502 *ctr502; +/* [case(default)] */ struct srvsvc_NetShareCtrDefault ctrDefault; +}; + +struct srvsvc_NetShareCtr { + uint32 level; + uint32 level2; + union srvsvc_NetShareSubCtr subctr; +}; + +struct srvsvc_NetShareEnumAll { + struct { + const char *server_unc; + struct srvsvc_NetShareCtr ctr; + uint32 preferred_len; + uint32 *resume_handle; + } in; + + struct { + struct srvsvc_NetShareCtr ctr; + uint32 total; + uint32 *resume_handle; + WERROR result; + } out; + +}; + +struct srvsvc_NET_SHARE_GET_INFO { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_SHARE_SET_INFO { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_SHARE_DEL { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_SHARE_DEL_STICKY { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_14 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_SRV_GET_INFO { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_SRV_SET_INFO { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NetDisk0 { + uint32 unknown; + uint32 size; + uint8 *disk; +}; + +struct srvsvc_NetDiskCtr0 { + uint32 count; + uint32 unknown1; + uint32 unknown2; + struct srvsvc_NetDisk0 *array; +}; + +struct srvsvc_NetDisk1 { + uint32 dummy; +}; + +struct srvsvc_NetDiskCtr1 { + uint32 count; + struct srvsvc_NetDisk1 *array; +}; + +struct srvsvc_NetDisk2 { + uint32 dummy; +}; + +struct srvsvc_NetDiskCtr2 { + uint32 count; + struct srvsvc_NetDisk2 *array; +}; + +struct srvsvc_NetDisk3 { + uint32 dummy; +}; + +struct srvsvc_NetDiskCtr3 { + uint32 count; + struct srvsvc_NetDisk3 *array; +}; + +struct srvsvc_NetDiskCtrDefault { +}; + +union srvsvc_NetDiskSubCtr { +/* [case(0)] */ struct srvsvc_NetDiskCtr0 ctr0; +/* [case(1)] */ struct srvsvc_NetDiskCtr1 ctr1; +/* [case(2)] */ struct srvsvc_NetDiskCtr2 ctr2; +/* [case(3)] */ struct srvsvc_NetDiskCtr3 ctr3; +/* [case(default)] */ struct srvsvc_NetDiskCtrDefault ctrDefault; +}; + +struct srvsvc_NetDiskCtr { + uint32 num1; + struct srvsvc_NetDiskCtr0 *ctr0; +}; + +struct srvsvc_NetDiskEnum { + struct { + const char *server_unc; + uint32 level; + uint32 unknown1; + uint32 unknown2; + uint32 preferred_len; + uint32 *resume_handle; + } in; + + struct { + struct srvsvc_NetDiskCtr ctr; + uint32 total; + uint32 *resume_handle; + WERROR result; + } out; + +}; + +struct srvsvc_18 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_19 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_TransportAddress { + uint32 count; + uint8 *addr; +}; + +struct srvsvc_NetTransport0 { + uint32 vcs; + const char *name; + struct srvsvc_TransportAddress *addr; + uint32 addr_len; + const char *net_addr; +}; + +struct srvsvc_NetTransportCtr0 { + uint32 count; + struct srvsvc_NetTransport0 *array; +}; + +struct srvsvc_NetTransport1 { + uint32 vcs; + const char *name; + struct srvsvc_TransportAddress *addr; + uint32 addr_len; + const char *net_addr; + const char *domain; +}; + +struct srvsvc_NetTransportCtr1 { + uint32 count; + struct srvsvc_NetTransport1 *array; +}; + +struct srvsvc_NetTransport2 { + uint32 dummy; +}; + +struct srvsvc_NetTransportCtr2 { + uint32 count; + struct srvsvc_NetTransport2 *array; +}; + +struct srvsvc_NetTransportCtrDefault { +}; + +union srvsvc_NetTransportSubCtr { +/* [case(0)] */ struct srvsvc_NetTransportCtr0 *ctr0; +/* [case(1)] */ struct srvsvc_NetTransportCtr1 *ctr1; +/* [case(2)] */ struct srvsvc_NetTransportCtr2 *ctr2; +/* [case(default)] */ struct srvsvc_NetTransportCtrDefault ctrDefault; +}; + +struct srvsvc_NetTransportCtr { + uint32 level; + uint32 level2; + union srvsvc_NetTransportSubCtr subctr; +}; + +struct srvsvc_NetTransportEnum { + struct { + const char *server_unc; + struct srvsvc_NetTransportCtr ctr; + uint32 preferred_len; + uint32 *resume_handle; + } in; + + struct { + struct srvsvc_NetTransportCtr ctr; + uint32 total; + uint32 *resume_handle; + WERROR result; + } out; + +}; + +struct srvsvc_1b { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_REMOTE_TOD { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_1d { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_1e { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_1f { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_20 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_NAME_VALIDATE { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_22 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_23 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NetShareEnum { + struct { + const char *server_unc; + struct srvsvc_NetShareCtr ctr; + uint32 preferred_len; + uint32 *resume_handle; + } in; + + struct { + struct srvsvc_NetShareCtr ctr; + uint32 total; + uint32 *resume_handle; + WERROR result; + } out; + +}; + +struct srvsvc_25 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_26 { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_FILE_QUERY_SECDESC { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + +struct srvsvc_NET_FILE_SET_SECDESC { + struct { + } in; + + struct { + NTSTATUS result; + } out; + +}; + diff --git a/source4/librpc/rpc/rpc_srvsvc.c b/source4/librpc/rpc/rpc_srvsvc.c new file mode 100644 index 0000000000..d49dd2a91b --- /dev/null +++ b/source4/librpc/rpc/rpc_srvsvc.c @@ -0,0 +1,858 @@ +/* dcerpc client calls generated by pidl */ + +#include "includes.h" + + +NTSTATUS dcerpc_srvsvc_00(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_00 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_00, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_00, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_00, + (ndr_pull_fn_t) ndr_pull_srvsvc_00, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_00, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_01(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_01 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_01, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_01, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_01, + (ndr_pull_fn_t) ndr_pull_srvsvc_01, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_01, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_02(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_02 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_02, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_02, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_02, + (ndr_pull_fn_t) ndr_pull_srvsvc_02, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_02, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_03(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_03 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_03, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_03, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_03, + (ndr_pull_fn_t) ndr_pull_srvsvc_03, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_03, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_04(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_04 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_04, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_04, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_04, + (ndr_pull_fn_t) ndr_pull_srvsvc_04, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_04, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_05(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_05 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_05, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_05, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_05, + (ndr_pull_fn_t) ndr_pull_srvsvc_05, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_05, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_06(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_06 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_06, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_06, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_06, + (ndr_pull_fn_t) ndr_pull_srvsvc_06, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_06, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_07(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_07 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_07, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_07, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_07, + (ndr_pull_fn_t) ndr_pull_srvsvc_07, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_07, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NetConnEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NetConnEnum *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NETCONNENUM, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NetConnEnum, + (ndr_pull_fn_t) ndr_pull_srvsvc_NetConnEnum, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, r); + } + + return status; +} + +NTSTATUS dcerpc_srvsvc_NetFileEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NetFileEnum *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NETFILEENUM, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NetFileEnum, + (ndr_pull_fn_t) ndr_pull_srvsvc_NetFileEnum, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, r); + } + + return status; +} + +NTSTATUS dcerpc_srvsvc_0a(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_0a *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_0a, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_0A, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_0a, + (ndr_pull_fn_t) ndr_pull_srvsvc_0a, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_0a, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_FILE_CLOSE(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_FILE_CLOSE *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_FILE_CLOSE, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_FILE_CLOSE, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_FILE_CLOSE, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_FILE_CLOSE, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_FILE_CLOSE, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NetSessEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NetSessEnum *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NETSESSENUM, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NetSessEnum, + (ndr_pull_fn_t) ndr_pull_srvsvc_NetSessEnum, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, r); + } + + return status; +} + +NTSTATUS dcerpc_srvsvc_0d(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_0d *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_0d, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_0D, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_0d, + (ndr_pull_fn_t) ndr_pull_srvsvc_0d, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_0d, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_SHARE_ADD(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_SHARE_ADD *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_SHARE_ADD, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_SHARE_ADD, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_SHARE_ADD, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_SHARE_ADD, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_SHARE_ADD, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareEnumAll *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NETSHAREENUMALL, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NetShareEnumAll, + (ndr_pull_fn_t) ndr_pull_srvsvc_NetShareEnumAll, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, r); + } + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_SHARE_GET_INFO(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_SHARE_GET_INFO *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_SHARE_GET_INFO, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_SHARE_GET_INFO, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_SHARE_GET_INFO, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_SHARE_GET_INFO, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_SHARE_GET_INFO, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_SHARE_SET_INFO(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_SHARE_SET_INFO *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_SHARE_SET_INFO, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_SHARE_SET_INFO, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_SHARE_SET_INFO, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_SHARE_SET_INFO, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_SHARE_SET_INFO, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_SHARE_DEL(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_SHARE_DEL *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_SHARE_DEL, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_SHARE_DEL, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_SHARE_DEL, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_SHARE_DEL, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_SHARE_DEL, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_SHARE_DEL_STICKY(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_SHARE_DEL_STICKY *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_SHARE_DEL_STICKY, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_SHARE_DEL_STICKY, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_SHARE_DEL_STICKY, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_SHARE_DEL_STICKY, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_SHARE_DEL_STICKY, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_14(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_14 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_14, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_14, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_14, + (ndr_pull_fn_t) ndr_pull_srvsvc_14, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_14, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_SRV_GET_INFO(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_SRV_GET_INFO *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_SRV_GET_INFO, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_SRV_GET_INFO, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_SRV_GET_INFO, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_SRV_GET_INFO, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_SRV_GET_INFO, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_SRV_SET_INFO(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_SRV_SET_INFO *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_SRV_SET_INFO, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_SRV_SET_INFO, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_SRV_SET_INFO, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_SRV_SET_INFO, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_SRV_SET_INFO, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NetDiskEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NetDiskEnum *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NETDISKENUM, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NetDiskEnum, + (ndr_pull_fn_t) ndr_pull_srvsvc_NetDiskEnum, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, r); + } + + return status; +} + +NTSTATUS dcerpc_srvsvc_18(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_18 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_18, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_18, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_18, + (ndr_pull_fn_t) ndr_pull_srvsvc_18, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_18, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_19(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_19 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_19, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_19, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_19, + (ndr_pull_fn_t) ndr_pull_srvsvc_19, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_19, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NetTransportEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NetTransportEnum *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NETTRANSPORTENUM, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NetTransportEnum, + (ndr_pull_fn_t) ndr_pull_srvsvc_NetTransportEnum, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, r); + } + + return status; +} + +NTSTATUS dcerpc_srvsvc_1b(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_1b *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_1b, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_1B, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_1b, + (ndr_pull_fn_t) ndr_pull_srvsvc_1b, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_1b, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_REMOTE_TOD(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_REMOTE_TOD *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_REMOTE_TOD, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_REMOTE_TOD, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_REMOTE_TOD, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_REMOTE_TOD, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_REMOTE_TOD, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_1d(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_1d *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_1d, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_1D, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_1d, + (ndr_pull_fn_t) ndr_pull_srvsvc_1d, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_1d, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_1e(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_1e *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_1e, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_1E, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_1e, + (ndr_pull_fn_t) ndr_pull_srvsvc_1e, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_1e, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_1f(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_1f *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_1f, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_1F, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_1f, + (ndr_pull_fn_t) ndr_pull_srvsvc_1f, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_1f, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_20(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_20 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_20, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_20, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_20, + (ndr_pull_fn_t) ndr_pull_srvsvc_20, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_20, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_NAME_VALIDATE(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_NAME_VALIDATE *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_NAME_VALIDATE, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_NAME_VALIDATE, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_NAME_VALIDATE, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_NAME_VALIDATE, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_NAME_VALIDATE, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_22(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_22 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_22, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_22, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_22, + (ndr_pull_fn_t) ndr_pull_srvsvc_22, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_22, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_23(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_23 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_23, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_23, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_23, + (ndr_pull_fn_t) ndr_pull_srvsvc_23, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_23, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NetShareEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareEnum *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NETSHAREENUM, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NetShareEnum, + (ndr_pull_fn_t) ndr_pull_srvsvc_NetShareEnum, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, r); + } + + return status; +} + +NTSTATUS dcerpc_srvsvc_25(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_25 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_25, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_25, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_25, + (ndr_pull_fn_t) ndr_pull_srvsvc_25, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_25, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_26(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_26 *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_26, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_26, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_26, + (ndr_pull_fn_t) ndr_pull_srvsvc_26, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_26, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_FILE_QUERY_SECDESC(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_FILE_QUERY_SECDESC *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_FILE_QUERY_SECDESC, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_FILE_QUERY_SECDESC, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_FILE_QUERY_SECDESC, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_FILE_QUERY_SECDESC, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_FILE_QUERY_SECDESC, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} + +NTSTATUS dcerpc_srvsvc_NET_FILE_SET_SECDESC(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct srvsvc_NET_FILE_SET_SECDESC *r) +{ + NTSTATUS status; + + if (p->flags & DCERPC_DEBUG_PRINT_IN) { + NDR_PRINT_IN_DEBUG(srvsvc_NET_FILE_SET_SECDESC, r); + } + + status = dcerpc_ndr_request(p, DCERPC_SRVSVC_NET_FILE_SET_SECDESC, mem_ctx, + (ndr_push_fn_t) ndr_push_srvsvc_NET_FILE_SET_SECDESC, + (ndr_pull_fn_t) ndr_pull_srvsvc_NET_FILE_SET_SECDESC, + r); + + if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NET_FILE_SET_SECDESC, r); + } + if (NT_STATUS_IS_OK(status)) status = r->out.result; + + return status; +} diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c new file mode 100644 index 0000000000..384959f26a --- /dev/null +++ b/source4/torture/rpc/srvsvc.c @@ -0,0 +1,296 @@ +/* + Unix SMB/CIFS implementation. + test suite for srvsvc rpc operations + + Copyright (C) Stefan (metze) Metzmacher 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" + + +static BOOL test_NetConnEnum(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct srvsvc_NetConnEnum r; + struct srvsvc_NetConnCtr0 c0; + uint32 levels[] = {0, 1}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p)); + r.in.path = talloc_asprintf(mem_ctx,"%s","ADMIN$"); + r.in.ctr.subctr.ctr0 = &c0; + r.in.ctr.subctr.ctr0->count = 0; + r.in.ctr.subctr.ctr0->array = NULL; + r.in.preferred_len = (uint32)-1; + r.in.resume_handle = NULL; + + for (i=0;i<ARRAY_SIZE(levels);i++) { + r.in.ctr.level = levels[i]; + r.in.ctr.level2 = levels[i]; + printf("testing NetConnEnum level %u\n", r.in.ctr.level); + status = dcerpc_srvsvc_NetConnEnum(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("NetConnEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status)); + ret = False; + } + } + + return True; +} + +static BOOL test_NetFileEnum(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct srvsvc_NetFileEnum r; + struct srvsvc_NetFileCtr3 c3; + uint32 levels[] = {2, 3}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p)); + r.in.path = NULL; + r.in.user = NULL; + r.in.ctr.subctr.ctr3 = &c3; + r.in.ctr.subctr.ctr3->count = 0; + r.in.ctr.subctr.ctr3->array = NULL; + r.in.preferred_len = (uint32)4096; + r.in.resume_handle = NULL; + + for (i=0;i<ARRAY_SIZE(levels);i++) { + r.in.ctr.level = levels[i]; + r.in.ctr.level2 = levels[i]; + printf("testing NetFileEnum level %u\n", r.in.ctr.level); + status = dcerpc_srvsvc_NetFileEnum(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("NetFileEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status)); + ret = False; + } + } + + return True; +} + +static BOOL test_NetSessEnum(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct srvsvc_NetSessEnum r; + struct srvsvc_NetSessCtr0 c0; + uint32 levels[] = {0, 1, 2, 10, 502}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p)); + r.in.client = NULL; + r.in.user = NULL; + r.in.ctr.subctr.ctr0 = &c0; + r.in.ctr.subctr.ctr0->count = 0; + r.in.ctr.subctr.ctr0->array = NULL; + r.in.preferred_len = (uint32)-1; + r.in.resume_handle = NULL; + + for (i=0;i<ARRAY_SIZE(levels);i++) { + r.in.ctr.level = levels[i]; + r.in.ctr.level2 = levels[i]; + printf("testing NetSessEnum level %u\n", r.in.ctr.level); + status = dcerpc_srvsvc_NetSessEnum(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("NetSessEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status)); + ret = False; + } + } + + return True; +} + +static BOOL test_NetShareEnumAll(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct srvsvc_NetShareEnumAll r; + struct srvsvc_NetShareCtr0 c0; + uint32 levels[] = {0, 1, 2, 501, 502}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p)); + r.in.ctr.subctr.ctr0 = &c0; + r.in.ctr.subctr.ctr0->count = 0; + r.in.ctr.subctr.ctr0->array = NULL; + r.in.preferred_len = (uint32)-1; + r.in.resume_handle = NULL; + + for (i=0;i<ARRAY_SIZE(levels);i++) { + r.in.ctr.level = levels[i]; + r.in.ctr.level2 = levels[i]; + printf("testing NetShareEnumAll level %u\n", r.in.ctr.level); + status = dcerpc_srvsvc_NetShareEnumAll(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("NetShareEnumAll level %u failed - %s\n", r.in.ctr.level, nt_errstr(status)); + ret = False; + } + } + + return True; +} + +#if 0 +static BOOL test_NetDiskEnum(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct srvsvc_NetDiskEnum r; + struct srvsvc_NetDiskCtr0 c0; + uint32 levels[] = {0, 1, 2, 3}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p)); + r.in.preferred_len = (uint32)-1; + r.in.resume_handle = NULL; + + for (i=0;i<ARRAY_SIZE(levels);i++) { + r.in.level = levels[i]; + ZERO_STRUCT(r.out); + printf("testing NetDiskEnum level %u\n", r.in.level); + status = dcerpc_srvsvc_NetDiskEnum(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, &r); + printf("NetDiskEnum level %u failed - %s\n", r.in.level, nt_errstr(status)); + ret = False; + } + } + + return True; +} + +static BOOL test_NetTransportEnum(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct srvsvc_NetTransportEnum r; + struct srvsvc_NetTransportCtr0 c0; + uint32 levels[] = {0, 1}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p)); + r.in.ctr.subctr.ctr0 = &c0; + r.in.ctr.subctr.ctr0->count = 0; + r.in.ctr.subctr.ctr0->array = NULL; + r.in.preferred_len = (uint32)-1; + r.in.resume_handle = NULL; + + for (i=0;i<ARRAY_SIZE(levels);i++) { + r.in.ctr.level = levels[i]; + r.in.ctr.level2 = levels[i]; + printf("testing NetTransportEnum level %u\n", r.in.ctr.level); + status = dcerpc_srvsvc_NetTransportEnum(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("NetTransportEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status)); + ret = False; + } + } + + return True; +} +#endif +static BOOL test_NetShareEnum(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct srvsvc_NetShareEnum r; + struct srvsvc_NetShareCtr0 c0; + uint32 levels[] = {0, 1, 2, 502}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p)); + r.in.ctr.subctr.ctr0 = &c0; + r.in.ctr.subctr.ctr0->count = 0; + r.in.ctr.subctr.ctr0->array = NULL; + r.in.preferred_len = (uint32)-1; + r.in.resume_handle = NULL; + + for (i=0;i<ARRAY_SIZE(levels);i++) { + r.in.ctr.level = levels[i]; + r.in.ctr.level2 = levels[i]; + printf("testing NetShareEnum level %u\n", r.in.ctr.level); + status = dcerpc_srvsvc_NetShareEnum(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("NetShareEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status)); + ret = False; + } + } + + return True; +} + +BOOL torture_rpc_srvsvc(int dummy) +{ + NTSTATUS status; + struct dcerpc_pipe *p; + TALLOC_CTX *mem_ctx; + BOOL ret = True; + + mem_ctx = talloc_init("torture_rpc_srvsvc"); + + status = torture_rpc_connection(&p, + DCERPC_SRVSVC_NAME, + DCERPC_SRVSVC_UUID, + DCERPC_SRVSVC_VERSION); + if (!NT_STATUS_IS_OK(status)) { + return False; + } + + p->flags |= DCERPC_DEBUG_PRINT_BOTH; + + if (!test_NetConnEnum(p, mem_ctx)) { + ret = False; + } + + if (!test_NetFileEnum(p, mem_ctx)) { + ret = False; + } + + if (!test_NetSessEnum(p, mem_ctx)) { + ret = False; + } + + if (!test_NetShareEnumAll(p, mem_ctx)) { + ret = False; + } +#if 0 + if (!test_NetDiskEnum(p, mem_ctx)) { + ret = False; + } + + if (!test_NetTransportEnum(p, mem_ctx)) { + ret = False; + } +#endif + if (!test_NetShareEnum(p, mem_ctx)) { + ret = False; + } + + torture_rpc_close(p); + + return ret; +} diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 711a0ae54e..fca54de64e 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -3993,6 +3993,7 @@ static struct { {"RPC-SPOOLSS", torture_rpc_spoolss, 0}, {"RPC-SAMR", torture_rpc_samr, 0}, {"RPC-WKSSVC", torture_rpc_wkssvc, 0}, + {"RPC-SRVSVC", torture_rpc_srvsvc, 0}, {NULL, NULL, 0}}; |