s3:rpc_client: Add remote name and socket to cli_rpc_pipe_open_bind_schannel()
[Samba.git] / source3 / rpc_client / cli_pipe.h
blob43cd5f0b96cfb3ace3350d94eecdacdba840d12c
1 /*
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/>.
23 #ifndef _CLI_PIPE_H
24 #define _CLI_PIPE_H
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_ncalrpc(TALLOC_CTX *mem_ctx,
53 const struct ndr_interface_table *table,
54 struct rpc_pipe_client **presult);
56 struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c,
57 const struct GUID *object,
58 const struct ndr_interface_table *table);
60 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
61 const struct ndr_interface_table *table,
62 struct rpc_pipe_client **presult);
64 NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
65 enum dcerpc_transport_t transport,
66 const struct ndr_interface_table *table,
67 const char *remote_name,
68 const struct sockaddr_storage *remote_sockaddr,
69 struct rpc_pipe_client **presult);
71 /****************************************************************************
72 Open a named pipe to an SMB server and bind using the mech specified
74 This routine steals the creds pointer that is passed in
75 ****************************************************************************/
77 NTSTATUS cli_rpc_pipe_open_with_creds(struct cli_state *cli,
78 const struct ndr_interface_table *table,
79 enum dcerpc_transport_t transport,
80 enum dcerpc_AuthType auth_type,
81 enum dcerpc_AuthLevel auth_level,
82 const char *server,
83 const struct sockaddr_storage *remote_sockaddr,
84 struct cli_credentials *creds,
85 struct rpc_pipe_client **presult);
87 NTSTATUS cli_rpc_pipe_open_bind_schannel(
88 struct cli_state *cli,
89 const struct ndr_interface_table *table,
90 enum dcerpc_transport_t transport,
91 struct netlogon_creds_cli_context *netlogon_creds,
92 const char *remote_name,
93 const struct sockaddr_storage *remote_sockaddr,
94 struct rpc_pipe_client **_rpccli);
95 NTSTATUS cli_rpc_pipe_open_schannel_with_creds(struct cli_state *cli,
96 const struct ndr_interface_table *table,
97 enum dcerpc_transport_t transport,
98 struct netlogon_creds_cli_context *netlogon_creds,
99 struct rpc_pipe_client **_rpccli);
101 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
102 struct messaging_context *msg_ctx,
103 const struct ndr_interface_table *table,
104 enum dcerpc_transport_t transport,
105 const char *domain,
106 const char *remote_name,
107 const struct sockaddr_storage *remote_sockaddr,
108 struct rpc_pipe_client **presult,
109 TALLOC_CTX *mem_ctx,
110 struct netlogon_creds_cli_context **pcreds);
112 NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
113 struct rpc_pipe_client *cli,
114 DATA_BLOB *session_key);
116 #endif /* _CLI_PIPE_H */
118 /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */