2 Unix SMB/Netbios implementation.
4 Copyright (C) Andrew Tridgell 1992-1997
5 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
6 Copyright (C) Paul Ashton 1997
7 Copyright (C) Jeremy Allison 2000-2004
8 Copyright (C) Simo Sorce 2010-2011
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
27 #include "librpc/rpc/dcerpc.h"
29 struct dcesrv_ep_entry_list
;
30 struct tsocket_address
;
32 struct dcesrv_context
;
35 * DCE/RPC-specific samba-internal-specific handling of data on
39 struct pipes_struct
*next
, *prev
;
41 const struct tsocket_address
*local_address
;
42 const struct tsocket_address
*remote_address
;
44 enum dcerpc_transport_t transport
;
46 struct auth_session_info
*session_info
;
47 struct messaging_context
*msg_ctx
;
49 struct dcesrv_ep_entry_list
*ep_entries
;
51 struct pipe_auth_data auth
;
54 * Set to true when an RPC bind has been done on this pipe.
59 * Set the DCERPC_FAULT to return.
63 /* This context is used for PDU data and is freed between each pdu.
64 Don't use for pipe state storage. */
67 /* handle database to use on this pipe. */
68 struct dcesrv_call_state
*dce_call
;
70 /* call id retrieved from the pdu header */
73 /* operation number retrieved from the rpc header */
76 /* private data for the interface implementation */
81 int make_base_pipes_struct(TALLOC_CTX
*mem_ctx
,
82 struct messaging_context
*msg_ctx
,
83 const char *pipe_name
,
84 enum dcerpc_transport_t transport
,
85 const struct tsocket_address
*remote_address
,
86 const struct tsocket_address
*local_address
,
87 struct pipes_struct
**_p
);
89 bool check_open_pipes(void);
90 size_t num_pipe_handles(void);
92 bool create_policy_hnd(struct pipes_struct
*p
,
93 struct policy_handle
*hnd
,
97 void *_find_policy_by_hnd(struct pipes_struct
*p
,
98 const struct policy_handle
*hnd
,
101 #define find_policy_by_hnd(_p, _hnd, _hnd_type, _type, _pstatus) \
102 (_type *)_find_policy_by_hnd((_p), (_hnd), (_hnd_type), (_pstatus));
104 bool close_policy_hnd(struct pipes_struct
*p
, struct policy_handle
*hnd
);
105 void close_policy_by_pipe(struct pipes_struct
*p
);
106 bool pipe_access_check(struct pipes_struct
*p
);
108 #endif /* _RPC_PIPES_H_ */