2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
4 * Copyright (C) Andrew Tridgell 1992-1997,
5 * Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
6 * Copyright (C) Paul Ashton 1997,
7 * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003.
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.
24 /* This is the interface to the wks pipe. */
29 #define DBGC_CLASS DBGC_RPC_SRV
31 /*******************************************************************
33 ********************************************************************/
35 static BOOL
api_wks_query_info(pipes_struct
*p
)
39 prs_struct
*data
= &p
->in_data
.data
;
40 prs_struct
*rdata
= &p
->out_data
.rdata
;
45 /* grab the net share enum */
46 if(!wks_io_q_query_info("", &q_u
, data
, 0))
49 r_u
.status
= _wks_query_info(p
, &q_u
, &r_u
);
51 /* store the response in the SMB stream */
52 if(!wks_io_r_query_info("", &r_u
, rdata
, 0))
59 /*******************************************************************
61 ********************************************************************/
63 static struct api_struct api_wks_cmds
[] =
65 { "WKS_Q_QUERY_INFO", WKS_QUERY_INFO
, api_wks_query_info
}
68 void wkssvc_get_pipe_fns( struct api_struct
**fns
, int *n_fns
)
71 *n_fns
= sizeof(api_wks_cmds
) / sizeof(struct api_struct
);
74 NTSTATUS
rpc_wks_init(void)
76 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "wkssvc", "ntsvcs", api_wks_cmds
,
77 sizeof(api_wks_cmds
) / sizeof(struct api_struct
));