2 * Unix SMB/CIFS implementation.
4 * RPC Pipe client routines
6 * Copyright (c) 2005 Jeremy Allison
7 * Copyright (c) 2010 Simo Sorce
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 3 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, see <http://www.gnu.org/licenses/>.
26 #include "rpc_client/rpc_client.h"
27 #include "auth/credentials/credentials.h"
29 /* The following definitions come from rpc_client/cli_pipe.c */
31 struct tevent_req
*rpc_pipe_bind_send(TALLOC_CTX
*mem_ctx
,
32 struct tevent_context
*ev
,
33 struct rpc_pipe_client
*cli
,
34 struct pipe_auth_data
*auth
);
36 NTSTATUS
rpc_pipe_bind_recv(struct tevent_req
*req
);
38 NTSTATUS
rpc_pipe_bind(struct rpc_pipe_client
*cli
,
39 struct pipe_auth_data
*auth
);
41 unsigned int rpccli_set_timeout(struct rpc_pipe_client
*cli
,
42 unsigned int timeout
);
44 bool rpccli_is_connected(struct rpc_pipe_client
*rpc_cli
);
46 NTSTATUS
rpccli_ncalrpc_bind_data(TALLOC_CTX
*mem_ctx
,
47 struct pipe_auth_data
**presult
);
49 NTSTATUS
rpccli_anon_bind_data(TALLOC_CTX
*mem_ctx
,
50 struct pipe_auth_data
**presult
);
52 NTSTATUS
rpc_pipe_open_tcp(TALLOC_CTX
*mem_ctx
,
54 const struct sockaddr_storage
*ss_addr
,
55 const struct ndr_interface_table
*table
,
56 struct rpc_pipe_client
**presult
);
58 NTSTATUS
rpc_pipe_open_ncalrpc(TALLOC_CTX
*mem_ctx
, const char *socket_path
,
59 const struct ndr_interface_table
*table
,
60 struct rpc_pipe_client
**presult
);
62 struct dcerpc_binding_handle
*rpccli_bh_create(struct rpc_pipe_client
*c
,
63 const struct GUID
*object
,
64 const struct ndr_interface_table
*table
);
66 NTSTATUS
cli_rpc_pipe_open_noauth(struct cli_state
*cli
,
67 const struct ndr_interface_table
*table
,
68 struct rpc_pipe_client
**presult
);
70 NTSTATUS
cli_rpc_pipe_open_noauth_transport(struct cli_state
*cli
,
71 enum dcerpc_transport_t transport
,
72 const struct ndr_interface_table
*table
,
73 struct rpc_pipe_client
**presult
);
75 /****************************************************************************
76 Open a named pipe to an SMB server and bind using the mech specified
78 This routine steals the creds pointer that is passed in
79 ****************************************************************************/
81 NTSTATUS
cli_rpc_pipe_open_with_creds(struct cli_state
*cli
,
82 const struct ndr_interface_table
*table
,
83 enum dcerpc_transport_t transport
,
84 enum dcerpc_AuthType auth_type
,
85 enum dcerpc_AuthLevel auth_level
,
87 struct cli_credentials
*creds
,
88 struct rpc_pipe_client
**presult
);
90 NTSTATUS
cli_rpc_pipe_open_generic_auth(struct cli_state
*cli
,
91 const struct ndr_interface_table
*table
,
92 enum dcerpc_transport_t transport
,
93 enum credentials_use_kerberos use_kerberos
,
94 enum dcerpc_AuthType auth_type
,
95 enum dcerpc_AuthLevel auth_level
,
100 struct rpc_pipe_client
**presult
);
102 NTSTATUS
cli_rpc_pipe_open_schannel_with_key(struct cli_state
*cli
,
103 const struct ndr_interface_table
*table
,
104 enum dcerpc_transport_t transport
,
106 struct netlogon_creds_cli_context
*netlogon_creds
,
107 struct rpc_pipe_client
**presult
);
109 NTSTATUS
cli_rpc_pipe_open_schannel(struct cli_state
*cli
,
110 struct messaging_context
*msg_ctx
,
111 const struct ndr_interface_table
*table
,
112 enum dcerpc_transport_t transport
,
113 enum dcerpc_AuthLevel auth_level
,
115 struct rpc_pipe_client
**presult
,
117 struct netlogon_creds_cli_context
**pcreds
);
119 NTSTATUS
cli_get_session_key(TALLOC_CTX
*mem_ctx
,
120 struct rpc_pipe_client
*cli
,
121 DATA_BLOB
*session_key
);
123 #endif /* _CLI_PIPE_H */
125 /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */