3 * Unix SMB/Netbios implementation.
5 * RPC Pipe client / server routines
6 * Copyright (C) Andrew Tridgell 1992-1999,
7 * Copyright (C) Luke Kenneth Casson Leighton 1996-1999,
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 extern int DEBUGLEVEL;
29 extern pstring global_myname;
32 /*******************************************************************
34 ********************************************************************/
35 static void create_brs_info_100(BRS_INFO_100 *inf)
37 DEBUG(5,("create_brs_info_100: %d\n", __LINE__));
39 make_brs_info_100(inf);
42 /*******************************************************************
45 only supports info level 100 at the moment.
47 ********************************************************************/
48 static void brs_reply_query_info(BRS_Q_QUERY_INFO *q_u,
55 DEBUG(5,("brs_query_info: %d\n", __LINE__));
57 create_brs_info_100(&brs100);
58 make_brs_r_query_info(&r_u, q_u->switch_value1, &brs100, status);
60 /* store the response in the SMB stream */
61 brs_io_r_query_info("", &r_u, rdata, 0);
63 DEBUG(5,("brs_query_info: %d\n", __LINE__));
66 /*******************************************************************
68 ********************************************************************/
69 static void api_brs_query_info( rpcsrv_struct *p, prs_struct *data,
74 /* grab the net share enum */
75 brs_io_q_query_info("", &q_u, data, 0);
77 /* construct reply. always indicate success */
78 brs_reply_query_info(&q_u, rdata, 0x0);
82 /*******************************************************************
84 ********************************************************************/
85 struct api_struct api_brs_cmds[] =
87 { "BRS_Q_QUERY_INFO", BRS_QUERY_INFO, api_brs_query_info },
91 /*******************************************************************
92 receives a browser pipe and responds.
93 ********************************************************************/
94 BOOL api_brs_rpc(rpcsrv_struct *p, prs_struct *data)
96 return api_rpcTNP(p, "api_brssvc_rpc", api_brs_cmds, data);