Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
[idra/samba.git] / source3 / rpc_server / rpc_ncacn_np.h
1 /*
2    Unix SMB/Netbios implementation.
3    RPC Server Headers
4    Copyright (C) Simo Sorce 2010
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef _RPC_NCACN_NP_H_
21 #define _RPC_NCACN_NP_H_
22
23 struct dcerpc_binding_handle;
24 struct ndr_interface_table;
25 struct tsocket_address;
26
27 struct np_proxy_state {
28         uint16_t file_type;
29         uint16_t device_state;
30         uint64_t allocation_size;
31         struct tstream_context *npipe;
32         struct tevent_queue *read_queue;
33         struct tevent_queue *write_queue;
34 };
35
36 struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
37                                               const struct ndr_syntax_id *syntax,
38                                               struct client_address *client_id,
39                                               const struct auth_serversupplied_info *session_info,
40                                               struct messaging_context *msg_ctx);
41 struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
42                                 const char *pipe_name,
43                                 const struct tsocket_address *local_address,
44                                 const struct tsocket_address *remote_address,
45                                 const struct auth_serversupplied_info *session_info);
46 NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
47                                const struct ndr_interface_table *ndr_table,
48                                struct client_address *client_id,
49                                const struct auth_serversupplied_info *session_info,
50                                struct messaging_context *msg_ctx,
51                                struct dcerpc_binding_handle **binding_handle);
52 NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
53                                  const struct ndr_syntax_id *syntax,
54                                  const struct auth_serversupplied_info *session_info,
55                                  struct client_address *client_id,
56                                  struct messaging_context *msg_ctx,
57                                  struct rpc_pipe_client **cli_pipe);
58
59 struct pipes_struct *get_first_internal_pipe(void);
60 struct pipes_struct *get_next_internal_pipe(struct pipes_struct *p);
61 bool check_open_pipes(void);
62 int close_internal_rpc_pipe_hnd(struct pipes_struct *p);
63
64 #endif /* _RPC_NCACN_NP_H_ */