2 Unix SMB/Netbios implementation.
4 Copyright (C) Simo Sorce 2010
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.
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.
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/>.
20 #ifndef _RPC_NCACN_NP_H_
21 #define _RPC_NCACN_NP_H_
23 struct rpc_pipe_client;
24 struct dcerpc_binding_handle;
25 struct ndr_interface_table;
26 struct tsocket_address;
29 struct tstream_context *stream;
31 struct tevent_queue *read_queue;
32 struct tevent_queue *write_queue;
34 uint64_t allocation_size;
35 uint16_t device_state;
41 NTSTATUS make_external_rpc_pipe(TALLOC_CTX *mem_ctx,
42 const char *pipe_name,
43 const struct tsocket_address *remote_client_address,
44 const struct tsocket_address *local_server_address,
45 const struct auth_session_info *session_info,
46 struct npa_state **pnpa);
48 NTSTATUS make_internal_rpc_pipe_socketpair(
50 struct tevent_context *ev_ctx,
51 struct messaging_context *msg_ctx,
52 const char *pipe_name,
53 const struct ndr_syntax_id *syntax,
54 const struct tsocket_address *remote_address,
55 const struct tsocket_address *local_address,
56 const struct auth_session_info *session_info,
57 struct npa_state **pnpa);
59 struct np_proxy_state {
61 uint16_t device_state;
62 uint64_t allocation_size;
63 struct tstream_context *npipe;
64 struct tevent_queue *read_queue;
65 struct tevent_queue *write_queue;
68 struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
69 const struct ndr_syntax_id *syntax,
70 const struct tsocket_address *remote_address,
71 const struct tsocket_address *local_address,
72 const struct auth_session_info *session_info,
73 struct messaging_context *msg_ctx);
74 struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
75 const char *pipe_name,
76 const struct tsocket_address *remote_client_address,
77 const struct tsocket_address *local_server_address,
78 const struct auth_session_info *session_info);
79 NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
80 const struct ndr_interface_table *ndr_table,
81 const struct tsocket_address *remote_address,
82 const struct tsocket_address *local_address,
83 const struct auth_session_info *session_info,
84 struct messaging_context *msg_ctx,
85 struct dcerpc_binding_handle **binding_handle);
86 NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
87 const struct ndr_interface_table *table,
88 const struct auth_session_info *session_info,
89 const struct tsocket_address *remote_address,
90 const struct tsocket_address *local_address,
91 struct messaging_context *msg_ctx,
92 struct rpc_pipe_client **cli_pipe);
94 NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
95 const struct ndr_interface_table *ndr_table,
96 const struct auth_session_info *session_info,
97 const struct tsocket_address *remote_address,
98 const struct tsocket_address *local_address,
99 struct messaging_context *msg_ctx,
100 struct rpc_pipe_client **presult);
102 #endif /* _RPC_NCACN_NP_H_ */