tevent: call epoll_panic() if EPOLL_CTL_DEL failed
[Samba/gebeck_regimport.git] / source3 / rpc_client / cli_pipe.h
blobbf785fb0b52147c4897fc6a3e970a498d8079b82
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"
28 /* The following definitions come from rpc_client/cli_pipe.c */
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);
36 NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req,
37 TALLOC_CTX *mem_ctx,
38 DATA_BLOB *reply_pdu);
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);
45 NTSTATUS rpc_pipe_bind_recv(struct tevent_req *req);
47 NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
48 struct pipe_auth_data *auth);
50 unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
51 unsigned int timeout);
53 bool rpccli_is_connected(struct rpc_pipe_client *rpc_cli);
55 NTSTATUS rpccli_ncalrpc_bind_data(TALLOC_CTX *mem_ctx,
56 struct pipe_auth_data **presult);
58 NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
59 struct pipe_auth_data **presult);
61 NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx,
62 const char *domain,
63 enum dcerpc_AuthLevel auth_level,
64 struct netlogon_creds_CredentialState *creds,
65 struct pipe_auth_data **presult);
67 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx,
68 const char *host,
69 const struct sockaddr_storage *ss_addr,
70 const struct ndr_syntax_id *abstract_syntax,
71 struct rpc_pipe_client **presult);
73 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
74 const struct ndr_syntax_id *abstract_syntax,
75 struct rpc_pipe_client **presult);
77 struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c);
79 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
80 const struct ndr_syntax_id *interface,
81 struct rpc_pipe_client **presult);
83 NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
84 enum dcerpc_transport_t transport,
85 const struct ndr_syntax_id *interface,
86 struct rpc_pipe_client **presult);
88 NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli,
89 const struct ndr_interface_table *table,
90 enum dcerpc_transport_t transport,
91 enum dcerpc_AuthType auth_type,
92 enum dcerpc_AuthLevel auth_level,
93 const char *server,
94 const char *domain,
95 const char *username,
96 const char *password,
97 struct rpc_pipe_client **presult);
99 NTSTATUS cli_rpc_pipe_open_spnego(struct cli_state *cli,
100 const struct ndr_interface_table *table,
101 enum dcerpc_transport_t transport,
102 const char *oid,
103 enum dcerpc_AuthLevel auth_level,
104 const char *server,
105 const char *domain,
106 const char *username,
107 const char *password,
108 struct rpc_pipe_client **presult);
110 NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
111 const struct ndr_syntax_id *interface,
112 enum dcerpc_transport_t transport,
113 enum dcerpc_AuthLevel auth_level,
114 const char *domain,
115 struct netlogon_creds_CredentialState **pdc,
116 struct rpc_pipe_client **presult);
118 NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
119 const struct ndr_syntax_id *interface,
120 enum dcerpc_transport_t transport,
121 enum dcerpc_AuthLevel auth_level,
122 const char *domain,
123 const char *username,
124 const char *password,
125 struct rpc_pipe_client **presult);
127 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
128 const struct ndr_syntax_id *interface,
129 enum dcerpc_transport_t transport,
130 enum dcerpc_AuthLevel auth_level,
131 const char *domain,
132 struct rpc_pipe_client **presult);
134 NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli,
135 const struct ndr_syntax_id *interface,
136 enum dcerpc_transport_t transport,
137 enum dcerpc_AuthLevel auth_level,
138 const char *service_princ,
139 const char *username,
140 const char *password,
141 struct rpc_pipe_client **presult);
143 NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
144 struct rpc_pipe_client *cli,
145 DATA_BLOB *session_key);
147 /* The following definitions come from rpc_client/cli_pipe_schannel.c */
149 NTSTATUS get_schannel_session_key(struct cli_state *cli,
150 const char *domain,
151 uint32 *pneg_flags,
152 struct rpc_pipe_client **presult);
154 #endif /* _CLI_PIPE_H */
156 /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */