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 event_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 event_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 | bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
|
---|
56 |
|
---|
57 | NTSTATUS rpccli_ncalrpc_bind_data(TALLOC_CTX *mem_ctx,
|
---|
58 | struct pipe_auth_data **presult);
|
---|
59 |
|
---|
60 | NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
|
---|
61 | struct pipe_auth_data **presult);
|
---|
62 |
|
---|
63 | NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx,
|
---|
64 | const char *domain,
|
---|
65 | enum dcerpc_AuthLevel auth_level,
|
---|
66 | struct netlogon_creds_CredentialState *creds,
|
---|
67 | struct pipe_auth_data **presult);
|
---|
68 |
|
---|
69 | NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx,
|
---|
70 | const char *host,
|
---|
71 | const struct ndr_syntax_id *abstract_syntax,
|
---|
72 | struct rpc_pipe_client **presult);
|
---|
73 |
|
---|
74 | NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
|
---|
75 | const struct ndr_syntax_id *abstract_syntax,
|
---|
76 | struct rpc_pipe_client **presult);
|
---|
77 |
|
---|
78 | struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c);
|
---|
79 |
|
---|
80 | NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
|
---|
81 | const struct ndr_syntax_id *interface,
|
---|
82 | struct rpc_pipe_client **presult);
|
---|
83 |
|
---|
84 | NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
|
---|
85 | enum dcerpc_transport_t transport,
|
---|
86 | const struct ndr_syntax_id *interface,
|
---|
87 | struct rpc_pipe_client **presult);
|
---|
88 |
|
---|
89 | NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
|
---|
90 | const struct ndr_syntax_id *interface,
|
---|
91 | enum dcerpc_transport_t transport,
|
---|
92 | enum dcerpc_AuthLevel auth_level,
|
---|
93 | const char *domain,
|
---|
94 | const char *username,
|
---|
95 | const char *password,
|
---|
96 | struct rpc_pipe_client **presult);
|
---|
97 |
|
---|
98 | NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
|
---|
99 | const struct ndr_syntax_id *interface,
|
---|
100 | enum dcerpc_transport_t transport,
|
---|
101 | enum dcerpc_AuthLevel auth_level,
|
---|
102 | const char *domain,
|
---|
103 | const char *username,
|
---|
104 | const char *password,
|
---|
105 | struct rpc_pipe_client **presult);
|
---|
106 |
|
---|
107 | NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
|
---|
108 | const struct ndr_syntax_id *interface,
|
---|
109 | enum dcerpc_transport_t transport,
|
---|
110 | enum dcerpc_AuthLevel auth_level,
|
---|
111 | const char *domain,
|
---|
112 | struct netlogon_creds_CredentialState **pdc,
|
---|
113 | struct rpc_pipe_client **presult);
|
---|
114 |
|
---|
115 | NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
|
---|
116 | const struct ndr_syntax_id *interface,
|
---|
117 | enum dcerpc_transport_t transport,
|
---|
118 | enum dcerpc_AuthLevel auth_level,
|
---|
119 | const char *domain,
|
---|
120 | const char *username,
|
---|
121 | const char *password,
|
---|
122 | struct rpc_pipe_client **presult);
|
---|
123 |
|
---|
124 | NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
|
---|
125 | const struct ndr_syntax_id *interface,
|
---|
126 | enum dcerpc_transport_t transport,
|
---|
127 | enum dcerpc_AuthLevel auth_level,
|
---|
128 | const char *domain,
|
---|
129 | struct rpc_pipe_client **presult);
|
---|
130 |
|
---|
131 | NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli,
|
---|
132 | const struct ndr_syntax_id *interface,
|
---|
133 | enum dcerpc_transport_t transport,
|
---|
134 | enum dcerpc_AuthLevel auth_level,
|
---|
135 | const char *service_princ,
|
---|
136 | const char *username,
|
---|
137 | const char *password,
|
---|
138 | struct rpc_pipe_client **presult);
|
---|
139 |
|
---|
140 | NTSTATUS cli_rpc_pipe_open_spnego_krb5(struct cli_state *cli,
|
---|
141 | const struct ndr_syntax_id *interface,
|
---|
142 | enum dcerpc_transport_t transport,
|
---|
143 | enum dcerpc_AuthLevel auth_level,
|
---|
144 | const char *server,
|
---|
145 | const char *username,
|
---|
146 | const char *password,
|
---|
147 | struct rpc_pipe_client **presult);
|
---|
148 |
|
---|
149 | NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
|
---|
150 | struct rpc_pipe_client *cli,
|
---|
151 | DATA_BLOB *session_key);
|
---|
152 |
|
---|
153 | /* The following definitions come from rpc_client/cli_pipe_schannel.c */
|
---|
154 |
|
---|
155 | NTSTATUS get_schannel_session_key(struct cli_state *cli,
|
---|
156 | const char *domain,
|
---|
157 | uint32 *pneg_flags,
|
---|
158 | struct rpc_pipe_client **presult);
|
---|
159 |
|
---|
160 | #endif /* _CLI_PIPE_H */
|
---|
161 |
|
---|
162 | /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */
|
---|