s3:smb2_sesssetup: cancel and wait for pending requests on logoff
[Samba.git] / source3 / rpc_server / srv_pipe_hnd.h
blob286efe057730d67dbfe025a87327b4aa76864bba
1 /*
2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
4 * Copyright (C) Andrew Tridgell 1992-1998,
5 * Largely re-written : 2005
6 * Copyright (C) Jeremy Allison 1998 - 2005
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #ifndef _RPC_SERVER_SRV_PIPE_HND_H_
23 #define _RPC_SERVER_SRV_PIPE_HND_H_
25 struct tsocket_address;
26 struct pipes_struct;
28 /* The following definitions come from rpc_server/srv_pipe_hnd.c */
30 bool fsp_is_np(struct files_struct *fsp);
31 NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
32 const struct tsocket_address *local_address,
33 const struct tsocket_address *remote_address,
34 struct auth_session_info *session_info,
35 struct messaging_context *msg_ctx,
36 struct fake_file_handle **phandle);
37 bool np_read_in_progress(struct fake_file_handle *handle);
38 struct tevent_req *np_write_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
39 struct fake_file_handle *handle,
40 const uint8_t *data, size_t len);
41 NTSTATUS np_write_recv(struct tevent_req *req, ssize_t *pnwritten);
42 struct tevent_req *np_read_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
43 struct fake_file_handle *handle,
44 uint8_t *data, size_t len);
45 NTSTATUS np_read_recv(struct tevent_req *req, ssize_t *nread,
46 bool *is_data_outstanding);
48 ssize_t process_incoming_data(struct pipes_struct *p, const char *data, size_t n);
50 #endif /* _RPC_SERVER_SRV_PIPE_HND_H_ */