s4-torture: smb2 copychunk data integrity checks
[Samba/gbeck.git] / source3 / libsmb / cli_np_tstream.h
blobb7def34c48a3b65d582fdafb9ac367e1fbdd5d55
1 /*
2 Unix SMB/CIFS implementation.
4 Copyright (C) Stefan Metzmacher 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 _CLI_NP_TSTREAM_H_
21 #define _CLI_NP_TSTREAM_H_
23 struct tevent_context;
24 struct tevent_req;
25 struct cli_state;
26 struct tstream_context;
28 struct tevent_req *tstream_cli_np_open_send(TALLOC_CTX *mem_ctx,
29 struct tevent_context *ev,
30 struct cli_state *cli,
31 const char *npipe);
32 NTSTATUS _tstream_cli_np_open_recv(struct tevent_req *req,
33 TALLOC_CTX *mem_ctx,
34 struct tstream_context **_stream,
35 const char *location);
36 #define tstream_cli_np_open_recv(req, mem_ctx, stream) \
37 _tstream_cli_np_open_recv(req, mem_ctx, stream, __location__)
39 NTSTATUS _tstream_cli_np_existing(TALLOC_CTX *mem_ctx,
40 struct cli_state *cli,
41 uint16_t fnum,
42 struct tstream_context **_stream,
43 const char *location);
44 #define tstream_cli_np_existing(mem_ctx, cli, npipe, stream) \
45 _tstream_cli_np_existing(mem_ctx, cli, npipe, stream, __location__)
47 bool tstream_is_cli_np(struct tstream_context *stream);
49 NTSTATUS tstream_cli_np_use_trans(struct tstream_context *stream);
51 unsigned int tstream_cli_np_set_timeout(struct tstream_context *stream,
52 unsigned int timeout);
54 struct cli_state *tstream_cli_np_get_cli_state(struct tstream_context *stream);
56 #endif /* _CLI_NP_TSTREAM_H_ */