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/>.
23 * Ship a new smb request to the server
26 struct async_req
*cli_request_send(TALLOC_CTX
*mem_ctx
, struct cli_state
*cli
,
28 uint8_t additional_flags
,
29 uint8_t wct
, const uint16_t *vwv
,
30 uint16_t num_bytes
, const uint8_t *bytes
);
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
);