3 * Unix SMB/Netbios implementation.
5 * RPC Pipe client / server routines
6 * Copyright (C) Andrew Tridgell 1992-1997,
7 * Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
8 * Copyright (C) Paul Ashton 1997.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32 extern int DEBUGLEVEL;
34 /****************************************************************************
36 ****************************************************************************/
37 BOOL do_wks_query_info(struct cli_state *cli,
38 char *server_name, uint32 switch_value,
44 BOOL valid_info = False;
46 if (server_name == 0 || wks100 == NULL) return False;
48 prs_init(&buf , 1024, 4, SAFETY_MARGIN, False);
49 prs_init(&rbuf, 0 , 4, SAFETY_MARGIN, True );
51 /* create and send a MSRPC command with api WKS_QUERY_INFO */
53 DEBUG(4,("WKS Query Info\n"));
55 /* store the parameters */
56 make_wks_q_query_info(&q_o, server_name, switch_value);
58 /* turn parameters into data stream */
59 wks_io_q_query_info("", &q_o, &buf, 0);
61 /* send the data on \PIPE\ */
62 if (rpc_api_pipe_req(cli, WKS_QUERY_INFO, &buf, &rbuf))
69 wks_io_r_query_info("", &r_o, &rbuf, 0);
72 if (p && r_o.status != 0)
74 /* report error code */
75 DEBUG(0,("WKS_R_QUERY_INFO: %s\n", get_nt_error_msg(r_o.status)));