From 0389cad7c492eda5aee590d0396748c7da9b44ff Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Apr 2007 12:28:40 +0000 Subject: r22055: Port the endpoint mapper (and functions it requires) to Samba 3. (This used to be commit ad981261877e6a2dce0c4f4e71fd9127aa31538a) --- source3/librpc/gen_ndr/cli_epmapper.c | 267 ++++++++++++++++++++++++++++++++++ 1 file changed, 267 insertions(+) create mode 100644 source3/librpc/gen_ndr/cli_epmapper.c (limited to 'source3/librpc/gen_ndr/cli_epmapper.c') 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; +} + -- cgit