selftest: Move MIT Kerberos knownfails to separate files in their own directory
[Samba.git] / source3 / rpc_client / cli_pipe.h
blobd9826ca8e5cdb2a5c3854ee39c96660fdc177d04
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 struct tevent_req *rpc_pipe_open_np_send(
42 TALLOC_CTX *mem_ctx,
43 struct tevent_context *ev,
44 struct cli_state *cli,
45 const struct ndr_interface_table *table);
46 NTSTATUS rpc_pipe_open_np_recv(
47 struct tevent_req *req,
48 TALLOC_CTX *mem_ctx,
49 struct rpc_pipe_client **_result);
50 NTSTATUS rpc_pipe_open_np(struct cli_state *cli,
51 const struct ndr_interface_table *table,
52 struct rpc_pipe_client **presult);
54 unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
55 unsigned int timeout);
57 bool rpccli_is_connected(struct rpc_pipe_client *rpc_cli);
59 NTSTATUS rpccli_ncalrpc_bind_data(TALLOC_CTX *mem_ctx,
60 struct pipe_auth_data **presult);
62 NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
63 struct pipe_auth_data **presult);
65 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx,
66 const struct ndr_interface_table *table,
67 struct rpc_pipe_client **presult);
69 NTSTATUS rpc_pipe_open_local_np(
70 TALLOC_CTX *mem_ctx,
71 const struct ndr_interface_table *table,
72 const char *remote_client_name,
73 const struct tsocket_address *remote_client_addr,
74 const char *local_server_name,
75 const struct tsocket_address *local_server_addr,
76 const struct auth_session_info *session_info,
77 struct rpc_pipe_client **presult);
79 struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c,
80 const struct GUID *object,
81 const struct ndr_interface_table *table);
83 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
84 const struct ndr_interface_table *table,
85 struct rpc_pipe_client **presult);
87 NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
88 enum dcerpc_transport_t transport,
89 const struct ndr_interface_table *table,
90 const char *remote_name,
91 const struct sockaddr_storage *remote_sockaddr,
92 struct rpc_pipe_client **presult);
94 /****************************************************************************
95 Open a named pipe to an SMB server and bind using the mech specified
97 This routine steals the creds pointer that is passed in
98 ****************************************************************************/
100 NTSTATUS cli_rpc_pipe_open_with_creds(struct cli_state *cli,
101 const struct ndr_interface_table *table,
102 enum dcerpc_transport_t transport,
103 enum dcerpc_AuthType auth_type,
104 enum dcerpc_AuthLevel auth_level,
105 const char *server,
106 const struct sockaddr_storage *remote_sockaddr,
107 struct cli_credentials *creds,
108 struct rpc_pipe_client **presult);
110 NTSTATUS cli_rpc_pipe_open_bind_schannel(
111 struct cli_state *cli,
112 const struct ndr_interface_table *table,
113 enum dcerpc_transport_t transport,
114 struct netlogon_creds_cli_context *netlogon_creds,
115 const char *remote_name,
116 const struct sockaddr_storage *remote_sockaddr,
117 struct rpc_pipe_client **_rpccli);
118 NTSTATUS cli_rpc_pipe_open_schannel_with_creds(struct cli_state *cli,
119 const struct ndr_interface_table *table,
120 enum dcerpc_transport_t transport,
121 struct netlogon_creds_cli_context *netlogon_creds,
122 const char *remote_name,
123 const struct sockaddr_storage *remote_sockaddr,
124 struct rpc_pipe_client **_rpccli);
126 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
127 struct messaging_context *msg_ctx,
128 const struct ndr_interface_table *table,
129 enum dcerpc_transport_t transport,
130 const char *domain,
131 const char *remote_name,
132 const struct sockaddr_storage *remote_sockaddr,
133 struct rpc_pipe_client **presult,
134 TALLOC_CTX *mem_ctx,
135 struct netlogon_creds_cli_context **pcreds);
137 NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
138 struct rpc_pipe_client *cli,
139 DATA_BLOB *session_key);
141 #endif /* _CLI_PIPE_H */
143 /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */