2 Unix SMB/CIFS implementation.
5 Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2003
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 NTSTATUS cli_epm_map(struct cli_state *cli, TALLOC_CTX *mem_ctx,
25 EPM_HANDLE *handle, EPM_TOWER **tower,
26 EPM_HANDLE *entry_handle, uint32 *num_towers)
28 prs_struct qbuf, rbuf;
36 /* Initialise parse structures */
38 prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
39 prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
41 /* Marshall data and send request */
43 init_epm_q_map(mem_ctx, &q, *tower, *num_towers);
45 if (!epm_io_q_map("map_query", &q, &qbuf, 0) ||
46 !rpc_api_pipe_req(cli, EPM_MAP_PIPE_NAME, &qbuf, &rbuf))
49 /* Unmarshall response */
51 if (!epm_io_r_map("map_reply", &r, &rbuf, 0))
60 return result ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;