Fix a bug that prevent core files from being created
[Samba.git] / source / include / async_smb.h
blob19408be74b4c324bfc7ca8d78bd0f0b167f7db3b
1 /*
2 Unix SMB/CIFS implementation.
3 Infrastructure for async SMB client requests
4 Copyright (C) Volker Lendecke 2008
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 #include "includes.h"
23 * Create a fresh async smb request
26 struct async_req *cli_request_new(TALLOC_CTX *mem_ctx,
27 struct event_context *ev,
28 struct cli_state *cli,
29 uint8_t num_words, size_t num_bytes,
30 struct cli_request **preq);
33 * Convenience function to get the SMB part out of an async_req
36 struct cli_request *cli_request_get(struct async_req *req);
39 * Fetch an error out of a NBT packet
42 NTSTATUS cli_pull_error(char *buf);
45 * Compatibility helper for the sync APIs: Fake NTSTATUS in cli->inbuf
48 void cli_set_error(struct cli_state *cli, NTSTATUS status);
51 * Create a temporary event context for use in the sync helper functions
54 struct cli_tmp_event *cli_tmp_event_ctx(TALLOC_CTX *mem_ctx,
55 struct cli_state *cli);
58 * Attach an event context permanently to a cli_struct
61 NTSTATUS cli_add_event_ctx(struct cli_state *cli,
62 struct event_context *event_ctx);