2 Unix SMB/CIFS implementation.
3 Infrastructure for async SMB client requests
4 Copyright (C) Volker Lendecke 2008
5 Copyright (C) Stefan Metzmacher 2011
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _SMBXCLI_BASE_H_
22 #define _SMBXCLI_BASE_H_
25 struct smbXcli_session
;
27 struct smb_trans_enc_state
;
30 struct smb2_create_blobs
;
31 struct smb2_create_returns
;
33 struct smbXcli_conn
*smbXcli_conn_create(TALLOC_CTX
*mem_ctx
,
35 const char *remote_name
,
36 enum smb_signing_setting signing_state
,
37 uint32_t smb1_capabilities
,
38 struct GUID
*client_guid
,
39 uint32_t smb2_capabilities
);
41 bool smbXcli_conn_is_connected(struct smbXcli_conn
*conn
);
42 void smbXcli_conn_disconnect(struct smbXcli_conn
*conn
, NTSTATUS status
);
44 bool smbXcli_conn_has_async_calls(struct smbXcli_conn
*conn
);
46 enum protocol_types
smbXcli_conn_protocol(struct smbXcli_conn
*conn
);
47 bool smbXcli_conn_use_unicode(struct smbXcli_conn
*conn
);
49 void smbXcli_conn_set_sockopt(struct smbXcli_conn
*conn
, const char *options
);
50 const struct sockaddr_storage
*smbXcli_conn_local_sockaddr(struct smbXcli_conn
*conn
);
51 const struct sockaddr_storage
*smbXcli_conn_remote_sockaddr(struct smbXcli_conn
*conn
);
52 const char *smbXcli_conn_remote_name(struct smbXcli_conn
*conn
);
54 uint16_t smbXcli_conn_max_requests(struct smbXcli_conn
*conn
);
55 NTTIME
smbXcli_conn_server_system_time(struct smbXcli_conn
*conn
);
56 const DATA_BLOB
*smbXcli_conn_server_gss_blob(struct smbXcli_conn
*conn
);
57 const struct GUID
*smbXcli_conn_server_guid(struct smbXcli_conn
*conn
);
59 struct tevent_req
*smbXcli_conn_samba_suicide_send(TALLOC_CTX
*mem_ctx
,
60 struct tevent_context
*ev
,
61 struct smbXcli_conn
*conn
,
63 NTSTATUS
smbXcli_conn_samba_suicide_recv(struct tevent_req
*req
);
64 NTSTATUS
smbXcli_conn_samba_suicide(struct smbXcli_conn
*conn
,
67 void smbXcli_req_unset_pending(struct tevent_req
*req
);
68 bool smbXcli_req_set_pending(struct tevent_req
*req
);
70 uint32_t smb1cli_conn_capabilities(struct smbXcli_conn
*conn
);
71 uint32_t smb1cli_conn_max_xmit(struct smbXcli_conn
*conn
);
72 bool smb1cli_conn_req_possible(struct smbXcli_conn
*conn
);
73 uint32_t smb1cli_conn_server_session_key(struct smbXcli_conn
*conn
);
74 const uint8_t *smb1cli_conn_server_challenge(struct smbXcli_conn
*conn
);
75 uint16_t smb1cli_conn_server_security_mode(struct smbXcli_conn
*conn
);
76 bool smb1cli_conn_server_readbraw(struct smbXcli_conn
*conn
);
77 bool smb1cli_conn_server_writebraw(struct smbXcli_conn
*conn
);
78 bool smb1cli_conn_server_lockread(struct smbXcli_conn
*conn
);
79 bool smb1cli_conn_server_writeunlock(struct smbXcli_conn
*conn
);
80 int smb1cli_conn_server_time_zone(struct smbXcli_conn
*conn
);
82 bool smb1cli_conn_activate_signing(struct smbXcli_conn
*conn
,
83 const DATA_BLOB user_session_key
,
84 const DATA_BLOB response
);
85 bool smb1cli_conn_check_signing(struct smbXcli_conn
*conn
,
86 const uint8_t *buf
, uint32_t seqnum
);
87 bool smb1cli_conn_signing_is_active(struct smbXcli_conn
*conn
);
89 void smb1cli_conn_set_encryption(struct smbXcli_conn
*conn
,
90 struct smb_trans_enc_state
*es
);
91 bool smb1cli_conn_encryption_on(struct smbXcli_conn
*conn
);
93 bool smb1cli_is_andx_req(uint8_t cmd
);
94 size_t smb1cli_req_wct_ofs(struct tevent_req
**reqs
, int num_reqs
);
96 uint16_t smb1cli_req_mid(struct tevent_req
*req
);
97 void smb1cli_req_set_mid(struct tevent_req
*req
, uint16_t mid
);
99 uint32_t smb1cli_req_seqnum(struct tevent_req
*req
);
100 void smb1cli_req_set_seqnum(struct tevent_req
*req
, uint32_t seqnum
);
102 struct smb1cli_req_expected_response
{
107 struct tevent_req
*smb1cli_req_create(TALLOC_CTX
*mem_ctx
,
108 struct tevent_context
*ev
,
109 struct smbXcli_conn
*conn
,
111 uint8_t additional_flags
,
113 uint16_t additional_flags2
,
114 uint16_t clear_flags2
,
115 uint32_t timeout_msec
,
117 struct smbXcli_tcon
*tcon
,
118 struct smbXcli_session
*session
,
119 uint8_t wct
, uint16_t *vwv
,
121 struct iovec
*bytes_iov
);
122 NTSTATUS
smb1cli_req_chain_submit(struct tevent_req
**reqs
, int num_reqs
);
124 struct tevent_req
*smb1cli_req_send(TALLOC_CTX
*mem_ctx
,
125 struct tevent_context
*ev
,
126 struct smbXcli_conn
*conn
,
128 uint8_t additional_flags
,
130 uint16_t additional_flags2
,
131 uint16_t clear_flags2
,
132 uint32_t timeout_msec
,
134 struct smbXcli_tcon
*tcon
,
135 struct smbXcli_session
*session
,
136 uint8_t wct
, uint16_t *vwv
,
138 const uint8_t *bytes
);
139 NTSTATUS
smb1cli_req_recv(struct tevent_req
*req
,
145 uint32_t *pvwv_offset
,
146 uint32_t *pnum_bytes
,
148 uint32_t *pbytes_offset
,
150 const struct smb1cli_req_expected_response
*expected
,
151 size_t num_expected
);
153 struct tevent_req
*smb1cli_trans_send(
154 TALLOC_CTX
*mem_ctx
, struct tevent_context
*ev
,
155 struct smbXcli_conn
*conn
, uint8_t cmd
,
156 uint8_t additional_flags
, uint8_t clear_flags
,
157 uint16_t additional_flags2
, uint16_t clear_flags2
,
158 uint32_t timeout_msec
,
160 struct smbXcli_tcon
*tcon
,
161 struct smbXcli_session
*session
,
162 const char *pipe_name
, uint16_t fid
, uint16_t function
, int flags
,
163 uint16_t *setup
, uint8_t num_setup
, uint8_t max_setup
,
164 uint8_t *param
, uint32_t num_param
, uint32_t max_param
,
165 uint8_t *data
, uint32_t num_data
, uint32_t max_data
);
166 NTSTATUS
smb1cli_trans_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
167 uint16_t *recv_flags2
,
168 uint16_t **setup
, uint8_t min_setup
,
170 uint8_t **param
, uint32_t min_param
,
172 uint8_t **data
, uint32_t min_data
,
174 NTSTATUS
smb1cli_trans(TALLOC_CTX
*mem_ctx
, struct smbXcli_conn
*conn
,
176 uint8_t additional_flags
, uint8_t clear_flags
,
177 uint16_t additional_flags2
, uint16_t clear_flags2
,
178 uint32_t timeout_msec
,
180 struct smbXcli_tcon
*tcon
,
181 struct smbXcli_session
*session
,
182 const char *pipe_name
, uint16_t fid
, uint16_t function
,
184 uint16_t *setup
, uint8_t num_setup
, uint8_t max_setup
,
185 uint8_t *param
, uint32_t num_param
, uint32_t max_param
,
186 uint8_t *data
, uint32_t num_data
, uint32_t max_data
,
187 uint16_t *recv_flags2
,
188 uint16_t **rsetup
, uint8_t min_rsetup
, uint8_t *num_rsetup
,
189 uint8_t **rparam
, uint32_t min_rparam
, uint32_t *num_rparam
,
190 uint8_t **rdata
, uint32_t min_rdata
, uint32_t *num_rdata
);
192 struct tevent_req
*smb1cli_echo_send(TALLOC_CTX
*mem_ctx
,
193 struct tevent_context
*ev
,
194 struct smbXcli_conn
*conn
,
195 uint32_t timeout_msec
,
198 NTSTATUS
smb1cli_echo_recv(struct tevent_req
*req
);
199 NTSTATUS
smb1cli_echo(struct smbXcli_conn
*conn
, uint32_t timeout_msec
,
200 uint16_t num_echos
, DATA_BLOB data
);
202 bool smb2cli_conn_req_possible(struct smbXcli_conn
*conn
, uint32_t *max_dyn_len
);
203 uint32_t smb2cli_conn_server_capabilities(struct smbXcli_conn
*conn
);
204 uint16_t smb2cli_conn_server_security_mode(struct smbXcli_conn
*conn
);
205 uint32_t smb2cli_conn_max_trans_size(struct smbXcli_conn
*conn
);
206 uint32_t smb2cli_conn_max_read_size(struct smbXcli_conn
*conn
);
207 uint32_t smb2cli_conn_max_write_size(struct smbXcli_conn
*conn
);
208 void smb2cli_conn_set_max_credits(struct smbXcli_conn
*conn
,
209 uint16_t max_credits
);
211 struct tevent_req
*smb2cli_req_create(TALLOC_CTX
*mem_ctx
,
212 struct tevent_context
*ev
,
213 struct smbXcli_conn
*conn
,
215 uint32_t additional_flags
,
216 uint32_t clear_flags
,
217 uint32_t timeout_msec
,
218 struct smbXcli_tcon
*tcon
,
219 struct smbXcli_session
*session
,
220 const uint8_t *fixed
,
224 uint32_t max_dyn_len
);
225 void smb2cli_req_set_notify_async(struct tevent_req
*req
);
226 NTSTATUS
smb2cli_req_compound_submit(struct tevent_req
**reqs
,
228 void smb2cli_req_set_credit_charge(struct tevent_req
*req
, uint16_t charge
);
230 struct smb2cli_req_expected_response
{
235 struct tevent_req
*smb2cli_req_send(TALLOC_CTX
*mem_ctx
,
236 struct tevent_context
*ev
,
237 struct smbXcli_conn
*conn
,
239 uint32_t additional_flags
,
240 uint32_t clear_flags
,
241 uint32_t timeout_msec
,
242 struct smbXcli_tcon
*tcon
,
243 struct smbXcli_session
*session
,
244 const uint8_t *fixed
,
248 uint32_t max_dyn_len
);
249 NTSTATUS
smb2cli_req_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
251 const struct smb2cli_req_expected_response
*expected
,
252 size_t num_expected
);
254 struct tevent_req
*smbXcli_negprot_send(TALLOC_CTX
*mem_ctx
,
255 struct tevent_context
*ev
,
256 struct smbXcli_conn
*conn
,
257 uint32_t timeout_msec
,
258 enum protocol_types min_protocol
,
259 enum protocol_types max_protocol
);
260 NTSTATUS
smbXcli_negprot_recv(struct tevent_req
*req
);
261 NTSTATUS
smbXcli_negprot(struct smbXcli_conn
*conn
,
262 uint32_t timeout_msec
,
263 enum protocol_types min_protocol
,
264 enum protocol_types max_protocol
);
266 struct smbXcli_session
*smbXcli_session_create(TALLOC_CTX
*mem_ctx
,
267 struct smbXcli_conn
*conn
);
268 struct smbXcli_session
*smbXcli_session_copy(TALLOC_CTX
*mem_ctx
,
269 struct smbXcli_session
*src
);
270 NTSTATUS
smbXcli_session_application_key(struct smbXcli_session
*session
,
273 void smbXcli_session_set_disconnect_expired(struct smbXcli_session
*session
);
274 uint16_t smb1cli_session_current_id(struct smbXcli_session
* session
);
275 void smb1cli_session_set_id(struct smbXcli_session
* session
,
276 uint16_t session_id
);
277 NTSTATUS
smb1cli_session_set_session_key(struct smbXcli_session
*session
,
278 const DATA_BLOB _session_key
);
279 NTSTATUS
smb1cli_session_protect_session_key(struct smbXcli_session
*session
);
280 uint8_t smb2cli_session_security_mode(struct smbXcli_session
*session
);
281 uint64_t smb2cli_session_current_id(struct smbXcli_session
*session
);
282 uint16_t smb2cli_session_get_flags(struct smbXcli_session
*session
);
283 void smb2cli_session_set_id_and_flags(struct smbXcli_session
*session
,
285 uint16_t session_flags
);
286 void smb2cli_session_increment_channel_sequence(struct smbXcli_session
*session
);
287 NTSTATUS
smb2cli_session_set_session_key(struct smbXcli_session
*session
,
288 const DATA_BLOB session_key
,
289 const struct iovec
*recv_iov
);
290 NTSTATUS
smb2cli_session_create_channel(TALLOC_CTX
*mem_ctx
,
291 struct smbXcli_session
*session1
,
292 struct smbXcli_conn
*conn
,
293 struct smbXcli_session
**_session2
);
294 NTSTATUS
smb2cli_session_set_channel_key(struct smbXcli_session
*session
,
295 const DATA_BLOB channel_key
,
296 const struct iovec
*recv_iov
);
297 NTSTATUS
smb2cli_session_encryption_on(struct smbXcli_session
*session
);
299 struct smbXcli_tcon
*smbXcli_tcon_create(TALLOC_CTX
*mem_ctx
);
300 uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon
*tcon
);
301 void smb1cli_tcon_set_id(struct smbXcli_tcon
*tcon
, uint16_t tcon_id
);
302 bool smb1cli_tcon_set_values(struct smbXcli_tcon
*tcon
,
304 uint16_t optional_support
,
305 uint32_t maximal_access
,
306 uint32_t guest_maximal_access
,
308 const char *fs_type
);
309 uint32_t smb2cli_tcon_current_id(struct smbXcli_tcon
*tcon
);
310 uint32_t smb2cli_tcon_capabilities(struct smbXcli_tcon
*tcon
);
311 void smb2cli_tcon_set_values(struct smbXcli_tcon
*tcon
,
312 struct smbXcli_session
*session
,
316 uint32_t capabilities
,
317 uint32_t maximal_access
);
319 struct tevent_req
*smb2cli_session_setup_send(TALLOC_CTX
*mem_ctx
,
320 struct tevent_context
*ev
,
321 struct smbXcli_conn
*conn
,
322 uint32_t timeout_msec
,
323 struct smbXcli_session
*session
,
325 uint32_t in_capabilities
,
327 uint64_t in_previous_session_id
,
328 const DATA_BLOB
*in_security_buffer
);
329 NTSTATUS
smb2cli_session_setup_recv(struct tevent_req
*req
,
331 struct iovec
**recv_iov
,
332 DATA_BLOB
*out_security_buffer
);
334 struct tevent_req
*smb2cli_logoff_send(TALLOC_CTX
*mem_ctx
,
335 struct tevent_context
*ev
,
336 struct smbXcli_conn
*conn
,
337 uint32_t timeout_msec
,
338 struct smbXcli_session
*session
);
339 NTSTATUS
smb2cli_logoff_recv(struct tevent_req
*req
);
340 NTSTATUS
smb2cli_logoff(struct smbXcli_conn
*conn
,
341 uint32_t timeout_msec
,
342 struct smbXcli_session
*session
);
344 struct tevent_req
*smb2cli_create_send(
346 struct tevent_context
*ev
,
347 struct smbXcli_conn
*conn
,
348 uint32_t timeout_msec
,
349 struct smbXcli_session
*session
,
350 struct smbXcli_tcon
*tcon
,
351 const char *filename
,
352 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
353 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
354 uint32_t desired_access
,
355 uint32_t file_attributes
,
356 uint32_t share_access
,
357 uint32_t create_disposition
,
358 uint32_t create_options
,
359 struct smb2_create_blobs
*blobs
);
360 NTSTATUS
smb2cli_create_recv(struct tevent_req
*req
,
361 uint64_t *fid_persistent
,
362 uint64_t *fid_volatile
,
363 struct smb2_create_returns
*cr
);
364 NTSTATUS
smb2cli_create(struct smbXcli_conn
*conn
,
365 uint32_t timeout_msec
,
366 struct smbXcli_session
*session
,
367 struct smbXcli_tcon
*tcon
,
368 const char *filename
,
369 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
370 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
371 uint32_t desired_access
,
372 uint32_t file_attributes
,
373 uint32_t share_access
,
374 uint32_t create_disposition
,
375 uint32_t create_options
,
376 struct smb2_create_blobs
*blobs
,
377 uint64_t *fid_persistent
,
378 uint64_t *fid_volatile
,
379 struct smb2_create_returns
*cr
);
381 struct tevent_req
*smb2cli_close_send(TALLOC_CTX
*mem_ctx
,
382 struct tevent_context
*ev
,
383 struct smbXcli_conn
*conn
,
384 uint32_t timeout_msec
,
385 struct smbXcli_session
*session
,
386 struct smbXcli_tcon
*tcon
,
388 uint64_t fid_persistent
,
389 uint64_t fid_volatile
);
390 NTSTATUS
smb2cli_close_recv(struct tevent_req
*req
);
391 NTSTATUS
smb2cli_close(struct smbXcli_conn
*conn
,
392 uint32_t timeout_msec
,
393 struct smbXcli_session
*session
,
394 struct smbXcli_tcon
*tcon
,
396 uint64_t fid_persistent
,
397 uint64_t fid_volatile
);
399 struct tevent_req
*smb2cli_read_send(TALLOC_CTX
*mem_ctx
,
400 struct tevent_context
*ev
,
401 struct smbXcli_conn
*conn
,
402 uint32_t timeout_msec
,
403 struct smbXcli_session
*session
,
404 struct smbXcli_tcon
*tcon
,
407 uint64_t fid_persistent
,
408 uint64_t fid_volatile
,
409 uint64_t minimum_count
,
410 uint64_t remaining_bytes
);
411 NTSTATUS
smb2cli_read_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
412 uint8_t **data
, uint32_t *data_length
);
413 NTSTATUS
smb2cli_read(struct smbXcli_conn
*conn
,
414 uint32_t timeout_msec
,
415 struct smbXcli_session
*session
,
416 struct smbXcli_tcon
*tcon
,
419 uint64_t fid_persistent
,
420 uint64_t fid_volatile
,
421 uint64_t minimum_count
,
422 uint64_t remaining_bytes
,
425 uint32_t *data_length
);
427 struct tevent_req
*smb2cli_write_send(TALLOC_CTX
*mem_ctx
,
428 struct tevent_context
*ev
,
429 struct smbXcli_conn
*conn
,
430 uint32_t timeout_msec
,
431 struct smbXcli_session
*session
,
432 struct smbXcli_tcon
*tcon
,
435 uint64_t fid_persistent
,
436 uint64_t fid_volatile
,
437 uint32_t remaining_bytes
,
439 const uint8_t *data
);
440 NTSTATUS
smb2cli_write_recv(struct tevent_req
*req
,
442 NTSTATUS
smb2cli_write(struct smbXcli_conn
*conn
,
443 uint32_t timeout_msec
,
444 struct smbXcli_session
*session
,
445 struct smbXcli_tcon
*tcon
,
448 uint64_t fid_persistent
,
449 uint64_t fid_volatile
,
450 uint32_t remaining_bytes
,
455 struct tevent_req
*smb2cli_flush_send(TALLOC_CTX
*mem_ctx
,
456 struct tevent_context
*ev
,
457 struct smbXcli_conn
*conn
,
458 uint32_t timeout_msec
,
459 struct smbXcli_session
*session
,
460 struct smbXcli_tcon
*tcon
,
461 uint64_t fid_persistent
,
462 uint64_t fid_volatile
);
463 NTSTATUS
smb2cli_flush_recv(struct tevent_req
*req
);
464 NTSTATUS
smb2cli_flush(struct smbXcli_conn
*conn
,
465 uint32_t timeout_msec
,
466 struct smbXcli_session
*session
,
467 struct smbXcli_tcon
*tcon
,
468 uint64_t fid_persistent
,
469 uint64_t fid_volatile
);
471 struct tevent_req
*smb2cli_set_info_send(TALLOC_CTX
*mem_ctx
,
472 struct tevent_context
*ev
,
473 struct smbXcli_conn
*conn
,
474 uint32_t timeout_msec
,
475 struct smbXcli_session
*session
,
476 struct smbXcli_tcon
*tcon
,
477 uint8_t in_info_type
,
478 uint8_t in_file_info_class
,
479 const DATA_BLOB
*in_input_buffer
,
480 uint32_t in_additional_info
,
481 uint64_t in_fid_persistent
,
482 uint64_t in_fid_volatile
);
483 NTSTATUS
smb2cli_set_info_recv(struct tevent_req
*req
);
484 NTSTATUS
smb2cli_set_info(struct smbXcli_conn
*conn
,
485 uint32_t timeout_msec
,
486 struct smbXcli_session
*session
,
487 struct smbXcli_tcon
*tcon
,
488 uint8_t in_info_type
,
489 uint8_t in_file_info_class
,
490 const DATA_BLOB
*in_input_buffer
,
491 uint32_t in_additional_info
,
492 uint64_t in_fid_persistent
,
493 uint64_t in_fid_volatile
);
495 struct tevent_req
*smb2cli_query_info_send(TALLOC_CTX
*mem_ctx
,
496 struct tevent_context
*ev
,
497 struct smbXcli_conn
*conn
,
498 uint32_t timeout_msec
,
499 struct smbXcli_session
*session
,
500 struct smbXcli_tcon
*tcon
,
501 uint8_t in_info_type
,
502 uint8_t in_file_info_class
,
503 uint32_t in_max_output_length
,
504 const DATA_BLOB
*in_input_buffer
,
505 uint32_t in_additional_info
,
507 uint64_t in_fid_persistent
,
508 uint64_t in_fid_volatile
);
509 NTSTATUS
smb2cli_query_info_recv(struct tevent_req
*req
,
511 DATA_BLOB
*out_output_buffer
);
512 NTSTATUS
smb2cli_query_info(struct smbXcli_conn
*conn
,
513 uint32_t timeout_msec
,
514 struct smbXcli_session
*session
,
515 struct smbXcli_tcon
*tcon
,
516 uint8_t in_info_type
,
517 uint8_t in_file_info_class
,
518 uint32_t in_max_output_length
,
519 const DATA_BLOB
*in_input_buffer
,
520 uint32_t in_additional_info
,
522 uint64_t in_fid_persistent
,
523 uint64_t in_fid_volatile
,
525 DATA_BLOB
*out_output_buffer
);
527 struct tevent_req
*smb2cli_query_directory_send(TALLOC_CTX
*mem_ctx
,
528 struct tevent_context
*ev
,
529 struct smbXcli_conn
*conn
,
530 uint32_t timeout_msec
,
531 struct smbXcli_session
*session
,
532 struct smbXcli_tcon
*tcon
,
536 uint64_t fid_persistent
,
537 uint64_t fid_volatile
,
539 uint32_t outbuf_len
);
540 NTSTATUS
smb2cli_query_directory_recv(struct tevent_req
*req
,
543 uint32_t *data_length
);
544 NTSTATUS
smb2cli_query_directory(struct smbXcli_conn
*conn
,
545 uint32_t timeout_msec
,
546 struct smbXcli_session
*session
,
547 struct smbXcli_tcon
*tcon
,
551 uint64_t fid_persistent
,
552 uint64_t fid_volatile
,
557 uint32_t *data_length
);
559 struct tevent_req
*smb2cli_ioctl_send(TALLOC_CTX
*mem_ctx
,
560 struct tevent_context
*ev
,
561 struct smbXcli_conn
*conn
,
562 uint32_t timeout_msec
,
563 struct smbXcli_session
*session
,
564 struct smbXcli_tcon
*tcon
,
565 uint64_t in_fid_persistent
,
566 uint64_t in_fid_volatile
,
567 uint32_t in_ctl_code
,
568 uint32_t in_max_input_length
,
569 const DATA_BLOB
*in_input_buffer
,
570 uint32_t in_max_output_length
,
571 const DATA_BLOB
*in_output_buffer
,
573 NTSTATUS
smb2cli_ioctl_recv(struct tevent_req
*req
,
575 DATA_BLOB
*out_input_buffer
,
576 DATA_BLOB
*out_output_buffer
);
577 NTSTATUS
smb2cli_ioctl(struct smbXcli_conn
*conn
,
578 uint32_t timeout_msec
,
579 struct smbXcli_session
*session
,
580 struct smbXcli_tcon
*tcon
,
581 uint64_t in_fid_persistent
,
582 uint64_t in_fid_volatile
,
583 uint32_t in_ctl_code
,
584 uint32_t in_max_input_length
,
585 const DATA_BLOB
*in_input_buffer
,
586 uint32_t in_max_output_length
,
587 const DATA_BLOB
*in_output_buffer
,
590 DATA_BLOB
*out_input_buffer
,
591 DATA_BLOB
*out_output_buffer
);
593 struct tevent_req
*smb2cli_echo_send(TALLOC_CTX
*mem_ctx
,
594 struct tevent_context
*ev
,
595 struct smbXcli_conn
*conn
,
596 uint32_t timeout_msec
);
597 NTSTATUS
smb2cli_echo_recv(struct tevent_req
*req
);
598 NTSTATUS
smb2cli_echo(struct smbXcli_conn
*conn
,
599 uint32_t timeout_msec
);
601 #endif /* _SMBXCLI_BASE_H_ */