summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-04-03 12:28:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:06 -0500
commit0389cad7c492eda5aee590d0396748c7da9b44ff (patch)
tree13bb3ae9d118d2eb17e374be0a2a675d03f11ff6 /source3
parent4432df38eeffa3f9d63b908ce2d0af8d00297078 (diff)
downloadsamba-0389cad7c492eda5aee590d0396748c7da9b44ff.tar.gz
samba-0389cad7c492eda5aee590d0396748c7da9b44ff.tar.bz2
samba-0389cad7c492eda5aee590d0396748c7da9b44ff.zip
r22055: Port the endpoint mapper (and functions it requires) to Samba 3.
(This used to be commit ad981261877e6a2dce0c4f4e71fd9127aa31538a)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in19
-rw-r--r--source3/configure.in3
-rw-r--r--source3/include/rpc_client.h1
-rw-r--r--source3/include/smb.h7
-rw-r--r--source3/librpc/gen_ndr/cli_epmapper.c267
-rw-r--r--source3/librpc/gen_ndr/cli_epmapper.h12
-rw-r--r--source3/librpc/gen_ndr/epmapper.h353
-rw-r--r--source3/librpc/gen_ndr/ndr_epmapper.c2686
-rw-r--r--source3/librpc/gen_ndr/ndr_epmapper.h77
-rw-r--r--source3/librpc/gen_ndr/srv_epmapper.c574
-rw-r--r--source3/librpc/gen_ndr/srv_epmapper.h14
-rw-r--r--source3/librpc/gen_ndr/tables.c4
-rw-r--r--source3/librpc/idl/epmapper.idl302
-rw-r--r--source3/librpc/ndr/ndr_basic.c48
-rw-r--r--source3/rpc_parse/parse_rpc.c11
-rw-r--r--source3/rpc_server/srv_epmapper_nt.c71
-rw-r--r--source3/rpc_server/srv_pipe.c5
17 files changed, 4442 insertions, 12 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 3997c424e7..2db52adbf9 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -225,7 +225,8 @@ LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_unixinfo.o librpc/gen_ndr/ndr_lsa.o \
librpc/gen_ndr/ndr_winreg.o librpc/gen_ndr/ndr_initshutdown.o \
librpc/gen_ndr/ndr_srvsvc.o librpc/gen_ndr/ndr_svcctl.o \
librpc/gen_ndr/ndr_eventlog.o librpc/gen_ndr/ndr_wkssvc.o \
- librpc/gen_ndr/ndr_notify.o
+ librpc/gen_ndr/ndr_notify.o \
+ librpc/gen_ndr/ndr_epmapper.o
RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
@@ -328,7 +329,7 @@ LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_unixinfo.o librpc/gen_ndr/cli_lsa.o \
librpc/gen_ndr/cli_dfs.o librpc/gen_ndr/cli_echo.o \
librpc/gen_ndr/cli_srvsvc.o \
librpc/gen_ndr/cli_winreg.o librpc/gen_ndr/cli_initshutdown.o \
- librpc/gen_ndr/cli_eventlog.o \
+ librpc/gen_ndr/cli_eventlog.o librpc/gen_ndr/cli_epmapper.o \
$(LIBNDR_GEN_OBJ) $(LIBNDR_OBJ) $(RPCCLIENT_NDR_OBJ)
REGOBJS_OBJ = registry/reg_objects.o
@@ -348,6 +349,8 @@ RPC_SAMR_OBJ = rpc_server/srv_samr.o rpc_server/srv_samr_nt.o \
RPC_UNIXINFO_OBJ = librpc/gen_ndr/srv_unixinfo.o rpc_server/srv_unixinfo_nt.o
REGFIO_OBJ = registry/regfio.o
+RPC_EPMAPPER_OBJ = librpc/gen_ndr/srv_epmapper.o rpc_server/srv_epmapper_nt.o
+
RPC_REG_OBJ = librpc/gen_ndr/srv_winreg.o rpc_server/srv_winreg_nt.o $(REGFIO_OBJ)
RPC_INITSHUTDOWN_OBJ = librpc/gen_ndr/srv_initshutdown.o rpc_server/srv_initshutdown_nt.o
@@ -756,8 +759,8 @@ PROTO_OBJ = $(SMBD_OBJ_MAIN) $(LIBNDR_OBJ) $(RPCCLIENT_NDR_OBJ) \
$(RPC_SVC_OBJ) $(RPC_WKS_OBJ) $(RPC_DFS_OBJ) $(RPC_SPOOLSS_OBJ) \
$(RPC_ECHO_OBJ) $(RPC_SVCCTL_OBJ) $(RPC_EVENTLOG_OBJ) $(SMBLDAP_OBJ) \
$(IDMAP_OBJ) libsmb/spnego.o $(PASSCHANGE_OBJ) $(RPC_UNIXINFO_OBJ) \
- $(RPC_NTSVCS_OBJ) $(RPC_INITSHUTDOWN_OBJ) utils/passwd_util.o \
- $(LIBGPO_OBJ) $(NSS_INFO_OBJ)
+ $(RPC_EPMAPPER_OBJ) $(RPC_NTSVCS_OBJ) $(RPC_INITSHUTDOWN_OBJ) \
+ utils/passwd_util.o $(LIBGPO_OBJ) $(NSS_INFO_OBJ)
WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) \
$(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ)
@@ -936,7 +939,8 @@ cac: SHOWFLAGS $(LIBMSRPC)
#####################################################################
## Perl IDL Compiler
IDL_FILES = unixinfo.idl lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \
- srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl
+ srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \
+ epmapper.idl
idl:
@IDL_FILES="$(IDL_FILES)" CPP="$(CPP)" PERL="$(PERL)" \
@@ -1303,6 +1307,11 @@ bin/librpc_unixinfo.@SHLIBEXT@: proto_exists $(RPC_UNIXINFO_OBJ)
@$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_UNIXINFO_OBJ) -lc \
@SONAMEFLAG@`basename $@`
+bin/librpc_epmapper.@SHLIBEXT@: proto_exists $(RPC_EPMAPPER_OBJ)
+ @echo "Linking $@"
+ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_EPMAPPER_OBJ) -lc \
+ @SONAMEFLAG@`basename $@`
+
bin/librpc_srvsvc.@SHLIBEXT@: proto_exists $(RPC_SVC_OBJ)
@echo "Linking $@"
@$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SVC_OBJ) -lc \
diff --git a/source3/configure.in b/source3/configure.in
index ca7a52533e..803425a66a 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -592,7 +592,7 @@ AC_SUBST(DYNEXP)
dnl Add modules that have to be built by default here
dnl These have to be built static:
-default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_winreg rpc_initshutdown rpc_lsa_ds rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_net rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog rpc_unixinfo auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default nss_info_template"
+default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_winreg rpc_initshutdown rpc_lsa_ds rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_net rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog rpc_unixinfo rpc_epmapper auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default nss_info_template"
dnl These are preferably build shared, and static if dlopen() is not available
default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437 auth_script"
@@ -5992,6 +5992,7 @@ SMB_MODULE(rpc_eventlog, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog.$SHLIBEXT",
SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC)
SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_echo.$SHLIBEXT", RPC)
SMB_MODULE(rpc_unixinfo, \$(RPC_UNIXINFO_OBJ), "bin/librpc_unixinfo.$SHLIBEXT", RPC)
+SMB_MODULE(rpc_epmapper, \$(RPC_EPMAPPER_OBJ), "bin/librpc_epmapper.$SHLIBEXT", RPC)
SMB_SUBSYSTEM(RPC,smbd/server.o)
SMB_MODULE(idmap_ldap, nsswitch/idmap_ldap.o, "bin/ldap.$SHLIBEXT", IDMAP)
diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index 72737eafaf..94803dbaea 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -25,6 +25,7 @@
#include "librpc/gen_ndr/cli_echo.h"
#include "librpc/gen_ndr/cli_unixinfo.h"
+#include "librpc/gen_ndr/cli_epmapper.h"
#include "librpc/gen_ndr/cli_dfs.h"
#include "librpc/gen_ndr/cli_lsa.h"
#include "librpc/gen_ndr/cli_srvsvc.h"
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 722c34d9d3..27c1af1f82 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -187,7 +187,7 @@ typedef uint32 codepoint_t;
#define PIPE_NETDFS "\\PIPE\\netdfs"
#define PIPE_ECHO "\\PIPE\\rpcecho"
#define PIPE_SHUTDOWN "\\PIPE\\initshutdown"
-#define PIPE_EPM "\\PIPE\\epmapper"
+#define PIPE_EPMAPPER "\\PIPE\\epmapper"
#define PIPE_SVCCTL "\\PIPE\\svcctl"
#define PIPE_EVENTLOG "\\PIPE\\eventlog"
#define PIPE_UNIXINFO "\\PIPE\\unixinfo"
@@ -209,7 +209,8 @@ typedef uint32 codepoint_t;
#define PI_EVENTLOG 12
#define PI_UNIXINFO 13
#define PI_NTSVCS 14
-#define PI_MAX_PIPES 15
+#define PI_EPMAPPER 15
+#define PI_MAX_PIPES 16
/* 64 bit time (100usec) since ????? - cifs6.txt, section 3.5, page 30 */
typedef uint64_t NTTIME;
@@ -1898,4 +1899,6 @@ enum usershare_err {
/* Different reasons for closing a file. */
enum file_close_type {NORMAL_CLOSE=0,SHUTDOWN_CLOSE,ERROR_CLOSE};
+#include "librpc/gen_ndr/epmapper.h"
+
#endif /* _SMB_H */
diff --git a/source3/librpc/gen_ndr/cli_epmapper.c b/source3/librpc/gen_ndr/cli_epmapper.c
new file mode 100644
index 0000000000..4ca491d70d
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_epmapper.c
@@ -0,0 +1,267 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_epmapper.h"
+
+NTSTATUS rpccli_epm_Insert(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents, struct epm_entry_t *entries, uint32_t replace)
+{
+ struct epm_Insert r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.num_ents = num_ents;
+ r.in.entries = entries;
+ r.in.replace = replace;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Insert, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_INSERT, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_Insert, (ndr_push_flags_fn_t)ndr_push_epm_Insert);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Insert, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_epm_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents, struct epm_entry_t *entries)
+{
+ struct epm_Delete r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.num_ents = num_ents;
+ r.in.entries = entries;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Delete, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_DELETE, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_Delete, (ndr_push_flags_fn_t)ndr_push_epm_Delete);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Delete, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t inquiry_type, struct GUID *object, struct rpc_if_id_t *interface_id, uint32_t vers_option, struct policy_handle *entry_handle, uint32_t max_ents, uint32_t *num_ents, struct epm_entry_t *entries)
+{
+ struct epm_Lookup r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.inquiry_type = inquiry_type;
+ r.in.object = object;
+ r.in.interface_id = interface_id;
+ r.in.vers_option = vers_option;
+ r.in.entry_handle = entry_handle;
+ r.in.max_ents = max_ents;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Lookup, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_LOOKUP, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_Lookup, (ndr_push_flags_fn_t)ndr_push_epm_Lookup);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Lookup, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *entry_handle = *r.out.entry_handle;
+ *num_ents = *r.out.num_ents;
+ memcpy(entries, r.out.entries, r.in.max_ents);
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *object, struct epm_twr_t *map_tower, struct policy_handle *entry_handle, uint32_t max_towers, uint32_t *num_towers, struct epm_twr_p_t *towers)
+{
+ struct epm_Map r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.object = object;
+ r.in.map_tower = map_tower;
+ r.in.entry_handle = entry_handle;
+ r.in.max_towers = max_towers;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Map, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_MAP, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_Map, (ndr_push_flags_fn_t)ndr_push_epm_Map);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Map, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *entry_handle = *r.out.entry_handle;
+ *num_towers = *r.out.num_towers;
+ memcpy(towers, r.out.towers, r.in.max_towers);
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_epm_LookupHandleFree(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *entry_handle)
+{
+ struct epm_LookupHandleFree r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.entry_handle = entry_handle;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_LookupHandleFree, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_LOOKUPHANDLEFREE, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_LookupHandleFree, (ndr_push_flags_fn_t)ndr_push_epm_LookupHandleFree);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *entry_handle = *r.out.entry_handle;
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_epm_InqObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *epm_object)
+{
+ struct epm_InqObject r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.epm_object = epm_object;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_InqObject, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_INQOBJECT, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_InqObject, (ndr_push_flags_fn_t)ndr_push_epm_InqObject);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_InqObject, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_epm_MgmtDelete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t object_speced, struct GUID *object, struct epm_twr_t *tower)
+{
+ struct epm_MgmtDelete r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.object_speced = object_speced;
+ r.in.object = object;
+ r.in.tower = tower;
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_MgmtDelete, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_MGMTDELETE, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_MgmtDelete, (ndr_push_flags_fn_t)ndr_push_epm_MgmtDelete);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_epm_MapAuth(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct epm_MapAuth r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_MapAuth, &r);
+
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EPMAPPER, DCERPC_EPM_MAPAUTH, &r, (ndr_pull_flags_fn_t)ndr_pull_epm_MapAuth, (ndr_push_flags_fn_t)ndr_push_epm_MapAuth);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_MapAuth, &r);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return NT_STATUS_OK;
+}
+
diff --git a/source3/librpc/gen_ndr/cli_epmapper.h b/source3/librpc/gen_ndr/cli_epmapper.h
new file mode 100644
index 0000000000..88e05a4600
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_epmapper.h
@@ -0,0 +1,12 @@
+#include "librpc/gen_ndr/ndr_epmapper.h"
+#ifndef __CLI_EPMAPPER__
+#define __CLI_EPMAPPER__
+NTSTATUS rpccli_epm_Insert(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents, struct epm_entry_t *entries, uint32_t replace);
+NTSTATUS rpccli_epm_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents, struct epm_entry_t *entries);
+NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t inquiry_type, struct GUID *object, struct rpc_if_id_t *interface_id, uint32_t vers_option, struct policy_handle *entry_handle, uint32_t max_ents, uint32_t *num_ents, struct epm_entry_t *entries);
+NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *object, struct epm_twr_t *map_tower, struct policy_handle *entry_handle, uint32_t max_towers, uint32_t *num_towers, struct epm_twr_p_t *towers);
+NTSTATUS rpccli_epm_LookupHandleFree(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *entry_handle);
+NTSTATUS rpccli_epm_InqObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *epm_object);
+NTSTATUS rpccli_epm_MgmtDelete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t object_speced, struct GUID *object, struct epm_twr_t *tower);
+NTSTATUS rpccli_epm_MapAuth(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+#endif /* __CLI_EPMAPPER__ */
diff --git a/source3/librpc/gen_ndr/epmapper.h b/source3/librpc/gen_ndr/epmapper.h
new file mode 100644
index 0000000000..0fb5ed048e
--- /dev/null
+++ b/source3/librpc/gen_ndr/epmapper.h
@@ -0,0 +1,353 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#ifndef _HEADER_epmapper
+#define _HEADER_epmapper
+
+#define EPMAPPER_STATUS_NO_MORE_ENTRIES ( 0x16c9a0d6 )
+#define EPMAPPER_STATUS_NO_MEMORY ( 0x16C9A012 )
+#define EPMAPPER_STATUS_OK ( 0 )
+#ifndef USE_UINT_ENUMS
+enum epm_protocol {
+ EPM_PROTOCOL_DNET_NSP=0x04,
+ EPM_PROTOCOL_OSI_TP4=0x05,
+ EPM_PROTOCOL_OSI_CLNS=0x06,
+ EPM_PROTOCOL_TCP=0x07,
+ EPM_PROTOCOL_UDP=0x08,
+ EPM_PROTOCOL_IP=0x09,
+ EPM_PROTOCOL_NCADG=0x0a,
+ EPM_PROTOCOL_NCACN=0x0b,
+ EPM_PROTOCOL_NCALRPC=0x0c,
+ EPM_PROTOCOL_UUID=0x0d,
+ EPM_PROTOCOL_IPX=0x0e,
+ EPM_PROTOCOL_SMB=0x0f,
+ EPM_PROTOCOL_PIPE=0x10,
+ EPM_PROTOCOL_NETBIOS=0x11,
+ EPM_PROTOCOL_NETBEUI=0x12,
+ EPM_PROTOCOL_SPX=0x13,
+ EPM_PROTOCOL_NB_IPX=0x14,
+ EPM_PROTOCOL_DSP=0x16,
+ EPM_PROTOCOL_DDP=0x17,
+ EPM_PROTOCOL_APPLETALK=0x18,
+ EPM_PROTOCOL_VINES_SPP=0x1a,
+ EPM_PROTOCOL_VINES_IPC=0x1b,
+ EPM_PROTOCOL_STREETTALK=0x1c,
+ EPM_PROTOCOL_HTTP=0x1f,
+ EPM_PROTOCOL_UNIX_DS=0x20,
+ EPM_PROTOCOL_NULL=0x21
+}
+#else
+enum epm_protocol { __donnot_use_enum_epm_protocol=0x7FFFFFFF}
+#define EPM_PROTOCOL_DNET_NSP ( 0x04 )
+#define EPM_PROTOCOL_OSI_TP4 ( 0x05 )
+#define EPM_PROTOCOL_OSI_CLNS ( 0x06 )
+#define EPM_PROTOCOL_TCP ( 0x07 )
+#define EPM_PROTOCOL_UDP ( 0x08 )
+#define EPM_PROTOCOL_IP ( 0x09 )
+#define EPM_PROTOCOL_NCADG ( 0x0a )
+#define EPM_PROTOCOL_NCACN ( 0x0b )
+#define EPM_PROTOCOL_NCALRPC ( 0x0c )
+#define EPM_PROTOCOL_UUID ( 0x0d )
+#define EPM_PROTOCOL_IPX ( 0x0e )
+#define EPM_PROTOCOL_SMB ( 0x0f )
+#define EPM_PROTOCOL_PIPE ( 0x10 )
+#define EPM_PROTOCOL_NETBIOS ( 0x11 )
+#define EPM_PROTOCOL_NETBEUI ( 0x12 )
+#define EPM_PROTOCOL_SPX ( 0x13 )
+#define EPM_PROTOCOL_NB_IPX ( 0x14 )
+#define EPM_PROTOCOL_DSP ( 0x16 )
+#define EPM_PROTOCOL_DDP ( 0x17 )
+#define EPM_PROTOCOL_APPLETALK ( 0x18 )
+#define EPM_PROTOCOL_VINES_SPP ( 0x1a )
+#define EPM_PROTOCOL_VINES_IPC ( 0x1b )
+#define EPM_PROTOCOL_STREETTALK ( 0x1c )
+#define EPM_PROTOCOL_HTTP ( 0x1f )
+#define EPM_PROTOCOL_UNIX_DS ( 0x20 )
+#define EPM_PROTOCOL_NULL ( 0x21 )
+#endif
+;
+
+struct epm_rhs_dnet_nsp {
+ char _empty_;
+};
+
+struct epm_rhs_osi_tp4 {
+ char _empty_;
+};
+
+struct epm_rhs_osi_clns {
+ char _empty_;
+};
+
+struct epm_rhs_udp {
+ uint16_t port;
+};
+
+struct epm_rhs_tcp {
+ uint16_t port;
+};
+
+struct epm_rhs_ip {
+ const char * ipaddr;
+};
+
+struct epm_rhs_ncadg {
+ uint16_t minor_version;
+};
+
+struct epm_rhs_ncacn {
+ uint16_t minor_version;
+};
+
+struct epm_rhs_uuid {
+ DATA_BLOB unknown;/* [flag(LIBNDR_FLAG_REMAINING)] */
+};
+
+struct epm_rhs_ipx {
+ char _empty_;
+};
+
+struct epm_rhs_smb {
+ const char * unc;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+struct epm_rhs_pipe {
+ const char * path;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+struct epm_rhs_netbios {
+ const char * name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+struct epm_rhs_netbeui {
+ char _empty_;
+};
+
+struct epm_rhs_spx {
+ char _empty_;
+};
+
+struct epm_rhs_nb_ipx {
+ char _empty_;
+};
+
+struct epm_rhs_http {
+ uint16_t port;
+};
+
+struct epm_rhs_unix_ds {
+ const char * path;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+struct epm_rhs_null {
+ char _empty_;
+};
+
+struct epm_rhs_ncalrpc {
+ uint16_t minor_version;
+};
+
+struct epm_rhs_appletalk {
+ char _empty_;
+};
+
+struct epm_rhs_atalk_stream {
+ char _empty_;
+};
+
+struct epm_rhs_atalk_datagram {
+ char _empty_;
+};
+
+struct epm_rhs_vines_spp {
+ uint16_t port;
+};
+
+struct epm_rhs_vines_ipc {
+ uint16_t port;
+};
+
+struct epm_rhs_streettalk {
+ const char * streettalk;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+union epm_rhs {
+ struct epm_rhs_dnet_nsp dnet_nsp;/* [case(EPM_PROTOCOL_DNET_NSP)] */
+ struct epm_rhs_osi_tp4 osi_tp4;/* [case(EPM_PROTOCOL_OSI_TP4)] */
+ struct epm_rhs_osi_clns osi_clns;/* [case(EPM_PROTOCOL_OSI_CLNS)] */
+ struct epm_rhs_tcp tcp;/* [case(EPM_PROTOCOL_TCP)] */
+ struct epm_rhs_udp udp;/* [case(EPM_PROTOCOL_UDP)] */
+ struct epm_rhs_ip ip;/* [case(EPM_PROTOCOL_IP)] */
+ struct epm_rhs_ncadg ncadg;/* [case(EPM_PROTOCOL_NCADG)] */
+ struct epm_rhs_ncacn ncacn;/* [case(EPM_PROTOCOL_NCACN)] */
+ struct epm_rhs_ncalrpc ncalrpc;/* [case(EPM_PROTOCOL_NCALRPC)] */
+ struct epm_rhs_uuid uuid;/* [case(EPM_PROTOCOL_UUID)] */
+ struct epm_rhs_ipx ipx;/* [case(EPM_PROTOCOL_IPX)] */
+ struct epm_rhs_smb smb;/* [case(EPM_PROTOCOL_SMB)] */
+ struct epm_rhs_pipe pipe;/* [case(EPM_PROTOCOL_PIPE)] */
+ struct epm_rhs_netbios netbios;/* [case(EPM_PROTOCOL_NETBIOS)] */
+ struct epm_rhs_netbeui netbeui;/* [case(EPM_PROTOCOL_NETBEUI)] */
+ struct epm_rhs_spx spx;/* [case(EPM_PROTOCOL_SPX)] */
+ struct epm_rhs_nb_ipx nb_ipx;/* [case(EPM_PROTOCOL_NB_IPX)] */
+ struct epm_rhs_atalk_stream atalk_stream;/* [case(EPM_PROTOCOL_DSP)] */
+ struct epm_rhs_atalk_datagram atalk_datagram;/* [case(EPM_PROTOCOL_DDP)] */
+ struct epm_rhs_appletalk appletalk;/* [case(EPM_PROTOCOL_APPLETALK)] */
+ struct epm_rhs_vines_spp vines_spp;/* [case(EPM_PROTOCOL_VINES_SPP)] */
+ struct epm_rhs_vines_ipc vines_ipc;/* [case(EPM_PROTOCOL_VINES_IPC)] */
+ struct epm_rhs_streettalk streettalk;/* [case(EPM_PROTOCOL_STREETTALK)] */
+ struct epm_rhs_http http;/* [case(EPM_PROTOCOL_HTTP)] */
+ struct epm_rhs_unix_ds unix_ds;/* [case(EPM_PROTOCOL_UNIX_DS)] */
+ struct epm_rhs_null null;/* [case(EPM_PROTOCOL_NULL)] */
+ DATA_BLOB unknown;/* [default,flag(LIBNDR_FLAG_REMAINING)] */
+}/* [nodiscriminant,flag(LIBNDR_FLAG_BIGENDIAN)] */;
+
+struct epm_lhs {
+ enum epm_protocol protocol;
+ DATA_BLOB lhs_data;/* [flag(LIBNDR_FLAG_REMAINING)] */
+};
+
+struct epm_floor {
+ struct epm_lhs lhs;/* [subcontext(2)] */
+ union epm_rhs rhs;/* [subcontext(2),switch_is(lhs.protocol)] */
+};
+
+struct epm_tower {
+ uint16_t num_floors;
+ struct epm_floor *floors;
+}/* [gensize,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN)] */;
+
+struct epm_twr_t {
+ uint32_t tower_length;/* [value(ndr_size_epm_tower(&tower,ndr->flags))] */
+ struct epm_tower tower;/* [subcontext(4)] */
+};
+
+struct epm_entry_t {
+ struct GUID object;
+ struct epm_twr_t *tower;/* [ptr] */
+ const char * annotation;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4)] */
+};
+
+struct rpc_if_id_t {
+ struct GUID uuid;
+ uint16_t vers_major;
+ uint16_t vers_minor;
+};
+
+struct epm_twr_p_t {
+ struct epm_twr_t *twr;/* [ptr] */
+};
+
+
+struct epm_Insert {
+ struct {
+ uint32_t num_ents;
+ struct epm_entry_t *entries;/* [size_is(num_ents)] */
+ uint32_t replace;
+ } in;
+
+ struct {
+ uint32_t result;
+ } out;
+
+};
+
+
+struct epm_Delete {
+ struct {
+ uint32_t num_ents;
+ struct epm_entry_t *entries;/* [size_is(num_ents)] */
+ } in;
+
+ struct {
+ uint32_t result;
+ } out;
+
+};
+
+
+struct epm_Lookup {
+ struct {
+ uint32_t inquiry_type;
+ struct GUID *object;/* [ptr] */
+ struct rpc_if_id_t *interface_id;/* [ptr] */
+ uint32_t vers_option;
+ uint32_t max_ents;
+ struct policy_handle *entry_handle;/* [ref] */
+ } in;
+
+ struct {
+ uint32_t *num_ents;/* [ref] */
+ struct epm_entry_t *entries;/* [length_is(*num_ents),size_is(max_ents)] */
+ struct policy_handle *entry_handle;/* [ref] */
+ uint32_t result;
+ } out;
+
+};
+
+
+struct epm_Map {
+ struct {
+ struct GUID *object;/* [ptr] */
+ struct epm_twr_t *map_tower;/* [ptr] */
+ uint32_t max_towers;
+ struct policy_handle *entry_handle;/* [ref] */
+ } in;
+
+ struct {
+ uint32_t *num_towers;/* [ref] */
+ struct epm_twr_p_t *towers;/* [length_is(*num_towers),size_is(max_towers)] */
+ struct policy_handle *entry_handle;/* [ref] */
+ uint32_t result;
+ } out;
+
+};
+
+
+struct epm_LookupHandleFree {
+ struct {
+ struct policy_handle *entry_handle;/* [ref] */
+ } in;
+
+ struct {
+ struct policy_handle *entry_handle;/* [ref] */
+ uint32_t result;
+ } out;
+
+};
+
+
+struct epm_InqObject {
+ struct {
+ struct GUID *epm_object;/* [ref] */
+ } in;
+
+ struct {
+ uint32_t result;
+ } out;
+
+};
+
+
+struct epm_MgmtDelete {
+ struct {
+ uint32_t object_speced;
+ struct GUID *object;/* [ptr] */
+ struct epm_twr_t *tower;/* [ptr] */
+ } in;
+
+ struct {
+ uint32_t result;
+ } out;
+
+};
+
+
+struct epm_MapAuth {
+ struct {
+ uint32_t result;
+ } out;
+
+};
+
+#endif /* _HEADER_epmapper */
diff --git a/source3/librpc/gen_ndr/ndr_epmapper.c b/source3/librpc/gen_ndr/ndr_epmapper.c
new file mode 100644
index 0000000000..1ef21a414c
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_epmapper.c
@@ -0,0 +1,2686 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
+
+NTSTATUS ndr_push_epm_protocol(struct ndr_push *ndr, int ndr_flags, enum epm_protocol r)
+{
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_protocol(struct ndr_pull *ndr, int ndr_flags, enum epm_protocol *r)
+{
+ uint8_t v;
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_protocol(struct ndr_print *ndr, const char *name, enum epm_protocol r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case EPM_PROTOCOL_DNET_NSP: val = "EPM_PROTOCOL_DNET_NSP"; break;
+ case EPM_PROTOCOL_OSI_TP4: val = "EPM_PROTOCOL_OSI_TP4"; break;
+ case EPM_PROTOCOL_OSI_CLNS: val = "EPM_PROTOCOL_OSI_CLNS"; break;
+ case EPM_PROTOCOL_TCP: val = "EPM_PROTOCOL_TCP"; break;
+ case EPM_PROTOCOL_UDP: val = "EPM_PROTOCOL_UDP"; break;
+ case EPM_PROTOCOL_IP: val = "EPM_PROTOCOL_IP"; break;
+ case EPM_PROTOCOL_NCADG: val = "EPM_PROTOCOL_NCADG"; break;
+ case EPM_PROTOCOL_NCACN: val = "EPM_PROTOCOL_NCACN"; break;
+ case EPM_PROTOCOL_NCALRPC: val = "EPM_PROTOCOL_NCALRPC"; break;
+ case EPM_PROTOCOL_UUID: val = "EPM_PROTOCOL_UUID"; break;
+ case EPM_PROTOCOL_IPX: val = "EPM_PROTOCOL_IPX"; break;
+ case EPM_PROTOCOL_SMB: val = "EPM_PROTOCOL_SMB"; break;
+ case EPM_PROTOCOL_PIPE: val = "EPM_PROTOCOL_PIPE"; break;
+ case EPM_PROTOCOL_NETBIOS: val = "EPM_PROTOCOL_NETBIOS"; break;
+ case EPM_PROTOCOL_NETBEUI: val = "EPM_PROTOCOL_NETBEUI"; break;
+ case EPM_PROTOCOL_SPX: val = "EPM_PROTOCOL_SPX"; break;
+ case EPM_PROTOCOL_NB_IPX: val = "EPM_PROTOCOL_NB_IPX"; break;
+ case EPM_PROTOCOL_DSP: val = "EPM_PROTOCOL_DSP"; break;
+ case EPM_PROTOCOL_DDP: val = "EPM_PROTOCOL_DDP"; break;
+ case EPM_PROTOCOL_APPLETALK: val = "EPM_PROTOCOL_APPLETALK"; break;
+ case EPM_PROTOCOL_VINES_SPP: val = "EPM_PROTOCOL_VINES_SPP"; break;
+ case EPM_PROTOCOL_VINES_IPC: val = "EPM_PROTOCOL_VINES_IPC"; break;
+ case EPM_PROTOCOL_STREETTALK: val = "EPM_PROTOCOL_STREETTALK"; break;
+ case EPM_PROTOCOL_HTTP: val = "EPM_PROTOCOL_HTTP"; break;
+ case EPM_PROTOCOL_UNIX_DS: val = "EPM_PROTOCOL_UNIX_DS"; break;
+ case EPM_PROTOCOL_NULL: val = "EPM_PROTOCOL_NULL"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_epm_rhs_dnet_nsp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_dnet_nsp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_dnet_nsp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_dnet_nsp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_dnet_nsp(struct ndr_print *ndr, const char *name, const struct epm_rhs_dnet_nsp *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_dnet_nsp");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_osi_tp4(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_tp4 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_osi_tp4(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_tp4 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_osi_tp4(struct ndr_print *ndr, const char *name, const struct epm_rhs_osi_tp4 *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_osi_tp4");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_osi_clns(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_clns *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_osi_clns(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_clns *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_osi_clns(struct ndr_print *ndr, const char *name, const struct epm_rhs_osi_clns *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_osi_clns");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_udp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_udp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_udp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_udp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_udp(struct ndr_print *ndr, const char *name, const struct epm_rhs_udp *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_udp");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "port", r->port);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_tcp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_tcp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_tcp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_tcp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_tcp(struct ndr_print *ndr, const char *name, const struct epm_rhs_tcp *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_tcp");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "port", r->port);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_ip(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ip *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipaddr));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_ip(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ip *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipaddr));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_ip(struct ndr_print *ndr, const char *name, const struct epm_rhs_ip *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_ip");
+ ndr->depth++;
+ ndr_print_ipv4address(ndr, "ipaddr", r->ipaddr);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_ncadg(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncadg *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_ncadg(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncadg *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_ncadg(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncadg *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_ncadg");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "minor_version", r->minor_version);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_ncacn(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncacn *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_ncacn(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncacn *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_ncacn(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncacn *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_ncacn");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "minor_version", r->minor_version);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_uuid(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_uuid *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->unknown));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_uuid(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_uuid *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->unknown));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_uuid(struct ndr_print *ndr, const char *name, const struct epm_rhs_uuid *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_uuid");
+ ndr->depth++;
+ ndr_print_DATA_BLOB(ndr, "unknown", r->unknown);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ipx *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ipx *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_ipx(struct ndr_print *ndr, const char *name, const struct epm_rhs_ipx *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_ipx");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_smb(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_smb *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unc));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_smb(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_smb *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unc));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_smb(struct ndr_print *ndr, const char *name, const struct epm_rhs_smb *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_smb");
+ ndr->depth++;
+ ndr_print_string(ndr, "unc", r->unc);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_pipe(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_pipe *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_pipe(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_pipe *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_pipe(struct ndr_print *ndr, const char *name, const struct epm_rhs_pipe *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_pipe");
+ ndr->depth++;
+ ndr_print_string(ndr, "path", r->path);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_netbios(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbios *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_netbios(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbios *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_netbios(struct ndr_print *ndr, const char *name, const struct epm_rhs_netbios *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_netbios");
+ ndr->depth++;
+ ndr_print_string(ndr, "name", r->name);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_netbeui(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbeui *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_netbeui(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbeui *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_netbeui(struct ndr_print *ndr, const char *name, const struct epm_rhs_netbeui *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_netbeui");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_spx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_spx *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_spx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_spx *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_spx(struct ndr_print *ndr, const char *name, const struct epm_rhs_spx *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_spx");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_nb_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_nb_ipx *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_nb_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_nb_ipx *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_nb_ipx(struct ndr_print *ndr, const char *name, const struct epm_rhs_nb_ipx *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_nb_ipx");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_http(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_http *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_http(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_http *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_http(struct ndr_print *ndr, const char *name, const struct epm_rhs_http *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_http");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "port", r->port);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_unix_ds(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_unix_ds *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_unix_ds(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_unix_ds *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_unix_ds(struct ndr_print *ndr, const char *name, const struct epm_rhs_unix_ds *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_unix_ds");
+ ndr->depth++;
+ ndr_print_string(ndr, "path", r->path);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_null(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_null *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_null(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_null *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_null(struct ndr_print *ndr, const char *name, const struct epm_rhs_null *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_null");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_ncalrpc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncalrpc *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_ncalrpc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncalrpc *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_ncalrpc(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncalrpc *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_ncalrpc");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "minor_version", r->minor_version);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_appletalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_appletalk *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_appletalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_appletalk *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_appletalk(struct ndr_print *ndr, const char *name, const struct epm_rhs_appletalk *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_appletalk");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_atalk_stream(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_stream *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_atalk_stream(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_stream *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_atalk_stream(struct ndr_print *ndr, const char *name, const struct epm_rhs_atalk_stream *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_atalk_stream");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_atalk_datagram(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_datagram *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_atalk_datagram(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_datagram *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_atalk_datagram(struct ndr_print *ndr, const char *name, const struct epm_rhs_atalk_datagram *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_atalk_datagram");
+ ndr->depth++;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_vines_spp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_spp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_vines_spp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_spp *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_vines_spp(struct ndr_print *ndr, const char *name, const struct epm_rhs_vines_spp *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_vines_spp");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "port", r->port);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_vines_ipc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_ipc *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_vines_ipc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_ipc *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_vines_ipc(struct ndr_print *ndr, const char *name, const struct epm_rhs_vines_ipc *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_vines_ipc");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "port", r->port);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs_streettalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_streettalk *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->streettalk));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs_streettalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_streettalk *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->streettalk));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs_streettalk(struct ndr_print *ndr, const char *name, const struct epm_rhs_streettalk *r)
+{
+ ndr_print_struct(ndr, name, "epm_rhs_streettalk");
+ ndr->depth++;
+ ndr_print_string(ndr, "streettalk", r->streettalk);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_rhs(struct ndr_push *ndr, int ndr_flags, const union epm_rhs *r)
+{
+ {
+ uint32_t _flags_save_UNION = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case EPM_PROTOCOL_DNET_NSP:
+ NDR_CHECK(ndr_push_epm_rhs_dnet_nsp(ndr, NDR_SCALARS, &r->dnet_nsp));
+ break;
+
+ case EPM_PROTOCOL_OSI_TP4:
+ NDR_CHECK(ndr_push_epm_rhs_osi_tp4(ndr, NDR_SCALARS, &r->osi_tp4));
+ break;
+
+ case EPM_PROTOCOL_OSI_CLNS:
+ NDR_CHECK(ndr_push_epm_rhs_osi_clns(ndr, NDR_SCALARS, &r->osi_clns));
+ break;
+
+ case EPM_PROTOCOL_TCP:
+ NDR_CHECK(ndr_push_epm_rhs_tcp(ndr, NDR_SCALARS, &r->tcp));
+ break;
+
+ case EPM_PROTOCOL_UDP:
+ NDR_CHECK(ndr_push_epm_rhs_udp(ndr, NDR_SCALARS, &r->udp));
+ break;
+
+ case EPM_PROTOCOL_IP:
+ NDR_CHECK(ndr_push_epm_rhs_ip(ndr, NDR_SCALARS, &r->ip));
+ break;
+
+ case EPM_PROTOCOL_NCADG:
+ NDR_CHECK(ndr_push_epm_rhs_ncadg(ndr, NDR_SCALARS, &r->ncadg));
+ break;
+
+ case EPM_PROTOCOL_NCACN:
+ NDR_CHECK(ndr_push_epm_rhs_ncacn(ndr, NDR_SCALARS, &r->ncacn));
+ break;
+
+ case EPM_PROTOCOL_NCALRPC:
+ NDR_CHECK(ndr_push_epm_rhs_ncalrpc(ndr, NDR_SCALARS, &r->ncalrpc));
+ break;
+
+ case EPM_PROTOCOL_UUID:
+ NDR_CHECK(ndr_push_epm_rhs_uuid(ndr, NDR_SCALARS, &r->uuid));
+ break;
+
+ case EPM_PROTOCOL_IPX:
+ NDR_CHECK(ndr_push_epm_rhs_ipx(ndr, NDR_SCALARS, &r->ipx));
+ break;
+
+ case EPM_PROTOCOL_SMB:
+ NDR_CHECK(ndr_push_epm_rhs_smb(ndr, NDR_SCALARS, &r->smb));
+ break;
+
+ case EPM_PROTOCOL_PIPE:
+ NDR_CHECK(ndr_push_epm_rhs_pipe(ndr, NDR_SCALARS, &r->pipe));
+ break;
+
+ case EPM_PROTOCOL_NETBIOS:
+ NDR_CHECK(ndr_push_epm_rhs_netbios(ndr, NDR_SCALARS, &r->netbios));
+ break;
+
+ case EPM_PROTOCOL_NETBEUI:
+ NDR_CHECK(ndr_push_epm_rhs_netbeui(ndr, NDR_SCALARS, &r->netbeui));
+ break;
+
+ case EPM_PROTOCOL_SPX:
+ NDR_CHECK(ndr_push_epm_rhs_spx(ndr, NDR_SCALARS, &r->spx));
+ break;
+
+ case EPM_PROTOCOL_NB_IPX:
+ NDR_CHECK(ndr_push_epm_rhs_nb_ipx(ndr, NDR_SCALARS, &r->nb_ipx));
+ break;
+
+ case EPM_PROTOCOL_DSP:
+ NDR_CHECK(ndr_push_epm_rhs_atalk_stream(ndr, NDR_SCALARS, &r->atalk_stream));
+ break;
+
+ case EPM_PROTOCOL_DDP:
+ NDR_CHECK(ndr_push_epm_rhs_atalk_datagram(ndr, NDR_SCALARS, &r->atalk_datagram));
+ break;
+
+ case EPM_PROTOCOL_APPLETALK:
+ NDR_CHECK(ndr_push_epm_rhs_appletalk(ndr, NDR_SCALARS, &r->appletalk));
+ break;
+
+ case EPM_PROTOCOL_VINES_SPP:
+ NDR_CHECK(ndr_push_epm_rhs_vines_spp(ndr, NDR_SCALARS, &r->vines_spp));
+ break;
+
+ case EPM_PROTOCOL_VINES_IPC:
+ NDR_CHECK(ndr_push_epm_rhs_vines_ipc(ndr, NDR_SCALARS, &r->vines_ipc));
+ break;
+
+ case EPM_PROTOCOL_STREETTALK:
+ NDR_CHECK(ndr_push_epm_rhs_streettalk(ndr, NDR_SCALARS, &r->streettalk));
+ break;
+
+ case EPM_PROTOCOL_HTTP:
+ NDR_CHECK(ndr_push_epm_rhs_http(ndr, NDR_SCALARS, &r->http));
+ break;
+
+ case EPM_PROTOCOL_UNIX_DS:
+ NDR_CHECK(ndr_push_epm_rhs_unix_ds(ndr, NDR_SCALARS, &r->unix_ds));
+ break;
+
+ case EPM_PROTOCOL_NULL:
+ NDR_CHECK(ndr_push_epm_rhs_null(ndr, NDR_SCALARS, &r->null));
+ break;
+
+ default:
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->unknown));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case EPM_PROTOCOL_DNET_NSP:
+ break;
+
+ case EPM_PROTOCOL_OSI_TP4:
+ break;
+
+ case EPM_PROTOCOL_OSI_CLNS:
+ break;
+
+ case EPM_PROTOCOL_TCP:
+ break;
+
+ case EPM_PROTOCOL_UDP:
+ break;
+
+ case EPM_PROTOCOL_IP:
+ break;
+
+ case EPM_PROTOCOL_NCADG:
+ break;
+
+ case EPM_PROTOCOL_NCACN:
+ break;
+
+ case EPM_PROTOCOL_NCALRPC:
+ break;
+
+ case EPM_PROTOCOL_UUID:
+ break;
+
+ case EPM_PROTOCOL_IPX:
+ break;
+
+ case EPM_PROTOCOL_SMB:
+ break;
+
+ case EPM_PROTOCOL_PIPE:
+ break;
+
+ case EPM_PROTOCOL_NETBIOS:
+ break;
+
+ case EPM_PROTOCOL_NETBEUI:
+ break;
+
+ case EPM_PROTOCOL_SPX:
+ break;
+
+ case EPM_PROTOCOL_NB_IPX:
+ break;
+
+ case EPM_PROTOCOL_DSP:
+ break;
+
+ case EPM_PROTOCOL_DDP:
+ break;
+
+ case EPM_PROTOCOL_APPLETALK:
+ break;
+
+ case EPM_PROTOCOL_VINES_SPP:
+ break;
+
+ case EPM_PROTOCOL_VINES_IPC:
+ break;
+
+ case EPM_PROTOCOL_STREETTALK:
+ break;
+
+ case EPM_PROTOCOL_HTTP:
+ break;
+
+ case EPM_PROTOCOL_UNIX_DS:
+ break;
+
+ case EPM_PROTOCOL_NULL:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr->flags = _flags_save_UNION;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_rhs(struct ndr_pull *ndr, int ndr_flags, union epm_rhs *r)
+{
+ int level;
+ {
+ uint32_t _flags_save_UNION = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case EPM_PROTOCOL_DNET_NSP: {
+ NDR_CHECK(ndr_pull_epm_rhs_dnet_nsp(ndr, NDR_SCALARS, &r->dnet_nsp));
+ break; }
+
+ case EPM_PROTOCOL_OSI_TP4: {
+ NDR_CHECK(ndr_pull_epm_rhs_osi_tp4(ndr, NDR_SCALARS, &r->osi_tp4));
+ break; }
+
+ case EPM_PROTOCOL_OSI_CLNS: {
+ NDR_CHECK(ndr_pull_epm_rhs_osi_clns(ndr, NDR_SCALARS, &r->osi_clns));
+ break; }
+
+ case EPM_PROTOCOL_TCP: {
+ NDR_CHECK(ndr_pull_epm_rhs_tcp(ndr, NDR_SCALARS, &r->tcp));
+ break; }
+
+ case EPM_PROTOCOL_UDP: {
+ NDR_CHECK(ndr_pull_epm_rhs_udp(ndr, NDR_SCALARS, &r->udp));
+ break; }
+
+ case EPM_PROTOCOL_IP: {
+ NDR_CHECK(ndr_pull_epm_rhs_ip(ndr, NDR_SCALARS, &r->ip));
+ break; }
+
+ case EPM_PROTOCOL_NCADG: {
+ NDR_CHECK(ndr_pull_epm_rhs_ncadg(ndr, NDR_SCALARS, &r->ncadg));
+ break; }
+
+ case EPM_PROTOCOL_NCACN: {
+ NDR_CHECK(ndr_pull_epm_rhs_ncacn(ndr, NDR_SCALARS, &r->ncacn));
+ break; }
+
+ case EPM_PROTOCOL_NCALRPC: {
+ NDR_CHECK(ndr_pull_epm_rhs_ncalrpc(ndr, NDR_SCALARS, &r->ncalrpc));
+ break; }
+
+ case EPM_PROTOCOL_UUID: {
+ NDR_CHECK(ndr_pull_epm_rhs_uuid(ndr, NDR_SCALARS, &r->uuid));
+ break; }
+
+ case EPM_PROTOCOL_IPX: {
+ NDR_CHECK(ndr_pull_epm_rhs_ipx(ndr, NDR_SCALARS, &r->ipx));
+ break; }
+
+ case EPM_PROTOCOL_SMB: {
+ NDR_CHECK(ndr_pull_epm_rhs_smb(ndr, NDR_SCALARS, &r->smb));
+ break; }
+
+ case EPM_PROTOCOL_PIPE: {
+ NDR_CHECK(ndr_pull_epm_rhs_pipe(ndr, NDR_SCALARS, &r->pipe));
+ break; }
+
+ case EPM_PROTOCOL_NETBIOS: {
+ NDR_CHECK(ndr_pull_epm_rhs_netbios(ndr, NDR_SCALARS, &r->netbios));
+ break; }
+
+ case EPM_PROTOCOL_NETBEUI: {
+ NDR_CHECK(ndr_pull_epm_rhs_netbeui(ndr, NDR_SCALARS, &r->netbeui));
+ break; }
+
+ case EPM_PROTOCOL_SPX: {
+ NDR_CHECK(ndr_pull_epm_rhs_spx(ndr, NDR_SCALARS, &r->spx));
+ break; }
+
+ case EPM_PROTOCOL_NB_IPX: {
+ NDR_CHECK(ndr_pull_epm_rhs_nb_ipx(ndr, NDR_SCALARS, &r->nb_ipx));
+ break; }
+
+ case EPM_PROTOCOL_DSP: {
+ NDR_CHECK(ndr_pull_epm_rhs_atalk_stream(ndr, NDR_SCALARS, &r->atalk_stream));
+ break; }
+
+ case EPM_PROTOCOL_DDP: {
+ NDR_CHECK(ndr_pull_epm_rhs_atalk_datagram(ndr, NDR_SCALARS, &r->atalk_datagram));
+ break; }
+
+ case EPM_PROTOCOL_APPLETALK: {
+ NDR_CHECK(ndr_pull_epm_rhs_appletalk(ndr, NDR_SCALARS, &r->appletalk));
+ break; }
+
+ case EPM_PROTOCOL_VINES_SPP: {
+ NDR_CHECK(ndr_pull_epm_rhs_vines_spp(ndr, NDR_SCALARS, &r->vines_spp));
+ break; }
+
+ case EPM_PROTOCOL_VINES_IPC: {
+ NDR_CHECK(ndr_pull_epm_rhs_vines_ipc(ndr, NDR_SCALARS, &r->vines_ipc));
+ break; }
+
+ case EPM_PROTOCOL_STREETTALK: {
+ NDR_CHECK(ndr_pull_epm_rhs_streettalk(ndr, NDR_SCALARS, &r->streettalk));
+ break; }
+
+ case EPM_PROTOCOL_HTTP: {
+ NDR_CHECK(ndr_pull_epm_rhs_http(ndr, NDR_SCALARS, &r->http));
+ break; }
+
+ case EPM_PROTOCOL_UNIX_DS: {
+ NDR_CHECK(ndr_pull_epm_rhs_unix_ds(ndr, NDR_SCALARS, &r->unix_ds));
+ break; }
+
+ case EPM_PROTOCOL_NULL: {
+ NDR_CHECK(ndr_pull_epm_rhs_null(ndr, NDR_SCALARS, &r->null));
+ break; }
+
+ default: {
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->unknown));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case EPM_PROTOCOL_DNET_NSP:
+ break;
+
+ case EPM_PROTOCOL_OSI_TP4:
+ break;
+
+ case EPM_PROTOCOL_OSI_CLNS:
+ break;
+
+ case EPM_PROTOCOL_TCP:
+ break;
+
+ case EPM_PROTOCOL_UDP:
+ break;
+
+ case EPM_PROTOCOL_IP:
+ break;
+
+ case EPM_PROTOCOL_NCADG:
+ break;
+
+ case EPM_PROTOCOL_NCACN:
+ break;
+
+ case EPM_PROTOCOL_NCALRPC:
+ break;
+
+ case EPM_PROTOCOL_UUID:
+ break;
+
+ case EPM_PROTOCOL_IPX:
+ break;
+
+ case EPM_PROTOCOL_SMB:
+ break;
+
+ case EPM_PROTOCOL_PIPE:
+ break;
+
+ case EPM_PROTOCOL_NETBIOS:
+ break;
+
+ case EPM_PROTOCOL_NETBEUI:
+ break;
+
+ case EPM_PROTOCOL_SPX:
+ break;
+
+ case EPM_PROTOCOL_NB_IPX:
+ break;
+
+ case EPM_PROTOCOL_DSP:
+ break;
+
+ case EPM_PROTOCOL_DDP:
+ break;
+
+ case EPM_PROTOCOL_APPLETALK:
+ break;
+
+ case EPM_PROTOCOL_VINES_SPP:
+ break;
+
+ case EPM_PROTOCOL_VINES_IPC:
+ break;
+
+ case EPM_PROTOCOL_STREETTALK:
+ break;
+
+ case EPM_PROTOCOL_HTTP:
+ break;
+
+ case EPM_PROTOCOL_UNIX_DS:
+ break;
+
+ case EPM_PROTOCOL_NULL:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ ndr->flags = _flags_save_UNION;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_rhs(struct ndr_print *ndr, const char *name, const union epm_rhs *r)
+{
+ int level;
+ {
+ uint32_t _flags_save_UNION = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "epm_rhs");
+ switch (level) {
+ case EPM_PROTOCOL_DNET_NSP:
+ ndr_print_epm_rhs_dnet_nsp(ndr, "dnet_nsp", &r->dnet_nsp);
+ break;
+
+ case EPM_PROTOCOL_OSI_TP4:
+ ndr_print_epm_rhs_osi_tp4(ndr, "osi_tp4", &r->osi_tp4);
+ break;
+
+ case EPM_PROTOCOL_OSI_CLNS:
+ ndr_print_epm_rhs_osi_clns(ndr, "osi_clns", &r->osi_clns);
+ break;
+
+ case EPM_PROTOCOL_TCP:
+ ndr_print_epm_rhs_tcp(ndr, "tcp", &r->tcp);
+ break;
+
+ case EPM_PROTOCOL_UDP:
+ ndr_print_epm_rhs_udp(ndr, "udp", &r->udp);
+ break;
+
+ case EPM_PROTOCOL_IP:
+ ndr_print_epm_rhs_ip(ndr, "ip", &r->ip);
+ break;
+
+ case EPM_PROTOCOL_NCADG:
+ ndr_print_epm_rhs_ncadg(ndr, "ncadg", &r->ncadg);
+ break;
+
+ case EPM_PROTOCOL_NCACN:
+ ndr_print_epm_rhs_ncacn(ndr, "ncacn", &r->ncacn);
+ break;
+
+ case EPM_PROTOCOL_NCALRPC:
+ ndr_print_epm_rhs_ncalrpc(ndr, "ncalrpc", &r->ncalrpc);
+ break;
+
+ case EPM_PROTOCOL_UUID:
+ ndr_print_epm_rhs_uuid(ndr, "uuid", &r->uuid);
+ break;
+
+ case EPM_PROTOCOL_IPX:
+ ndr_print_epm_rhs_ipx(ndr, "ipx", &r->ipx);
+ break;
+
+ case EPM_PROTOCOL_SMB:
+ ndr_print_epm_rhs_smb(ndr, "smb", &r->smb);
+ break;
+
+ case EPM_PROTOCOL_PIPE:
+ ndr_print_epm_rhs_pipe(ndr, "pipe", &r->pipe);
+ break;
+
+ case EPM_PROTOCOL_NETBIOS:
+ ndr_print_epm_rhs_netbios(ndr, "netbios", &r->netbios);
+ break;
+
+ case EPM_PROTOCOL_NETBEUI:
+ ndr_print_epm_rhs_netbeui(ndr, "netbeui", &r->netbeui);
+ break;
+
+ case EPM_PROTOCOL_SPX:
+ ndr_print_epm_rhs_spx(ndr, "spx", &r->spx);
+ break;
+
+ case EPM_PROTOCOL_NB_IPX:
+ ndr_print_epm_rhs_nb_ipx(ndr, "nb_ipx", &r->nb_ipx);
+ break;
+
+ case EPM_PROTOCOL_DSP:
+ ndr_print_epm_rhs_atalk_stream(ndr, "atalk_stream", &r->atalk_stream);
+ break;
+
+ case EPM_PROTOCOL_DDP:
+ ndr_print_epm_rhs_atalk_datagram(ndr, "atalk_datagram", &r->atalk_datagram);
+ break;
+
+ case EPM_PROTOCOL_APPLETALK:
+ ndr_print_epm_rhs_appletalk(ndr, "appletalk", &r->appletalk);
+ break;
+
+ case EPM_PROTOCOL_VINES_SPP:
+ ndr_print_epm_rhs_vines_spp(ndr, "vines_spp", &r->vines_spp);
+ break;
+
+ case EPM_PROTOCOL_VINES_IPC:
+ ndr_print_epm_rhs_vines_ipc(ndr, "vines_ipc", &r->vines_ipc);
+ break;
+
+ case EPM_PROTOCOL_STREETTALK:
+ ndr_print_epm_rhs_streettalk(ndr, "streettalk", &r->streettalk);
+ break;
+
+ case EPM_PROTOCOL_HTTP:
+ ndr_print_epm_rhs_http(ndr, "http", &r->http);
+ break;
+
+ case EPM_PROTOCOL_UNIX_DS:
+ ndr_print_epm_rhs_unix_ds(ndr, "unix_ds", &r->unix_ds);
+ break;
+
+ case EPM_PROTOCOL_NULL:
+ ndr_print_epm_rhs_null(ndr, "null", &r->null);
+ break;
+
+ default:
+ ndr_print_DATA_BLOB(ndr, "unknown", r->unknown);
+ break;
+
+ }
+ ndr->flags = _flags_save_UNION;
+ }
+}
+
+NTSTATUS ndr_push_epm_lhs(struct ndr_push *ndr, int ndr_flags, const struct epm_lhs *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_epm_protocol(ndr, NDR_SCALARS, r->protocol));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->lhs_data));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_lhs(struct ndr_pull *ndr, int ndr_flags, struct epm_lhs *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_epm_protocol(ndr, NDR_SCALARS, &r->protocol));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->lhs_data));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_lhs(struct ndr_print *ndr, const char *name, const struct epm_lhs *r)
+{
+ ndr_print_struct(ndr, name, "epm_lhs");
+ ndr->depth++;
+ ndr_print_epm_protocol(ndr, "protocol", r->protocol);
+ ndr_print_DATA_BLOB(ndr, "lhs_data", r->lhs_data);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_floor(struct ndr_push *ndr, int ndr_flags, const struct epm_floor *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ {
+ struct ndr_push *_ndr_lhs;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_lhs, 2, -1));
+ NDR_CHECK(ndr_push_epm_lhs(_ndr_lhs, NDR_SCALARS, &r->lhs));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_lhs, 2, -1));
+ }
+ {
+ struct ndr_push *_ndr_rhs;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_rhs, 2, -1));
+ NDR_CHECK(ndr_push_set_switch_value(_ndr_rhs, &r->rhs, r->lhs.protocol));
+ NDR_CHECK(ndr_push_epm_rhs(_ndr_rhs, NDR_SCALARS, &r->rhs));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_rhs, 2, -1));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_floor(struct ndr_pull *ndr, int ndr_flags, struct epm_floor *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ {
+ struct ndr_pull *_ndr_lhs;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_lhs, 2, -1));
+ NDR_CHECK(ndr_pull_epm_lhs(_ndr_lhs, NDR_SCALARS, &r->lhs));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_lhs, 2, -1));
+ }
+ {
+ struct ndr_pull *_ndr_rhs;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_rhs, 2, -1));
+ NDR_CHECK(ndr_pull_set_switch_value(_ndr_rhs, &r->rhs, r->lhs.protocol));
+ NDR_CHECK(ndr_pull_epm_rhs(_ndr_rhs, NDR_SCALARS, &r->rhs));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_rhs, 2, -1));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_floor(struct ndr_print *ndr, const char *name, const struct epm_floor *r)
+{
+ ndr_print_struct(ndr, name, "epm_floor");
+ ndr->depth++;
+ ndr_print_epm_lhs(ndr, "lhs", &r->lhs);
+ ndr_print_set_switch_value(ndr, &r->rhs, r->lhs.protocol);
+ ndr_print_epm_rhs(ndr, "rhs", &r->rhs);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_tower(struct ndr_push *ndr, int ndr_flags, const struct epm_tower *r)
+{
+ uint32_t cntr_floors_0;
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_floors));
+ for (cntr_floors_0 = 0; cntr_floors_0 < r->num_floors; cntr_floors_0++) {
+ NDR_CHECK(ndr_push_epm_floor(ndr, NDR_SCALARS, &r->floors[cntr_floors_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_tower(struct ndr_pull *ndr, int ndr_flags, struct epm_tower *r)
+{
+ uint32_t cntr_floors_0;
+ TALLOC_CTX *_mem_save_floors_0;
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_floors));
+ NDR_PULL_ALLOC_N(ndr, r->floors, r->num_floors);
+ _mem_save_floors_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->floors, 0);
+ for (cntr_floors_0 = 0; cntr_floors_0 < r->num_floors; cntr_floors_0++) {
+ NDR_CHECK(ndr_pull_epm_floor(ndr, NDR_SCALARS, &r->floors[cntr_floors_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_floors_0, 0);
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const struct epm_tower *r)
+{
+ uint32_t cntr_floors_0;
+ ndr_print_struct(ndr, name, "epm_tower");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN);
+ ndr->depth++;
+ ndr_print_uint16(ndr, "num_floors", r->num_floors);
+ ndr->print(ndr, "%s: ARRAY(%d)", "floors", r->num_floors);
+ ndr->depth++;
+ for (cntr_floors_0=0;cntr_floors_0<r->num_floors;cntr_floors_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_floors_0);
+ if (idx_0) {
+ ndr_print_epm_floor(ndr, "floors", &r->floors[cntr_floors_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+size_t ndr_size_epm_tower(const struct epm_tower *r, int flags)
+{
+ flags |= LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN;
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_epm_tower);
+}
+
+NTSTATUS ndr_push_epm_twr_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_t *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_epm_tower(&r->tower, ndr->flags)));
+ {
+ struct ndr_push *_ndr_tower;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_tower, 4, -1));
+ NDR_CHECK(ndr_push_epm_tower(_ndr_tower, NDR_SCALARS, &r->tower));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_tower, 4, -1));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_twr_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_t *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tower_length));
+ {
+ struct ndr_pull *_ndr_tower;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_tower, 4, -1));
+ NDR_CHECK(ndr_pull_epm_tower(_ndr_tower, NDR_SCALARS, &r->tower));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_tower, 4, -1));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_twr_t(struct ndr_print *ndr, const char *name, const struct epm_twr_t *r)
+{
+ ndr_print_struct(ndr, name, "epm_twr_t");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "tower_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_epm_tower(&r->tower, ndr->flags):r->tower_length);
+ ndr_print_epm_tower(ndr, "tower", &r->tower);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flags, const struct epm_entry_t *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->tower));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->annotation));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->object));
+ if (r->tower) {
+ NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->tower));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flags, struct epm_entry_t *r)
+{
+ uint32_t _ptr_tower;
+ TALLOC_CTX *_mem_save_tower_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->object));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tower));
+ if (_ptr_tower) {
+ NDR_PULL_ALLOC(ndr, r->tower);
+ } else {
+ r->tower = NULL;
+ }
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->annotation));
+ ndr->flags = _flags_save_string;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->object));
+ if (r->tower) {
+ _mem_save_tower_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->tower, 0);
+ NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->tower));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tower_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_entry_t(struct ndr_print *ndr, const char *name, const struct epm_entry_t *r)
+{
+ ndr_print_struct(ndr, name, "epm_entry_t");
+ ndr->depth++;
+ ndr_print_GUID(ndr, "object", &r->object);
+ ndr_print_ptr(ndr, "tower", r->tower);
+ ndr->depth++;
+ if (r->tower) {
+ ndr_print_epm_twr_t(ndr, "tower", r->tower);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "annotation", r->annotation);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_rpc_if_id_t(struct ndr_push *ndr, int ndr_flags, const struct rpc_if_id_t *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vers_major));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vers_minor));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->uuid));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_rpc_if_id_t(struct ndr_pull *ndr, int ndr_flags, struct rpc_if_id_t *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vers_major));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vers_minor));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->uuid));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_rpc_if_id_t(struct ndr_print *ndr, const char *name, const struct rpc_if_id_t *r)
+{
+ ndr_print_struct(ndr, name, "rpc_if_id_t");
+ ndr->depth++;
+ ndr_print_GUID(ndr, "uuid", &r->uuid);
+ ndr_print_uint16(ndr, "vers_major", r->vers_major);
+ ndr_print_uint16(ndr, "vers_minor", r->vers_minor);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_twr_p_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_p_t *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->twr));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->twr) {
+ NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->twr));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_twr_p_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_p_t *r)
+{
+ uint32_t _ptr_twr;
+ TALLOC_CTX *_mem_save_twr_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_twr));
+ if (_ptr_twr) {
+ NDR_PULL_ALLOC(ndr, r->twr);
+ } else {
+ r->twr = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->twr) {
+ _mem_save_twr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->twr, 0);
+ NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->twr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_twr_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_twr_p_t(struct ndr_print *ndr, const char *name, const struct epm_twr_p_t *r)
+{
+ ndr_print_struct(ndr, name, "epm_twr_p_t");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "twr", r->twr);
+ ndr->depth++;
+ if (r->twr) {
+ ndr_print_epm_twr_t(ndr, "twr", r->twr);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_Insert(struct ndr_push *ndr, int flags, const struct epm_Insert *r)
+{
+ uint32_t cntr_entries_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
+ }
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.replace));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_Insert(struct ndr_pull *ndr, int flags, struct epm_Insert *r)
+{
+ uint32_t cntr_entries_0;
+ TALLOC_CTX *_mem_save_entries_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_ents));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.entries));
+ NDR_PULL_ALLOC_N(ndr, r->in.entries, ndr_get_array_size(ndr, &r->in.entries));
+ _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.entries, 0);
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
+ }
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.replace));
+ if (r->in.entries) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.entries, r->in.num_ents));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_Insert(struct ndr_print *ndr, const char *name, int flags, const struct epm_Insert *r)
+{
+ uint32_t cntr_entries_0;
+ ndr_print_struct(ndr, name, "epm_Insert");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_Insert");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_ents", r->in.num_ents);
+ ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->in.num_ents);
+ ndr->depth++;
+ for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_entries_0);
+ if (idx_0) {
+ ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "replace", r->in.replace);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_Insert");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_Delete(struct ndr_push *ndr, int flags, const struct epm_Delete *r)
+{
+ uint32_t cntr_entries_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
+ }
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_Delete(struct ndr_pull *ndr, int flags, struct epm_Delete *r)
+{
+ uint32_t cntr_entries_0;
+ TALLOC_CTX *_mem_save_entries_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_ents));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.entries));
+ NDR_PULL_ALLOC_N(ndr, r->in.entries, ndr_get_array_size(ndr, &r->in.entries));
+ _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.entries, 0);
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
+ }
+ for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
+ if (r->in.entries) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.entries, r->in.num_ents));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_Delete(struct ndr_print *ndr, const char *name, int flags, const struct epm_Delete *r)
+{
+ uint32_t cntr_entries_0;
+ ndr_print_struct(ndr, name, "epm_Delete");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_Delete");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_ents", r->in.num_ents);
+ ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->in.num_ents);
+ ndr->depth++;
+ for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_entries_0);
+ if (idx_0) {
+ ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_Delete");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_Lookup(struct ndr_push *ndr, int flags, const struct epm_Lookup *r)
+{
+ uint32_t cntr_entries_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.inquiry_type));
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object));
+ if (r->in.object) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object));
+ }
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->in.interface_id));
+ if (r->in.interface_id) {
+ NDR_CHECK(ndr_push_rpc_if_id_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.interface_id));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.vers_option));
+ if (r->in.entry_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_ents));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.entry_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle));
+ if (r->out.num_ents == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ents));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_ents));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ents));
+ for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_SCALARS, &r->out.entries[cntr_entries_0]));
+ }
+ for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_BUFFERS, &r->out.entries[cntr_entries_0]));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, struct epm_Lookup *r)
+{
+ uint32_t _ptr_object;
+ uint32_t _ptr_interface_id;
+ uint32_t cntr_entries_0;
+ TALLOC_CTX *_mem_save_object_0;
+ TALLOC_CTX *_mem_save_interface_id_0;
+ TALLOC_CTX *_mem_save_entry_handle_0;
+ TALLOC_CTX *_mem_save_num_ents_0;
+ TALLOC_CTX *_mem_save_entries_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.inquiry_type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object));
+ if (_ptr_object) {
+ NDR_PULL_ALLOC(ndr, r->in.object);
+ } else {
+ r->in.object = NULL;
+ }
+ if (r->in.object) {
+ _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0);
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_interface_id));
+ if (_ptr_interface_id) {
+ NDR_PULL_ALLOC(ndr, r->in.interface_id);
+ } else {
+ r->in.interface_id = NULL;
+ }
+ if (r->in.interface_id) {
+ _mem_save_interface_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.interface_id, 0);
+ NDR_CHECK(ndr_pull_rpc_if_id_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.interface_id));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_interface_id_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.vers_option));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.entry_handle);
+ }
+ _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_ents));
+ NDR_PULL_ALLOC(ndr, r->out.entry_handle);
+ *r->out.entry_handle = *r->in.entry_handle;
+ NDR_PULL_ALLOC(ndr, r->out.num_ents);
+ ZERO_STRUCTP(r->out.num_ents);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.entry_handle);
+ }
+ _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.num_ents);
+ }
+ _mem_save_num_ents_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.num_ents, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_ents));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ents_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.entries));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->out.entries));
+ if (ndr_get_array_length(ndr, &r->out.entries) > ndr_get_array_size(ndr, &r->out.entries)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.entries), ndr_get_array_length(ndr, &r->out.entries));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.entries, ndr_get_array_size(ndr, &r->out.entries));
+ _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.entries, 0);
+ for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_SCALARS, &r->out.entries[cntr_entries_0]));
+ }
+ for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
+ NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_BUFFERS, &r->out.entries[cntr_entries_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.entries) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.entries, r->in.max_ents));
+ }
+ if (r->out.entries) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.entries, *r->out.num_ents));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_Lookup(struct ndr_print *ndr, const char *name, int flags, const struct epm_Lookup *r)
+{
+ uint32_t cntr_entries_0;
+ ndr_print_struct(ndr, name, "epm_Lookup");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_Lookup");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "inquiry_type", r->in.inquiry_type);
+ ndr_print_ptr(ndr, "object", r->in.object);
+ ndr->depth++;
+ if (r->in.object) {
+ ndr_print_GUID(ndr, "object", r->in.object);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "interface_id", r->in.interface_id);
+ ndr->depth++;
+ if (r->in.interface_id) {
+ ndr_print_rpc_if_id_t(ndr, "interface_id", r->in.interface_id);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "vers_option", r->in.vers_option);
+ ndr_print_ptr(ndr, "entry_handle", r->in.entry_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "entry_handle", r->in.entry_handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_ents", r->in.max_ents);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_Lookup");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "entry_handle", r->out.entry_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "entry_handle", r->out.entry_handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "num_ents", r->out.num_ents);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_ents", *r->out.num_ents);
+ ndr->depth--;
+ ndr->print(ndr, "%s: ARRAY(%d)", "entries", *r->out.num_ents);
+ ndr->depth++;
+ for (cntr_entries_0=0;cntr_entries_0<*r->out.num_ents;cntr_entries_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_entries_0);
+ if (idx_0) {
+ ndr_print_epm_entry_t(ndr, "entries", &r->out.entries[cntr_entries_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_epm_Map(struct ndr_push *ndr, int flags, const struct epm_Map *r)
+{
+ uint32_t cntr_towers_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object));
+ if (r->in.object) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object));
+ }
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->in.map_tower));
+ if (r->in.map_tower) {
+ NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->in.map_tower));
+ }
+ if (r->in.entry_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_towers));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.entry_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle));
+ if (r->out.num_towers == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_towers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_towers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_towers));
+ for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
+ NDR_CHECK(ndr_push_epm_twr_p_t(ndr, NDR_SCALARS, &r->out.towers[cntr_towers_0]));
+ }
+ for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
+ NDR_CHECK(ndr_push_epm_twr_p_t(ndr, NDR_BUFFERS, &r->out.towers[cntr_towers_0]));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_epm_Map(struct ndr_pull *ndr, int flags, struct epm_Map *r)
+{
+ uint32_t _ptr_object;
+ uint32_t _ptr_map_tower;
+ uint32_t cntr_towers_0;
+ TALLOC_CTX *_mem_save_object_0;
+ TALLOC_CTX *_mem_save_map_tower_0;
+ TALLOC_CTX *_mem_save_entry_handle_0;
+ TALLOC_CTX *_mem_save_num_towers_0;
+ TALLOC_CTX *_mem_save_towers_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object));
+ if (_ptr_object) {
+ NDR_PULL_ALLOC(ndr, r->in.object);
+ } else {
+ r->in.object = NULL;
+ }
+ if (r->in.object) {
+ _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0);
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_map_tower));
+ if (_ptr_map_tower) {
+ NDR_PULL_ALLOC(ndr, r->in.map_tower);
+ } else {
+ r->in.map_tower = NULL;
+ }
+ if (r->in.map_tower) {
+ _mem_save_map_tower_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.map_tower, 0);
+ NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->in.map_tower));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_map_tower_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.entry_handle);
+ }
+ _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_towers));
+ NDR_PULL_ALLOC(ndr, r->out.entry_handle);
+ *r->out.entry_handle = *r->in.entry_handle;
+ NDR_PULL_ALLOC(ndr, r->out.num_towers);
+ ZERO_STRUCTP(r->out.num_towers);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.entry_handle);
+ }
+ _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.num_towers);
+ }
+ _mem_save_num_towers_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.num_towers, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_towers));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_towers_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.towers));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->out.towers));
+ if (ndr_get_array_length(ndr, &r->out.towers) > ndr_get_array_size(ndr, &r->out.towers)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.towers), ndr_get_array_length(ndr, &r->out.towers));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.towers, ndr_get_array_size(ndr, &r->out.towers));
+ _mem_save_towers_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.towers, 0);
+ for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
+ NDR_CHECK(ndr_pull_epm_twr_p_t(ndr, NDR_SCALARS, &r->out.towers[cntr_towers_0]));
+ }
+ for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
+ NDR_CHECK(ndr_pull_epm_twr_p_t(ndr, NDR_BUFFERS, &r->out.towers[cntr_towers_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_towers_0, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.towers) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.towers, r->in.max_towers));
+ }
+ if (r->out.towers) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.towers, *r->out.num_towers));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_Map(struct ndr_print *ndr, const char *name, int flags, const struct epm_Map *r)
+{
+ uint32_t cntr_towers_0;
+ ndr_print_struct(ndr, name, "epm_Map");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_Map");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "object", r->in.object);
+ ndr->depth++;
+ if (r->in.object) {
+ ndr_print_GUID(ndr, "object", r->in.object);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "map_tower", r->in.map_tower);
+ ndr->depth++;
+ if (r->in.map_tower) {
+ ndr_print_epm_twr_t(ndr, "map_tower", r->in.map_tower);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "entry_handle", r->in.entry_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "entry_handle", r->in.entry_handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "max_towers", r->in.max_towers);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_Map");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "entry_handle", r->out.entry_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "entry_handle", r->out.entry_handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "num_towers", r->out.num_towers);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_towers", *r->out.num_towers);
+ ndr->depth--;
+ ndr->print(ndr, "%s: ARRAY(%d)", "towers", *r->out.num_towers);
+ ndr->depth++;
+ for (cntr_towers_0=0;cntr_towers_0<*r->out.num_towers;cntr_towers_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_towers_0);
+ if (idx_0) {
+ ndr_print_epm_twr_p_t(ndr, "towers", &r->out.towers[cntr_towers_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_LookupHandleFree(struct ndr_push *ndr, int flags, const struct epm_LookupHandleFree *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.entry_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.entry_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_LookupHandleFree(struct ndr_pull *ndr, int flags, struct epm_LookupHandleFree *r)
+{
+ TALLOC_CTX *_mem_save_entry_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.entry_handle);
+ }
+ _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.entry_handle);
+ *r->out.entry_handle = *r->in.entry_handle;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.entry_handle);
+ }
+ _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_LookupHandleFree(struct ndr_print *ndr, const char *name, int flags, const struct epm_LookupHandleFree *r)
+{
+ ndr_print_struct(ndr, name, "epm_LookupHandleFree");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_LookupHandleFree");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "entry_handle", r->in.entry_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "entry_handle", r->in.entry_handle);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_LookupHandleFree");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "entry_handle", r->out.entry_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "entry_handle", r->out.entry_handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_InqObject(struct ndr_push *ndr, int flags, const struct epm_InqObject *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.epm_object == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.epm_object));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_InqObject(struct ndr_pull *ndr, int flags, struct epm_InqObject *r)
+{
+ TALLOC_CTX *_mem_save_epm_object_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.epm_object);
+ }
+ _mem_save_epm_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.epm_object, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.epm_object));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_epm_object_0, LIBNDR_FLAG_REF_ALLOC);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_InqObject(struct ndr_print *ndr, const char *name, int flags, const struct epm_InqObject *r)
+{
+ ndr_print_struct(ndr, name, "epm_InqObject");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_InqObject");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "epm_object", r->in.epm_object);
+ ndr->depth++;
+ ndr_print_GUID(ndr, "epm_object", r->in.epm_object);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_InqObject");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_MgmtDelete(struct ndr_push *ndr, int flags, const struct epm_MgmtDelete *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.object_speced));
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object));
+ if (r->in.object) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object));
+ }
+ NDR_CHECK(ndr_push_full_ptr(ndr, r->in.tower));
+ if (r->in.tower) {
+ NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->in.tower));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_MgmtDelete(struct ndr_pull *ndr, int flags, struct epm_MgmtDelete *r)
+{
+ uint32_t _ptr_object;
+ uint32_t _ptr_tower;
+ TALLOC_CTX *_mem_save_object_0;
+ TALLOC_CTX *_mem_save_tower_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.object_speced));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object));
+ if (_ptr_object) {
+ NDR_PULL_ALLOC(ndr, r->in.object);
+ } else {
+ r->in.object = NULL;
+ }
+ if (r->in.object) {
+ _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0);
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tower));
+ if (_ptr_tower) {
+ NDR_PULL_ALLOC(ndr, r->in.tower);
+ } else {
+ r->in.tower = NULL;
+ }
+ if (r->in.tower) {
+ _mem_save_tower_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.tower, 0);
+ NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->in.tower));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tower_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_MgmtDelete(struct ndr_print *ndr, const char *name, int flags, const struct epm_MgmtDelete *r)
+{
+ ndr_print_struct(ndr, name, "epm_MgmtDelete");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_MgmtDelete");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "object_speced", r->in.object_speced);
+ ndr_print_ptr(ndr, "object", r->in.object);
+ ndr->depth++;
+ if (r->in.object) {
+ ndr_print_GUID(ndr, "object", r->in.object);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "tower", r->in.tower);
+ ndr->depth++;
+ if (r->in.tower) {
+ ndr_print_epm_twr_t(ndr, "tower", r->in.tower);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_MgmtDelete");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_epm_MapAuth(struct ndr_push *ndr, int flags, const struct epm_MapAuth *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_epm_MapAuth(struct ndr_pull *ndr, int flags, struct epm_MapAuth *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_epm_MapAuth(struct ndr_print *ndr, const char *name, int flags, const struct epm_MapAuth *r)
+{
+ ndr_print_struct(ndr, name, "epm_MapAuth");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "epm_MapAuth");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "epm_MapAuth");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+const struct dcerpc_interface_call epmapper_calls[] = {
+ {
+ "epm_Insert",
+ sizeof(struct epm_Insert),
+ (ndr_push_flags_fn_t) ndr_push_epm_Insert,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_Insert,
+ (ndr_print_function_t) ndr_print_epm_Insert,
+ False,
+ },
+ {
+ "epm_Delete",
+ sizeof(struct epm_Delete),
+ (ndr_push_flags_fn_t) ndr_push_epm_Delete,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_Delete,
+ (ndr_print_function_t) ndr_print_epm_Delete,
+ False,
+ },
+ {
+ "epm_Lookup",
+ sizeof(struct epm_Lookup),
+ (ndr_push_flags_fn_t) ndr_push_epm_Lookup,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_Lookup,
+ (ndr_print_function_t) ndr_print_epm_Lookup,
+ False,
+ },
+ {
+ "epm_Map",
+ sizeof(struct epm_Map),
+ (ndr_push_flags_fn_t) ndr_push_epm_Map,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_Map,
+ (ndr_print_function_t) ndr_print_epm_Map,
+ False,
+ },
+ {
+ "epm_LookupHandleFree",
+ sizeof(struct epm_LookupHandleFree),
+ (ndr_push_flags_fn_t) ndr_push_epm_LookupHandleFree,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_LookupHandleFree,
+ (ndr_print_function_t) ndr_print_epm_LookupHandleFree,
+ False,
+ },
+ {
+ "epm_InqObject",
+ sizeof(struct epm_InqObject),
+ (ndr_push_flags_fn_t) ndr_push_epm_InqObject,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_InqObject,
+ (ndr_print_function_t) ndr_print_epm_InqObject,
+ False,
+ },
+ {
+ "epm_MgmtDelete",
+ sizeof(struct epm_MgmtDelete),
+ (ndr_push_flags_fn_t) ndr_push_epm_MgmtDelete,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_MgmtDelete,
+ (ndr_print_function_t) ndr_print_epm_MgmtDelete,
+ False,
+ },
+ {
+ "epm_MapAuth",
+ sizeof(struct epm_MapAuth),
+ (ndr_push_flags_fn_t) ndr_push_epm_MapAuth,
+ (ndr_pull_flags_fn_t) ndr_pull_epm_MapAuth,
+ (ndr_print_function_t) ndr_print_epm_MapAuth,
+ False,
+ },
+ { NULL, 0, NULL, NULL, NULL, False }
+};
+
+const char * const epmapper_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\epmapper]",
+ "ncacn_ip_tcp:[135]",
+ "ncalrpc:[EPMAPPER]",
+};
+
+const struct dcerpc_endpoint_list epmapper_endpoints = {
+ .count = 3,
+ .names = epmapper_endpoint_strings
+};
+
+const char * const epmapper_authservice_strings[] = {
+ "host",
+};
+
+const struct dcerpc_authservice_list epmapper_authservices = {
+ .count = 3,
+ .names = epmapper_authservice_strings
+};
+
+
+const struct dcerpc_interface_table dcerpc_table_epmapper = {
+ .name = "epmapper",
+ .syntax_id = {
+ {0xe1af8308,0x5d1f,0x11c9,{0x91,0xa4},{0x08,0x00,0x2b,0x14,0xa0,0xfa}},
+ DCERPC_EPMAPPER_VERSION
+ },
+ .helpstring = DCERPC_EPMAPPER_HELPSTRING,
+ .num_calls = 8,
+ .calls = epmapper_calls,
+ .endpoints = &epmapper_endpoints,
+ .authservices = &epmapper_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_epmapper.h b/source3/librpc/gen_ndr/ndr_epmapper.h
new file mode 100644
index 0000000000..b8040f59eb
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_epmapper.h
@@ -0,0 +1,77 @@
+/* header auto-generated by pidl */
+
+#include "librpc/gen_ndr/epmapper.h"
+
+#ifndef _HEADER_NDR_epmapper
+#define _HEADER_NDR_epmapper
+
+#include "librpc/ndr/libndr.h"
+#define DCERPC_EPMAPPER_UUID "e1af8308-5d1f-11c9-91a4-08002b14a0fa"
+#define DCERPC_EPMAPPER_VERSION 3.0
+#define DCERPC_EPMAPPER_NAME "epmapper"
+#define DCERPC_EPMAPPER_HELPSTRING "EndPoint Mapper"
+extern const struct dcerpc_interface_table dcerpc_table_epmapper;
+NTSTATUS dcerpc_server_epmapper_init(void);
+#define DCERPC_EPM_INSERT (0x00)
+
+#define DCERPC_EPM_DELETE (0x01)
+
+#define DCERPC_EPM_LOOKUP (0x02)
+
+#define DCERPC_EPM_MAP (0x03)
+
+#define DCERPC_EPM_LOOKUPHANDLEFREE (0x04)
+
+#define DCERPC_EPM_INQOBJECT (0x05)
+
+#define DCERPC_EPM_MGMTDELETE (0x06)
+
+#define DCERPC_EPM_MAPAUTH (0x07)
+
+#define DCERPC_EPMAPPER_CALL_COUNT (8)
+void ndr_print_epm_protocol(struct ndr_print *ndr, const char *name, enum epm_protocol r);
+void ndr_print_epm_rhs_dnet_nsp(struct ndr_print *ndr, const char *name, const struct epm_rhs_dnet_nsp *r);
+void ndr_print_epm_rhs_osi_tp4(struct ndr_print *ndr, const char *name, const struct epm_rhs_osi_tp4 *r);
+void ndr_print_epm_rhs_osi_clns(struct ndr_print *ndr, const char *name, const struct epm_rhs_osi_clns *r);
+void ndr_print_epm_rhs_udp(struct ndr_print *ndr, const char *name, const struct epm_rhs_udp *r);
+void ndr_print_epm_rhs_tcp(struct ndr_print *ndr, const char *name, const struct epm_rhs_tcp *r);
+void ndr_print_epm_rhs_ip(struct ndr_print *ndr, const char *name, const struct epm_rhs_ip *r);
+void ndr_print_epm_rhs_ncadg(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncadg *r);
+void ndr_print_epm_rhs_ncacn(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncacn *r);
+void ndr_print_epm_rhs_uuid(struct ndr_print *ndr, const char *name, const struct epm_rhs_uuid *r);
+void ndr_print_epm_rhs_ipx(struct ndr_print *ndr, const char *name, const struct epm_rhs_ipx *r);
+void ndr_print_epm_rhs_smb(struct ndr_print *ndr, const char *name, const struct epm_rhs_smb *r);
+void ndr_print_epm_rhs_pipe(struct ndr_print *ndr, const char *name, const struct epm_rhs_pipe *r);
+void ndr_print_epm_rhs_netbios(struct ndr_print *ndr, const char *name, const struct epm_rhs_netbios *r);
+void ndr_print_epm_rhs_netbeui(struct ndr_print *ndr, const char *name, const struct epm_rhs_netbeui *r);
+void ndr_print_epm_rhs_spx(struct ndr_print *ndr, const char *name, const struct epm_rhs_spx *r);
+void ndr_print_epm_rhs_nb_ipx(struct ndr_print *ndr, const char *name, const struct epm_rhs_nb_ipx *r);
+void ndr_print_epm_rhs_http(struct ndr_print *ndr, const char *name, const struct epm_rhs_http *r);
+void ndr_print_epm_rhs_unix_ds(struct ndr_print *ndr, const char *name, const struct epm_rhs_unix_ds *r);
+void ndr_print_epm_rhs_null(struct ndr_print *ndr, const char *name, const struct epm_rhs_null *r);
+void ndr_print_epm_rhs_ncalrpc(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncalrpc *r);
+void ndr_print_epm_rhs_appletalk(struct ndr_print *ndr, const char *name, const struct epm_rhs_appletalk *r);
+void ndr_print_epm_rhs_atalk_stream(struct ndr_print *ndr, const char *name, const struct epm_rhs_atalk_stream *r);
+void ndr_print_epm_rhs_atalk_datagram(struct ndr_print *ndr, const char *name, const struct epm_rhs_atalk_datagram *r);
+void ndr_print_epm_rhs_vines_spp(struct ndr_print *ndr, const char *name, const struct epm_rhs_vines_spp *r);
+void ndr_print_epm_rhs_vines_ipc(struct ndr_print *ndr, const char *name, const struct epm_rhs_vines_ipc *r);
+void ndr_print_epm_rhs_streettalk(struct ndr_print *ndr, const char *name, const struct epm_rhs_streettalk *r);
+void ndr_print_epm_rhs(struct ndr_print *ndr, const char *name, const union epm_rhs *r);
+void ndr_print_epm_lhs(struct ndr_print *ndr, const char *name, const struct epm_lhs *r);
+void ndr_print_epm_floor(struct ndr_print *ndr, const char *name, const struct epm_floor *r);
+void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const struct epm_tower *r);
+void ndr_print_epm_twr_t(struct ndr_print *ndr, const char *name, const struct epm_twr_t *r);
+void ndr_print_epm_entry_t(struct ndr_print *ndr, const char *name, const struct epm_entry_t *r);
+void ndr_print_rpc_if_id_t(struct ndr_print *ndr, const char *name, const struct rpc_if_id_t *r);
+void ndr_print_epm_twr_p_t(struct ndr_print *ndr, const char *name, const struct epm_twr_p_t *r);
+void ndr_print_epm_Insert(struct ndr_print *ndr, const char *name, int flags, const struct epm_Insert *r);
+void ndr_print_epm_Delete(struct ndr_print *ndr, const char *name, int flags, const struct epm_Delete *r);
+void ndr_print_epm_Lookup(struct ndr_print *ndr, const char *name, int flags, const struct epm_Lookup *r);
+NTSTATUS ndr_push_epm_Map(struct ndr_push *ndr, int flags, const struct epm_Map *r);
+NTSTATUS ndr_pull_epm_Map(struct ndr_pull *ndr, int flags, struct epm_Map *r);
+void ndr_print_epm_Map(struct ndr_print *ndr, const char *name, int flags, const struct epm_Map *r);
+void ndr_print_epm_LookupHandleFree(struct ndr_print *ndr, const char *name, int flags, const struct epm_LookupHandleFree *r);
+void ndr_print_epm_InqObject(struct ndr_print *ndr, const char *name, int flags, const struct epm_InqObject *r);
+void ndr_print_epm_MgmtDelete(struct ndr_print *ndr, const char *name, int flags, const struct epm_MgmtDelete *r);
+void ndr_print_epm_MapAuth(struct ndr_print *ndr, const char *name, int flags, const struct epm_MapAuth *r);
+#endif /* _HEADER_NDR_epmapper */
diff --git a/source3/librpc/gen_ndr/srv_epmapper.c b/source3/librpc/gen_ndr/srv_epmapper.c
new file mode 100644
index 0000000000..f64a903e10
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_epmapper.c
@@ -0,0 +1,574 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_epmapper.h"
+
+static BOOL api_epm_Insert(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_Insert r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_Insert");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_Insert(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Insert, &r);
+
+ r.out.result = _epm_Insert(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Insert, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_Insert(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_epm_Delete(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_Delete r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_Delete");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_Delete(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Delete, &r);
+
+ r.out.result = _epm_Delete(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Delete, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_Delete(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_epm_Lookup(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_Lookup r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_Lookup");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_Lookup(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Lookup, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.entry_handle = r.in.entry_handle;
+ r.out.num_ents = talloc_zero(mem_ctx, uint32_t);
+ if (r.out.num_ents == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.entries = talloc_zero_array(mem_ctx, struct epm_entry_t, r.in.max_ents);
+ if (r.out.entries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _epm_Lookup(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Lookup, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_Lookup(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_epm_Map(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_Map r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_Map");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_Map(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_Map, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.entry_handle = r.in.entry_handle;
+ r.out.num_towers = talloc_zero(mem_ctx, uint32_t);
+ if (r.out.num_towers == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.towers = talloc_zero_array(mem_ctx, struct epm_twr_p_t, r.in.max_towers);
+ if (r.out.towers == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _epm_Map(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_Map, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_Map(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_epm_LookupHandleFree(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_LookupHandleFree r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_LookupHandleFree");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_LookupHandleFree(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_LookupHandleFree, &r);
+
+ ZERO_STRUCT(r.out);
+ r.out.entry_handle = r.in.entry_handle;
+ r.out.result = _epm_LookupHandleFree(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_LookupHandleFree(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_epm_InqObject(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_InqObject r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_InqObject");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_InqObject(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_InqObject, &r);
+
+ r.out.result = _epm_InqObject(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_InqObject, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_InqObject(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_epm_MgmtDelete(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_MgmtDelete r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_MgmtDelete");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_MgmtDelete(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_MgmtDelete, &r);
+
+ r.out.result = _epm_MgmtDelete(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_MgmtDelete(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_epm_MapAuth(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct epm_MapAuth r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_epm_MapAuth");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_epm_MapAuth(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_IN_DEBUG(epm_MapAuth, &r);
+
+ r.out.result = _epm_MapAuth(p, &r);
+
+ if (p->rng_fault_state) {
+ talloc_free(mem_ctx);
+ /* Return True here, srv_pipe_hnd.c will take care */
+ return True;
+ }
+
+ if (DEBUGLEVEL >= 10)
+ NDR_PRINT_OUT_DEBUG(epm_MapAuth, &r);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_epm_MapAuth(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+
+/* Tables */
+static struct api_struct api_epmapper_cmds[] =
+{
+ {"EPM_INSERT", DCERPC_EPM_INSERT, api_epm_Insert},
+ {"EPM_DELETE", DCERPC_EPM_DELETE, api_epm_Delete},
+ {"EPM_LOOKUP", DCERPC_EPM_LOOKUP, api_epm_Lookup},
+ {"EPM_MAP", DCERPC_EPM_MAP, api_epm_Map},
+ {"EPM_LOOKUPHANDLEFREE", DCERPC_EPM_LOOKUPHANDLEFREE, api_epm_LookupHandleFree},
+ {"EPM_INQOBJECT", DCERPC_EPM_INQOBJECT, api_epm_InqObject},
+ {"EPM_MGMTDELETE", DCERPC_EPM_MGMTDELETE, api_epm_MgmtDelete},
+ {"EPM_MAPAUTH", DCERPC_EPM_MAPAUTH, api_epm_MapAuth},
+};
+
+void epmapper_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_epmapper_cmds;
+ *n_fns = sizeof(api_epmapper_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_epmapper_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "epmapper", "epmapper", api_epmapper_cmds, sizeof(api_epmapper_cmds) / sizeof(struct api_struct));
+}
diff --git a/source3/librpc/gen_ndr/srv_epmapper.h b/source3/librpc/gen_ndr/srv_epmapper.h
new file mode 100644
index 0000000000..e0d0105b78
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_epmapper.h
@@ -0,0 +1,14 @@
+#include "librpc/gen_ndr/ndr_epmapper.h"
+#ifndef __SRV_EPMAPPER__
+#define __SRV_EPMAPPER__
+uint32 _epm_Insert(pipes_struct *p, struct epm_Insert *r);
+uint32 _epm_Delete(pipes_struct *p, struct epm_Delete *r);
+uint32 _epm_Lookup(pipes_struct *p, struct epm_Lookup *r);
+uint32 _epm_Map(pipes_struct *p, struct epm_Map *r);
+uint32 _epm_LookupHandleFree(pipes_struct *p, struct epm_LookupHandleFree *r);
+uint32 _epm_InqObject(pipes_struct *p, struct epm_InqObject *r);
+uint32 _epm_MgmtDelete(pipes_struct *p, struct epm_MgmtDelete *r);
+uint32 _epm_MapAuth(pipes_struct *p, struct epm_MapAuth *r);
+void epmapper_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_epmapper_init(void);
+#endif /* __SRV_EPMAPPER__ */
diff --git a/source3/librpc/gen_ndr/tables.c b/source3/librpc/gen_ndr/tables.c
index d260149901..9a1c5a06d5 100644
--- a/source3/librpc/gen_ndr/tables.c
+++ b/source3/librpc/gen_ndr/tables.c
@@ -6,6 +6,7 @@
#include "librpc/rpc/dcerpc_table.h"
#include "librpc/gen_ndr/ndr_dfs.h"
#include "librpc/gen_ndr/ndr_echo.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
#include "librpc/gen_ndr/ndr_eventlog.h"
#include "librpc/gen_ndr/ndr_initshutdown.h"
#include "librpc/gen_ndr/ndr_lsa.h"
@@ -26,6 +27,9 @@ NTSTATUS dcerpc_register_builtin_interfaces(void)
status = librpc_register_interface(&dcerpc_table_rpcecho);
if (NT_STATUS_IS_ERR(status)) return status;
+ status = librpc_register_interface(&dcerpc_table_epmapper);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
status = librpc_register_interface(&dcerpc_table_eventlog);
if (NT_STATUS_IS_ERR(status)) return status;
diff --git a/source3/librpc/idl/epmapper.idl b/source3/librpc/idl/epmapper.idl
new file mode 100644
index 0000000000..5611c3de18
--- /dev/null
+++ b/source3/librpc/idl/epmapper.idl
@@ -0,0 +1,302 @@
+#include "idl_types.h"
+
+/*
+ endpoint mapper interface
+ Related links:
+ http://www.opengroup.org/onlinepubs/9629399/apdxl.htm : Details on towers
+http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: binding strings
+
+*/
+
+[
+ uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"),
+ version(3.0),
+ endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]",
+ "ncalrpc:[EPMAPPER]"),
+ helpstring("EndPoint Mapper"),
+ pointer_default(ptr)
+]
+interface epmapper
+{
+
+ /*
+ note that the following IDL won't work in MIDL, and in fact
+ that the full towers/floors representation of epm cannot be
+ represented in MIDL at all. I decided to represent it using
+ the extended IDL syntax in pidl to make it easier to work
+ with.
+ */
+
+ const int EPMAPPER_STATUS_NO_MORE_ENTRIES = 0x16c9a0d6;
+ const int EPMAPPER_STATUS_NO_MEMORY = 0x16C9A012;
+ const int EPMAPPER_STATUS_OK = 0;
+
+
+
+ typedef [enum8bit] enum {
+
+ /* Level 4 and higher */
+ EPM_PROTOCOL_DNET_NSP = 0x04,
+ EPM_PROTOCOL_OSI_TP4 = 0x05,
+ EPM_PROTOCOL_OSI_CLNS = 0x06,
+ EPM_PROTOCOL_TCP = 0x07,
+ EPM_PROTOCOL_UDP = 0x08,
+ EPM_PROTOCOL_IP = 0x09,
+ /* These 4 are protocol identifiers, always at level 3 or lower */
+ EPM_PROTOCOL_NCADG = 0x0a, /* Connectionless RPC */
+ EPM_PROTOCOL_NCACN = 0x0b,
+ EPM_PROTOCOL_NCALRPC = 0x0c, /* Local RPC */
+ EPM_PROTOCOL_UUID = 0x0d,
+ EPM_PROTOCOL_IPX = 0x0e,
+ EPM_PROTOCOL_SMB = 0x0f,
+ EPM_PROTOCOL_PIPE = 0x10,
+ EPM_PROTOCOL_NETBIOS = 0x11,
+ EPM_PROTOCOL_NETBEUI = 0x12,
+ EPM_PROTOCOL_SPX = 0x13,
+ EPM_PROTOCOL_NB_IPX = 0x14, /* NetBIOS over IPX */
+ EPM_PROTOCOL_DSP = 0x16, /* AppleTalk Data Stream Protocol */
+ EPM_PROTOCOL_DDP = 0x17, /* AppleTalk Data Datagram Protocol */
+ EPM_PROTOCOL_APPLETALK = 0x18, /* AppleTalk */
+ EPM_PROTOCOL_VINES_SPP = 0x1a,
+ EPM_PROTOCOL_VINES_IPC = 0x1b, /* Inter Process Communication */
+ EPM_PROTOCOL_STREETTALK = 0x1c, /* Vines Streettalk */
+ EPM_PROTOCOL_HTTP = 0x1f,
+ EPM_PROTOCOL_UNIX_DS = 0x20, /* Unix domain socket */
+ EPM_PROTOCOL_NULL = 0x21
+ } epm_protocol;
+
+ typedef struct {
+ /*FIXME */
+ } epm_rhs_dnet_nsp;
+
+ typedef struct {
+ /*FIXME*/
+ } epm_rhs_osi_tp4;
+
+ typedef struct {
+ /*FIXME*/
+ } epm_rhs_osi_clns;
+
+ typedef struct {
+ uint16 port;
+ } epm_rhs_udp;
+
+ typedef struct {
+ uint16 port;
+ } epm_rhs_tcp;
+
+ typedef struct {
+ ipv4address ipaddr;
+ } epm_rhs_ip;
+
+ typedef struct {
+ uint16 minor_version;
+ } epm_rhs_ncadg;
+
+ typedef struct {
+ uint16 minor_version;
+ } epm_rhs_ncacn;
+
+ typedef struct {
+ [flag(NDR_REMAINING)] DATA_BLOB unknown;
+ } epm_rhs_uuid;
+
+ typedef struct {
+ /*FIXME */
+ } epm_rhs_ipx;
+
+ typedef struct {
+ astring unc;
+ } epm_rhs_smb;
+
+ typedef struct {
+ astring path;
+ } epm_rhs_pipe;
+
+ typedef struct {
+ astring name;
+ } epm_rhs_netbios;
+
+ typedef struct {
+ } epm_rhs_netbeui;
+
+ typedef struct {
+ } epm_rhs_spx;
+
+ typedef struct {
+ } epm_rhs_nb_ipx;
+
+ typedef struct {
+ uint16 port;
+ } epm_rhs_http;
+
+ typedef struct {
+ astring path;
+ } epm_rhs_unix_ds;
+
+ typedef struct {
+ } epm_rhs_null;
+
+ typedef struct {
+ uint16 minor_version;
+ } epm_rhs_ncalrpc;
+
+ typedef struct {
+ } epm_rhs_appletalk;
+
+ typedef struct {
+ } epm_rhs_atalk_stream;
+
+ typedef struct {
+ } epm_rhs_atalk_datagram;
+
+ typedef struct {
+ uint16 port;
+ } epm_rhs_vines_spp;
+
+ typedef struct {
+ uint16 port;
+ } epm_rhs_vines_ipc;
+
+ typedef struct {
+ astring streettalk;
+ } epm_rhs_streettalk;
+
+ typedef [flag(NDR_BIG_ENDIAN),nodiscriminant] union {
+ [case(EPM_PROTOCOL_DNET_NSP)] epm_rhs_dnet_nsp dnet_nsp;
+ [case(EPM_PROTOCOL_OSI_TP4)] epm_rhs_osi_tp4 osi_tp4;
+ [case(EPM_PROTOCOL_OSI_CLNS)] epm_rhs_osi_clns osi_clns;
+ [case(EPM_PROTOCOL_TCP)] epm_rhs_tcp tcp;
+ [case(EPM_PROTOCOL_UDP)] epm_rhs_udp udp;
+ [case(EPM_PROTOCOL_IP)] epm_rhs_ip ip;
+ [case(EPM_PROTOCOL_NCADG)] epm_rhs_ncadg ncadg;
+ [case(EPM_PROTOCOL_NCACN)] epm_rhs_ncacn ncacn;
+ [case(EPM_PROTOCOL_NCALRPC)] epm_rhs_ncalrpc ncalrpc;
+ [case(EPM_PROTOCOL_UUID)] epm_rhs_uuid uuid;
+ [case(EPM_PROTOCOL_IPX)] epm_rhs_ipx ipx;
+ [case(EPM_PROTOCOL_SMB)] epm_rhs_smb smb;
+ [case(EPM_PROTOCOL_PIPE)] epm_rhs_pipe pipe;
+ [case(EPM_PROTOCOL_NETBIOS)] epm_rhs_netbios netbios;
+ [case(EPM_PROTOCOL_NETBEUI)] epm_rhs_netbeui netbeui;
+ [case(EPM_PROTOCOL_SPX)] epm_rhs_spx spx;
+ [case(EPM_PROTOCOL_NB_IPX)] epm_rhs_nb_ipx nb_ipx;
+ [case(EPM_PROTOCOL_DSP)] epm_rhs_atalk_stream atalk_stream;
+ [case(EPM_PROTOCOL_DDP)] epm_rhs_atalk_datagram atalk_datagram;
+ [case(EPM_PROTOCOL_APPLETALK)] epm_rhs_appletalk appletalk;
+ [case(EPM_PROTOCOL_VINES_SPP)] epm_rhs_vines_spp vines_spp;
+ [case(EPM_PROTOCOL_VINES_IPC)] epm_rhs_vines_ipc vines_ipc;
+ [case(EPM_PROTOCOL_STREETTALK)] epm_rhs_streettalk streettalk;
+ [case(EPM_PROTOCOL_HTTP)] epm_rhs_http http;
+ [case(EPM_PROTOCOL_UNIX_DS)] epm_rhs_unix_ds unix_ds;
+ [case(EPM_PROTOCOL_NULL)] epm_rhs_null null;
+ [default] [flag(NDR_REMAINING)] DATA_BLOB unknown;
+ } epm_rhs;
+
+ typedef struct {
+ epm_protocol protocol;
+ [flag(NDR_REMAINING)] DATA_BLOB lhs_data;
+ } epm_lhs;
+
+ typedef struct {
+ [subcontext(2)] epm_lhs lhs;
+ [subcontext(2),switch_is(lhs.protocol)] epm_rhs rhs;
+ } epm_floor;
+
+ /* note that the NDR_NOALIGN flag is inherited by all nested
+ structures. All of the towers/floors stuff is
+ non-aligned. I wonder what sort of wicked substance these
+ guys were smoking?
+ */
+ typedef [gensize,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct {
+ uint16 num_floors;
+ epm_floor floors[num_floors];
+ } epm_tower;
+
+ typedef struct {
+ [value(ndr_size_epm_tower(&tower, ndr->flags))] uint32 tower_length;
+ [subcontext(4)] epm_tower tower;
+ } epm_twr_t;
+
+ typedef struct {
+ GUID object;
+ epm_twr_t *tower;
+ ascstr2 annotation;
+ } epm_entry_t;
+
+ typedef struct {
+ GUID uuid;
+ uint16 vers_major;
+ uint16 vers_minor;
+ } rpc_if_id_t;
+
+ /**********************/
+ /* Function 0x0 */
+ error_status_t epm_Insert(
+ [in] uint32 num_ents,
+ [in,size_is(num_ents)] epm_entry_t entries[],
+ [in] uint32 replace
+ );
+
+ /**********************/
+ /* Function 0x1 */
+ error_status_t epm_Delete(
+ [in] uint32 num_ents,
+ [in, size_is(num_ents)] epm_entry_t entries[]
+ );
+
+ /**********************/
+ /* Function 0x02 */
+ error_status_t epm_Lookup(
+ [in] uint32 inquiry_type,
+ [in,ptr] GUID *object,
+ [in,ptr] rpc_if_id_t *interface_id,
+ [in] uint32 vers_option,
+ [in,out] policy_handle *entry_handle,
+ [in] uint32 max_ents,
+ [out] uint32 *num_ents,
+ [out, length_is(*num_ents), size_is(max_ents)] epm_entry_t entries[]
+ );
+
+
+ /**********************/
+ /* Function 0x03 */
+
+ typedef struct {
+ epm_twr_t *twr;
+ } epm_twr_p_t;
+
+ [public] error_status_t epm_Map(
+ [in,ptr] GUID *object,
+ [in,ptr] epm_twr_t *map_tower,
+ [in,out] policy_handle *entry_handle,
+ [in] uint32 max_towers,
+ [out] uint32 *num_towers,
+ [out, length_is(*num_towers), size_is(max_towers)] epm_twr_p_t towers[]
+ );
+
+
+ /**********************/
+ /* Function 0x04 */
+ error_status_t epm_LookupHandleFree(
+ [in,out] policy_handle *entry_handle
+ );
+
+ /**********************/
+ /* Function 0x05 */
+ error_status_t epm_InqObject(
+ [in] GUID *epm_object
+ );
+
+
+ /**********************/
+ /* Function 0x06 */
+ error_status_t epm_MgmtDelete(
+ [in] uint32 object_speced,
+ [in,ptr] GUID *object,
+ [in,ptr] epm_twr_t *tower
+ );
+
+ /**********************/
+ /* Function 0x07 */
+ error_status_t epm_MapAuth();
+}
diff --git a/source3/librpc/ndr/ndr_basic.c b/source3/librpc/ndr/ndr_basic.c
index 913dfc7e65..c7c6281fea 100644
--- a/source3/librpc/ndr/ndr_basic.c
+++ b/source3/librpc/ndr/ndr_basic.c
@@ -479,12 +479,17 @@ NTSTATUS ndr_push_unique_ptr(struct ndr_push *ndr, const void *p)
/*
push a 'simple' full non-zero value if a pointer is non-NULL, otherwise 0
*/
-NTSTATUS ndr_push_sptr_ptr(struct ndr_push *ndr, const void *p)
+NTSTATUS ndr_push_full_ptr(struct ndr_push *ndr, const void *p)
{
uint32_t ptr = 0;
if (p) {
- ndr->ptr_count++;
- ptr = ndr->ptr_count;
+ /* Check if the pointer already exists and has an id */
+ ptr = ndr_token_peek(&ndr->full_ptr_list, p);
+ if (ptr == 0) {
+ ndr->ptr_count++;
+ ptr = ndr->ptr_count;
+ ndr_token_store(ndr, &ndr->full_ptr_list, p, ptr);
+ }
}
return ndr_push_uint32(ndr, NDR_SCALARS, ptr);
}
@@ -572,6 +577,43 @@ NTSTATUS ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t)
return NT_STATUS_OK;
}
+/*
+ pull a ipv4address
+*/
+NTSTATUS ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address)
+{
+ struct in_addr in;
+ NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &in.s_addr));
+ in.s_addr = htonl(in.s_addr);
+ *address = talloc_strdup(ndr->current_mem_ctx, inet_ntoa(in));
+ NT_STATUS_HAVE_NO_MEMORY(*address);
+ return NT_STATUS_OK;
+}
+
+/*
+ push a ipv4address
+*/
+NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address)
+{
+ uint32_t addr;
+ if (!is_ipaddress(address)) {
+ return ndr_push_error(ndr, NDR_ERR_IPV4ADDRESS,
+ "Invalid IPv4 address: '%s'",
+ address);
+ }
+ addr = inet_addr(address);
+ NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, htonl(addr)));
+ return NT_STATUS_OK;
+}
+
+/*
+ print a ipv4address
+*/
+void ndr_print_ipv4address(struct ndr_print *ndr, const char *name,
+ const char *address)
+{
+ ndr->print(ndr, "%-25s: %s", name, address);
+}
void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type)
{
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 240cac886c..39156d5ef8 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -211,6 +211,16 @@ interface/version dce/rpc pipe identification
}, 0x01 \
}
+#define SYNT_EPMAPPER_V3 \
+{ \
+ { \
+ 0xe1af8308, 0x5d1f,0x11c9, \
+ { 0x91,0xa4}, \
+ {0x08,0x00, \
+ 0x2b,0x14,0xa0,0xfa} \
+ }, 0x03 \
+}
+
/*
* IMPORTANT!! If you update this structure, make sure to
* update the index #defines in smb.h.
@@ -234,6 +244,7 @@ const struct pipe_id_info pipe_names [] =
{ PIPE_EVENTLOG, SYNT_EVENTLOG_V0 , PIPE_EVENTLOG , TRANS_SYNT_V2 },
{ PIPE_UNIXINFO, SYNT_UNIXINFO_V0 , PIPE_UNIXINFO , TRANS_SYNT_V2 },
{ PIPE_NTSVCS , SYNT_NTSVCS_V1 , PIPE_NTSVCS , TRANS_SYNT_V2 },
+ { PIPE_EPMAPPER, SYNT_EPMAPPER_V3 , PIPE_EPMAPPER , TRANS_SYNT_V2 },
{ NULL , SYNT_NONE_V0 , NULL , SYNT_NONE_V0 }
};
diff --git a/source3/rpc_server/srv_epmapper_nt.c b/source3/rpc_server/srv_epmapper_nt.c
new file mode 100644
index 0000000000..77a06124db
--- /dev/null
+++ b/source3/rpc_server/srv_epmapper_nt.c
@@ -0,0 +1,71 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * RPC Pipe client / server routines for the endpoint mapper
+ * Copyright (C) Jelmer Vernooij 2007.
+ *
+ * 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.
+ */
+
+/* This is the implementation of the dfs pipe. */
+
+#include "includes.h"
+
+uint32 _epm_MapAuth(pipes_struct *p, struct epm_MapAuth *r)
+{
+ /* FIXME */
+ return 0;
+}
+
+uint32 _epm_MgmtDelete(pipes_struct *p, struct epm_MgmtDelete *r)
+{
+ /* FIXME */
+ return 0;
+}
+
+uint32 _epm_InqObject(pipes_struct *p, struct epm_InqObject *r)
+{
+ /* FIXME */
+ return 0;
+}
+
+uint32 _epm_LookupHandleFree(pipes_struct *p, struct epm_LookupHandleFree *r)
+{
+ /* FIXME */
+ return 0;
+}
+
+uint32 _epm_Map(pipes_struct *p, struct epm_Map *r)
+{
+ /* FIXME */
+ return 0;
+}
+
+uint32 _epm_Lookup(pipes_struct *p, struct epm_Lookup *r)
+{
+ /* FIXME */
+ return 0;
+}
+
+uint32 _epm_Delete(pipes_struct *p, struct epm_Delete *r)
+{
+ /* FIXME */
+ return 0;
+}
+
+uint32 _epm_Insert(pipes_struct *p, struct epm_Insert *r)
+{
+ /* FIXME */
+ return 0;
+}
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 50ef195015..83c059d36c 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -2382,7 +2382,7 @@ void get_pipe_fns( int idx, struct api_struct **fns, int *n_fns )
case PI_SVCCTL:
svcctl_get_pipe_fns( &cmds, &n_cmds );
break;
- case PI_EVENTLOG:
+ case PI_EVENTLOG:
eventlog_get_pipe_fns( &cmds, &n_cmds );
break;
case PI_UNIXINFO:
@@ -2396,6 +2396,9 @@ void get_pipe_fns( int idx, struct api_struct **fns, int *n_fns )
rpcecho_get_pipe_fns( &cmds, &n_cmds );
break;
#endif
+ case PI_EPMAPPER:
+ epmapper_get_pipe_fns( &cmds, &n_cmds );
+ break;
default:
DEBUG(0,("get_pipe_fns: Unknown pipe index! [%d]\n", idx));
}