Remove cli->event_ctx, pass it explicitly
[jra/samba/.git] / source3 / include / async_smb.h
1 /*
2    Unix SMB/CIFS implementation.
3    Infrastructure for async SMB client requests
4    Copyright (C) Volker Lendecke 2008
5
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.
10
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.
15
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/>.
18 */
19
20 #include "includes.h"
21
22 /*
23  * Ship a new smb request to the server
24  */
25
26 struct async_req *cli_request_send(TALLOC_CTX *mem_ctx,
27                                    struct event_context *ev,
28                                    struct cli_state *cli,
29                                    uint8_t smb_command,
30                                    uint8_t additional_flags,
31                                    uint8_t wct, const uint16_t *vwv,
32                                    uint16_t num_bytes, const uint8_t *bytes);
33
34 /*
35  * Convenience function to get the SMB part out of an async_req
36  */
37
38 struct cli_request *cli_request_get(struct async_req *req);
39
40 /*
41  * Fetch an error out of a NBT packet
42  */
43
44 NTSTATUS cli_pull_error(char *buf);
45
46 /*
47  * Compatibility helper for the sync APIs: Fake NTSTATUS in cli->inbuf
48  */
49
50 void cli_set_error(struct cli_state *cli, NTSTATUS status);