s3:rpc_client: make rpccli_schannel_bind_data() static
[bbaumbach/samba-autobuild/.git] / source3 / rpc_client / cli_pipe.h
1 /*
2  *  Unix SMB/CIFS implementation.
3  *
4  *  RPC Pipe client routines
5  *
6  *  Copyright (c) 2005      Jeremy Allison
7  *  Copyright (c) 2010      Simo Sorce
8  *
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.
13  *
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.
18  *
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/>.
21  */
22
23 #ifndef _CLI_PIPE_H
24 #define _CLI_PIPE_H
25
26 #include "rpc_client/rpc_client.h"
27
28 /* The following definitions come from rpc_client/cli_pipe.c  */
29
30 struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx,
31                                          struct tevent_context *ev,
32                                          struct rpc_pipe_client *cli,
33                                          uint8_t op_num,
34                                          DATA_BLOB *req_data);
35
36 NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req,
37                                TALLOC_CTX *mem_ctx,
38                                DATA_BLOB *reply_pdu);
39
40 struct tevent_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx,
41                                       struct tevent_context *ev,
42                                       struct rpc_pipe_client *cli,
43                                       struct pipe_auth_data *auth);
44
45 NTSTATUS rpc_pipe_bind_recv(struct tevent_req *req);
46
47 NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
48                        struct pipe_auth_data *auth);
49
50 unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
51                                 unsigned int timeout);
52
53 bool rpccli_is_connected(struct rpc_pipe_client *rpc_cli);
54
55 NTSTATUS rpccli_ncalrpc_bind_data(TALLOC_CTX *mem_ctx,
56                                   struct pipe_auth_data **presult);
57
58 NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
59                                struct pipe_auth_data **presult);
60
61 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx,
62                            const char *host,
63                            const struct sockaddr_storage *ss_addr,
64                            const struct ndr_interface_table *table,
65                            struct rpc_pipe_client **presult);
66
67 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
68                                const struct ndr_interface_table *table,
69                                struct rpc_pipe_client **presult);
70
71 struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c);
72
73 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
74                                   const struct ndr_interface_table *table,
75                                   struct rpc_pipe_client **presult);
76
77 NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
78                                             enum dcerpc_transport_t transport,
79                                             const struct ndr_interface_table *table,
80                                             struct rpc_pipe_client **presult);
81
82 NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli,
83                                         const struct ndr_interface_table *table,
84                                         enum dcerpc_transport_t transport,
85                                         enum dcerpc_AuthType auth_type,
86                                         enum dcerpc_AuthLevel auth_level,
87                                         const char *server,
88                                         const char *domain,
89                                         const char *username,
90                                         const char *password,
91                                         struct rpc_pipe_client **presult);
92
93 NTSTATUS cli_rpc_pipe_open_spnego(struct cli_state *cli,
94                                   const struct ndr_interface_table *table,
95                                   enum dcerpc_transport_t transport,
96                                   const char *oid,
97                                   enum dcerpc_AuthLevel auth_level,
98                                   const char *server,
99                                   const char *domain,
100                                   const char *username,
101                                   const char *password,
102                                   struct rpc_pipe_client **presult);
103
104 NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
105                                              const struct ndr_interface_table *table,
106                                              enum dcerpc_transport_t transport,
107                                              enum dcerpc_AuthLevel auth_level,
108                                              const char *domain,
109                                              struct netlogon_creds_CredentialState **pdc,
110                                              struct rpc_pipe_client **presult);
111
112 NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
113                                                  const struct ndr_interface_table *table,
114                                                  enum dcerpc_transport_t transport,
115                                                  enum dcerpc_AuthLevel auth_level,
116                                                  const char *domain,
117                                                  const char *username,
118                                                  const char *password,
119                                                  struct rpc_pipe_client **presult);
120
121 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
122                                     const struct ndr_interface_table *table,
123                                     enum dcerpc_transport_t transport,
124                                     enum dcerpc_AuthLevel auth_level,
125                                     const char *domain,
126                                     struct rpc_pipe_client **presult);
127
128 NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
129                              struct rpc_pipe_client *cli,
130                              DATA_BLOB *session_key);
131
132 /* The following definitions come from rpc_client/cli_pipe_schannel.c  */
133
134 NTSTATUS get_schannel_session_key(struct cli_state *cli,
135                                   const char *domain,
136                                   uint32 *pneg_flags,
137                                   struct rpc_pipe_client **presult);
138
139 #endif /* _CLI_PIPE_H */
140
141 /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */