rpc: Always supply both the remote and local address to the auth subsystem
[Samba.git] / source3 / rpc_server / rpc_ncacn_np.h
blob2ae126dec9edf44d147257559aca87627e6338b4
1 /*
2 Unix SMB/Netbios implementation.
3 RPC Server Headers
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 dcerpc_binding_handle;
24 struct ndr_interface_table;
25 struct tsocket_address;
27 struct npa_state {
28 struct tstream_context *stream;
30 struct tevent_queue *read_queue;
31 struct tevent_queue *write_queue;
33 uint64_t allocation_size;
34 uint16_t device_state;
35 uint16_t file_type;
37 void *private_data;
40 NTSTATUS make_external_rpc_pipe(TALLOC_CTX *mem_ctx,
41 const char *pipe_name,
42 const struct tsocket_address *local_address,
43 const struct tsocket_address *remote_address,
44 const struct auth_session_info *session_info,
45 struct npa_state **pnpa);
47 NTSTATUS make_internal_rpc_pipe_socketpair(TALLOC_CTX *mem_ctx,
48 struct tevent_context *ev_ctx,
49 struct messaging_context *msg_ctx,
50 const char *pipe_name,
51 const struct ndr_syntax_id *syntax,
52 const struct tsocket_address *remote_address,
53 const struct auth_session_info *session_info,
54 struct npa_state **pnpa);
56 struct np_proxy_state {
57 uint16_t file_type;
58 uint16_t device_state;
59 uint64_t allocation_size;
60 struct tstream_context *npipe;
61 struct tevent_queue *read_queue;
62 struct tevent_queue *write_queue;
65 struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
66 const struct ndr_syntax_id *syntax,
67 const struct tsocket_address *remote_address,
68 const struct tsocket_address *local_address,
69 const struct auth_session_info *session_info,
70 struct messaging_context *msg_ctx);
71 struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
72 const char *pipe_name,
73 const struct tsocket_address *local_address,
74 const struct tsocket_address *remote_address,
75 const struct auth_session_info *session_info);
76 NTSTATUS rpcint_binding_handle(TALLOC_CTX *mem_ctx,
77 const struct ndr_interface_table *ndr_table,
78 const struct tsocket_address *remote_address,
79 const struct tsocket_address *local_address,
80 const struct auth_session_info *session_info,
81 struct messaging_context *msg_ctx,
82 struct dcerpc_binding_handle **binding_handle);
83 NTSTATUS rpc_pipe_open_interface(TALLOC_CTX *mem_ctx,
84 const struct ndr_interface_table *table,
85 const struct auth_session_info *session_info,
86 const struct tsocket_address *remote_address,
87 const struct tsocket_address *local_address,
88 struct messaging_context *msg_ctx,
89 struct rpc_pipe_client **cli_pipe);
91 NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
92 const struct ndr_interface_table *ndr_table,
93 const struct auth_session_info *session_info,
94 const struct tsocket_address *remote_address,
95 const struct tsocket_address *local_address,
96 struct messaging_context *msg_ctx,
97 struct rpc_pipe_client **presult);
99 #endif /* _RPC_NCACN_NP_H_ */