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 bool smbXcli_conn_dfs_supported(struct smbXcli_conn
*conn
);
48 enum protocol_types
smbXcli_conn_protocol(struct smbXcli_conn
*conn
);
49 bool smbXcli_conn_use_unicode(struct smbXcli_conn
*conn
);
51 void smbXcli_conn_set_sockopt(struct smbXcli_conn
*conn
, const char *options
);
52 const struct sockaddr_storage
*smbXcli_conn_local_sockaddr(struct smbXcli_conn
*conn
);
53 const struct sockaddr_storage
*smbXcli_conn_remote_sockaddr(struct smbXcli_conn
*conn
);
54 const char *smbXcli_conn_remote_name(struct smbXcli_conn
*conn
);
56 uint16_t smbXcli_conn_max_requests(struct smbXcli_conn
*conn
);
57 NTTIME
smbXcli_conn_server_system_time(struct smbXcli_conn
*conn
);
58 const DATA_BLOB
*smbXcli_conn_server_gss_blob(struct smbXcli_conn
*conn
);
59 const struct GUID
*smbXcli_conn_server_guid(struct smbXcli_conn
*conn
);
61 struct tevent_req
*smbXcli_conn_samba_suicide_send(TALLOC_CTX
*mem_ctx
,
62 struct tevent_context
*ev
,
63 struct smbXcli_conn
*conn
,
65 NTSTATUS
smbXcli_conn_samba_suicide_recv(struct tevent_req
*req
);
66 NTSTATUS
smbXcli_conn_samba_suicide(struct smbXcli_conn
*conn
,
69 void smbXcli_req_unset_pending(struct tevent_req
*req
);
70 bool smbXcli_req_set_pending(struct tevent_req
*req
);
72 uint32_t smb1cli_conn_capabilities(struct smbXcli_conn
*conn
);
73 uint32_t smb1cli_conn_max_xmit(struct smbXcli_conn
*conn
);
74 bool smb1cli_conn_req_possible(struct smbXcli_conn
*conn
);
75 uint32_t smb1cli_conn_server_session_key(struct smbXcli_conn
*conn
);
76 const uint8_t *smb1cli_conn_server_challenge(struct smbXcli_conn
*conn
);
77 uint16_t smb1cli_conn_server_security_mode(struct smbXcli_conn
*conn
);
78 bool smb1cli_conn_server_readbraw(struct smbXcli_conn
*conn
);
79 bool smb1cli_conn_server_writebraw(struct smbXcli_conn
*conn
);
80 bool smb1cli_conn_server_lockread(struct smbXcli_conn
*conn
);
81 bool smb1cli_conn_server_writeunlock(struct smbXcli_conn
*conn
);
82 int smb1cli_conn_server_time_zone(struct smbXcli_conn
*conn
);
84 bool smb1cli_conn_activate_signing(struct smbXcli_conn
*conn
,
85 const DATA_BLOB user_session_key
,
86 const DATA_BLOB response
);
87 bool smb1cli_conn_check_signing(struct smbXcli_conn
*conn
,
88 const uint8_t *buf
, uint32_t seqnum
);
89 bool smb1cli_conn_signing_is_active(struct smbXcli_conn
*conn
);
91 void smb1cli_conn_set_encryption(struct smbXcli_conn
*conn
,
92 struct smb_trans_enc_state
*es
);
93 bool smb1cli_conn_encryption_on(struct smbXcli_conn
*conn
);
95 bool smb1cli_is_andx_req(uint8_t cmd
);
96 size_t smb1cli_req_wct_ofs(struct tevent_req
**reqs
, int num_reqs
);
98 uint16_t smb1cli_req_mid(struct tevent_req
*req
);
99 void smb1cli_req_set_mid(struct tevent_req
*req
, uint16_t mid
);
101 uint32_t smb1cli_req_seqnum(struct tevent_req
*req
);
102 void smb1cli_req_set_seqnum(struct tevent_req
*req
, uint32_t seqnum
);
104 struct smb1cli_req_expected_response
{
109 struct tevent_req
*smb1cli_req_create(TALLOC_CTX
*mem_ctx
,
110 struct tevent_context
*ev
,
111 struct smbXcli_conn
*conn
,
113 uint8_t additional_flags
,
115 uint16_t additional_flags2
,
116 uint16_t clear_flags2
,
117 uint32_t timeout_msec
,
119 struct smbXcli_tcon
*tcon
,
120 struct smbXcli_session
*session
,
121 uint8_t wct
, uint16_t *vwv
,
123 struct iovec
*bytes_iov
);
124 NTSTATUS
smb1cli_req_chain_submit(struct tevent_req
**reqs
, int num_reqs
);
126 struct tevent_req
*smb1cli_req_send(TALLOC_CTX
*mem_ctx
,
127 struct tevent_context
*ev
,
128 struct smbXcli_conn
*conn
,
130 uint8_t additional_flags
,
132 uint16_t additional_flags2
,
133 uint16_t clear_flags2
,
134 uint32_t timeout_msec
,
136 struct smbXcli_tcon
*tcon
,
137 struct smbXcli_session
*session
,
138 uint8_t wct
, uint16_t *vwv
,
140 const uint8_t *bytes
);
141 NTSTATUS
smb1cli_req_recv(struct tevent_req
*req
,
147 uint32_t *pvwv_offset
,
148 uint32_t *pnum_bytes
,
150 uint32_t *pbytes_offset
,
152 const struct smb1cli_req_expected_response
*expected
,
153 size_t num_expected
);
155 struct tevent_req
*smb1cli_trans_send(
156 TALLOC_CTX
*mem_ctx
, struct tevent_context
*ev
,
157 struct smbXcli_conn
*conn
, uint8_t cmd
,
158 uint8_t additional_flags
, uint8_t clear_flags
,
159 uint16_t additional_flags2
, uint16_t clear_flags2
,
160 uint32_t timeout_msec
,
162 struct smbXcli_tcon
*tcon
,
163 struct smbXcli_session
*session
,
164 const char *pipe_name
, uint16_t fid
, uint16_t function
, int flags
,
165 uint16_t *setup
, uint8_t num_setup
, uint8_t max_setup
,
166 uint8_t *param
, uint32_t num_param
, uint32_t max_param
,
167 uint8_t *data
, uint32_t num_data
, uint32_t max_data
);
168 NTSTATUS
smb1cli_trans_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
169 uint16_t *recv_flags2
,
170 uint16_t **setup
, uint8_t min_setup
,
172 uint8_t **param
, uint32_t min_param
,
174 uint8_t **data
, uint32_t min_data
,
176 NTSTATUS
smb1cli_trans(TALLOC_CTX
*mem_ctx
, struct smbXcli_conn
*conn
,
178 uint8_t additional_flags
, uint8_t clear_flags
,
179 uint16_t additional_flags2
, uint16_t clear_flags2
,
180 uint32_t timeout_msec
,
182 struct smbXcli_tcon
*tcon
,
183 struct smbXcli_session
*session
,
184 const char *pipe_name
, uint16_t fid
, uint16_t function
,
186 uint16_t *setup
, uint8_t num_setup
, uint8_t max_setup
,
187 uint8_t *param
, uint32_t num_param
, uint32_t max_param
,
188 uint8_t *data
, uint32_t num_data
, uint32_t max_data
,
189 uint16_t *recv_flags2
,
190 uint16_t **rsetup
, uint8_t min_rsetup
, uint8_t *num_rsetup
,
191 uint8_t **rparam
, uint32_t min_rparam
, uint32_t *num_rparam
,
192 uint8_t **rdata
, uint32_t min_rdata
, uint32_t *num_rdata
);
194 struct tevent_req
*smb1cli_echo_send(TALLOC_CTX
*mem_ctx
,
195 struct tevent_context
*ev
,
196 struct smbXcli_conn
*conn
,
197 uint32_t timeout_msec
,
200 NTSTATUS
smb1cli_echo_recv(struct tevent_req
*req
);
201 NTSTATUS
smb1cli_echo(struct smbXcli_conn
*conn
, uint32_t timeout_msec
,
202 uint16_t num_echos
, DATA_BLOB data
);
204 bool smb2cli_conn_req_possible(struct smbXcli_conn
*conn
, uint32_t *max_dyn_len
);
205 uint32_t smb2cli_conn_server_capabilities(struct smbXcli_conn
*conn
);
206 uint16_t smb2cli_conn_server_security_mode(struct smbXcli_conn
*conn
);
207 uint32_t smb2cli_conn_max_trans_size(struct smbXcli_conn
*conn
);
208 uint32_t smb2cli_conn_max_read_size(struct smbXcli_conn
*conn
);
209 uint32_t smb2cli_conn_max_write_size(struct smbXcli_conn
*conn
);
210 void smb2cli_conn_set_max_credits(struct smbXcli_conn
*conn
,
211 uint16_t max_credits
);
213 struct tevent_req
*smb2cli_req_create(TALLOC_CTX
*mem_ctx
,
214 struct tevent_context
*ev
,
215 struct smbXcli_conn
*conn
,
217 uint32_t additional_flags
,
218 uint32_t clear_flags
,
219 uint32_t timeout_msec
,
220 struct smbXcli_tcon
*tcon
,
221 struct smbXcli_session
*session
,
222 const uint8_t *fixed
,
226 uint32_t max_dyn_len
);
227 void smb2cli_req_set_notify_async(struct tevent_req
*req
);
228 NTSTATUS
smb2cli_req_compound_submit(struct tevent_req
**reqs
,
230 void smb2cli_req_set_credit_charge(struct tevent_req
*req
, uint16_t charge
);
232 struct smb2cli_req_expected_response
{
237 struct tevent_req
*smb2cli_req_send(TALLOC_CTX
*mem_ctx
,
238 struct tevent_context
*ev
,
239 struct smbXcli_conn
*conn
,
241 uint32_t additional_flags
,
242 uint32_t clear_flags
,
243 uint32_t timeout_msec
,
244 struct smbXcli_tcon
*tcon
,
245 struct smbXcli_session
*session
,
246 const uint8_t *fixed
,
250 uint32_t max_dyn_len
);
251 NTSTATUS
smb2cli_req_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
253 const struct smb2cli_req_expected_response
*expected
,
254 size_t num_expected
);
256 struct tevent_req
*smbXcli_negprot_send(TALLOC_CTX
*mem_ctx
,
257 struct tevent_context
*ev
,
258 struct smbXcli_conn
*conn
,
259 uint32_t timeout_msec
,
260 enum protocol_types min_protocol
,
261 enum protocol_types max_protocol
);
262 NTSTATUS
smbXcli_negprot_recv(struct tevent_req
*req
);
263 NTSTATUS
smbXcli_negprot(struct smbXcli_conn
*conn
,
264 uint32_t timeout_msec
,
265 enum protocol_types min_protocol
,
266 enum protocol_types max_protocol
);
268 struct smbXcli_session
*smbXcli_session_create(TALLOC_CTX
*mem_ctx
,
269 struct smbXcli_conn
*conn
);
270 struct smbXcli_session
*smbXcli_session_copy(TALLOC_CTX
*mem_ctx
,
271 struct smbXcli_session
*src
);
272 NTSTATUS
smbXcli_session_application_key(struct smbXcli_session
*session
,
275 void smbXcli_session_set_disconnect_expired(struct smbXcli_session
*session
);
276 uint16_t smb1cli_session_current_id(struct smbXcli_session
* session
);
277 void smb1cli_session_set_id(struct smbXcli_session
* session
,
278 uint16_t session_id
);
279 NTSTATUS
smb1cli_session_set_session_key(struct smbXcli_session
*session
,
280 const DATA_BLOB _session_key
);
281 NTSTATUS
smb1cli_session_protect_session_key(struct smbXcli_session
*session
);
282 uint8_t smb2cli_session_security_mode(struct smbXcli_session
*session
);
283 uint64_t smb2cli_session_current_id(struct smbXcli_session
*session
);
284 uint16_t smb2cli_session_get_flags(struct smbXcli_session
*session
);
285 void smb2cli_session_set_id_and_flags(struct smbXcli_session
*session
,
287 uint16_t session_flags
);
288 void smb2cli_session_increment_channel_sequence(struct smbXcli_session
*session
);
289 NTSTATUS
smb2cli_session_set_session_key(struct smbXcli_session
*session
,
290 const DATA_BLOB session_key
,
291 const struct iovec
*recv_iov
);
292 NTSTATUS
smb2cli_session_create_channel(TALLOC_CTX
*mem_ctx
,
293 struct smbXcli_session
*session1
,
294 struct smbXcli_conn
*conn
,
295 struct smbXcli_session
**_session2
);
296 NTSTATUS
smb2cli_session_set_channel_key(struct smbXcli_session
*session
,
297 const DATA_BLOB channel_key
,
298 const struct iovec
*recv_iov
);
299 NTSTATUS
smb2cli_session_encryption_on(struct smbXcli_session
*session
);
301 struct smbXcli_tcon
*smbXcli_tcon_create(TALLOC_CTX
*mem_ctx
);
302 void smbXcli_tcon_set_fs_attributes(struct smbXcli_tcon
*tcon
,
303 uint32_t fs_attributes
);
304 uint32_t smbXcli_tcon_get_fs_attributes(struct smbXcli_tcon
*tcon
);
305 bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon
*tcon
);
306 uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon
*tcon
);
307 void smb1cli_tcon_set_id(struct smbXcli_tcon
*tcon
, uint16_t tcon_id
);
308 bool smb1cli_tcon_set_values(struct smbXcli_tcon
*tcon
,
310 uint16_t optional_support
,
311 uint32_t maximal_access
,
312 uint32_t guest_maximal_access
,
314 const char *fs_type
);
315 uint32_t smb2cli_tcon_current_id(struct smbXcli_tcon
*tcon
);
316 uint32_t smb2cli_tcon_capabilities(struct smbXcli_tcon
*tcon
);
317 void smb2cli_tcon_set_values(struct smbXcli_tcon
*tcon
,
318 struct smbXcli_session
*session
,
322 uint32_t capabilities
,
323 uint32_t maximal_access
);
324 bool smb2cli_tcon_is_encryption_on(struct smbXcli_tcon
*tcon
);
326 struct tevent_req
*smb2cli_session_setup_send(TALLOC_CTX
*mem_ctx
,
327 struct tevent_context
*ev
,
328 struct smbXcli_conn
*conn
,
329 uint32_t timeout_msec
,
330 struct smbXcli_session
*session
,
332 uint32_t in_capabilities
,
334 uint64_t in_previous_session_id
,
335 const DATA_BLOB
*in_security_buffer
);
336 NTSTATUS
smb2cli_session_setup_recv(struct tevent_req
*req
,
338 struct iovec
**recv_iov
,
339 DATA_BLOB
*out_security_buffer
);
341 struct tevent_req
*smb2cli_logoff_send(TALLOC_CTX
*mem_ctx
,
342 struct tevent_context
*ev
,
343 struct smbXcli_conn
*conn
,
344 uint32_t timeout_msec
,
345 struct smbXcli_session
*session
);
346 NTSTATUS
smb2cli_logoff_recv(struct tevent_req
*req
);
347 NTSTATUS
smb2cli_logoff(struct smbXcli_conn
*conn
,
348 uint32_t timeout_msec
,
349 struct smbXcli_session
*session
);
351 struct tevent_req
*smb2cli_create_send(
353 struct tevent_context
*ev
,
354 struct smbXcli_conn
*conn
,
355 uint32_t timeout_msec
,
356 struct smbXcli_session
*session
,
357 struct smbXcli_tcon
*tcon
,
358 const char *filename
,
359 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
360 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
361 uint32_t desired_access
,
362 uint32_t file_attributes
,
363 uint32_t share_access
,
364 uint32_t create_disposition
,
365 uint32_t create_options
,
366 struct smb2_create_blobs
*blobs
);
367 NTSTATUS
smb2cli_create_recv(struct tevent_req
*req
,
368 uint64_t *fid_persistent
,
369 uint64_t *fid_volatile
,
370 struct smb2_create_returns
*cr
);
371 NTSTATUS
smb2cli_create(struct smbXcli_conn
*conn
,
372 uint32_t timeout_msec
,
373 struct smbXcli_session
*session
,
374 struct smbXcli_tcon
*tcon
,
375 const char *filename
,
376 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
377 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
378 uint32_t desired_access
,
379 uint32_t file_attributes
,
380 uint32_t share_access
,
381 uint32_t create_disposition
,
382 uint32_t create_options
,
383 struct smb2_create_blobs
*blobs
,
384 uint64_t *fid_persistent
,
385 uint64_t *fid_volatile
,
386 struct smb2_create_returns
*cr
);
388 struct tevent_req
*smb2cli_close_send(TALLOC_CTX
*mem_ctx
,
389 struct tevent_context
*ev
,
390 struct smbXcli_conn
*conn
,
391 uint32_t timeout_msec
,
392 struct smbXcli_session
*session
,
393 struct smbXcli_tcon
*tcon
,
395 uint64_t fid_persistent
,
396 uint64_t fid_volatile
);
397 NTSTATUS
smb2cli_close_recv(struct tevent_req
*req
);
398 NTSTATUS
smb2cli_close(struct smbXcli_conn
*conn
,
399 uint32_t timeout_msec
,
400 struct smbXcli_session
*session
,
401 struct smbXcli_tcon
*tcon
,
403 uint64_t fid_persistent
,
404 uint64_t fid_volatile
);
406 struct tevent_req
*smb2cli_read_send(TALLOC_CTX
*mem_ctx
,
407 struct tevent_context
*ev
,
408 struct smbXcli_conn
*conn
,
409 uint32_t timeout_msec
,
410 struct smbXcli_session
*session
,
411 struct smbXcli_tcon
*tcon
,
414 uint64_t fid_persistent
,
415 uint64_t fid_volatile
,
416 uint64_t minimum_count
,
417 uint64_t remaining_bytes
);
418 NTSTATUS
smb2cli_read_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
419 uint8_t **data
, uint32_t *data_length
);
420 NTSTATUS
smb2cli_read(struct smbXcli_conn
*conn
,
421 uint32_t timeout_msec
,
422 struct smbXcli_session
*session
,
423 struct smbXcli_tcon
*tcon
,
426 uint64_t fid_persistent
,
427 uint64_t fid_volatile
,
428 uint64_t minimum_count
,
429 uint64_t remaining_bytes
,
432 uint32_t *data_length
);
434 struct tevent_req
*smb2cli_write_send(TALLOC_CTX
*mem_ctx
,
435 struct tevent_context
*ev
,
436 struct smbXcli_conn
*conn
,
437 uint32_t timeout_msec
,
438 struct smbXcli_session
*session
,
439 struct smbXcli_tcon
*tcon
,
442 uint64_t fid_persistent
,
443 uint64_t fid_volatile
,
444 uint32_t remaining_bytes
,
446 const uint8_t *data
);
447 NTSTATUS
smb2cli_write_recv(struct tevent_req
*req
,
449 NTSTATUS
smb2cli_write(struct smbXcli_conn
*conn
,
450 uint32_t timeout_msec
,
451 struct smbXcli_session
*session
,
452 struct smbXcli_tcon
*tcon
,
455 uint64_t fid_persistent
,
456 uint64_t fid_volatile
,
457 uint32_t remaining_bytes
,
462 struct tevent_req
*smb2cli_flush_send(TALLOC_CTX
*mem_ctx
,
463 struct tevent_context
*ev
,
464 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
);
470 NTSTATUS
smb2cli_flush_recv(struct tevent_req
*req
);
471 NTSTATUS
smb2cli_flush(struct smbXcli_conn
*conn
,
472 uint32_t timeout_msec
,
473 struct smbXcli_session
*session
,
474 struct smbXcli_tcon
*tcon
,
475 uint64_t fid_persistent
,
476 uint64_t fid_volatile
);
478 struct tevent_req
*smb2cli_set_info_send(TALLOC_CTX
*mem_ctx
,
479 struct tevent_context
*ev
,
480 struct smbXcli_conn
*conn
,
481 uint32_t timeout_msec
,
482 struct smbXcli_session
*session
,
483 struct smbXcli_tcon
*tcon
,
484 uint8_t in_info_type
,
485 uint8_t in_file_info_class
,
486 const DATA_BLOB
*in_input_buffer
,
487 uint32_t in_additional_info
,
488 uint64_t in_fid_persistent
,
489 uint64_t in_fid_volatile
);
490 NTSTATUS
smb2cli_set_info_recv(struct tevent_req
*req
);
491 NTSTATUS
smb2cli_set_info(struct smbXcli_conn
*conn
,
492 uint32_t timeout_msec
,
493 struct smbXcli_session
*session
,
494 struct smbXcli_tcon
*tcon
,
495 uint8_t in_info_type
,
496 uint8_t in_file_info_class
,
497 const DATA_BLOB
*in_input_buffer
,
498 uint32_t in_additional_info
,
499 uint64_t in_fid_persistent
,
500 uint64_t in_fid_volatile
);
502 struct tevent_req
*smb2cli_query_info_send(TALLOC_CTX
*mem_ctx
,
503 struct tevent_context
*ev
,
504 struct smbXcli_conn
*conn
,
505 uint32_t timeout_msec
,
506 struct smbXcli_session
*session
,
507 struct smbXcli_tcon
*tcon
,
508 uint8_t in_info_type
,
509 uint8_t in_file_info_class
,
510 uint32_t in_max_output_length
,
511 const DATA_BLOB
*in_input_buffer
,
512 uint32_t in_additional_info
,
514 uint64_t in_fid_persistent
,
515 uint64_t in_fid_volatile
);
516 NTSTATUS
smb2cli_query_info_recv(struct tevent_req
*req
,
518 DATA_BLOB
*out_output_buffer
);
519 NTSTATUS
smb2cli_query_info(struct smbXcli_conn
*conn
,
520 uint32_t timeout_msec
,
521 struct smbXcli_session
*session
,
522 struct smbXcli_tcon
*tcon
,
523 uint8_t in_info_type
,
524 uint8_t in_file_info_class
,
525 uint32_t in_max_output_length
,
526 const DATA_BLOB
*in_input_buffer
,
527 uint32_t in_additional_info
,
529 uint64_t in_fid_persistent
,
530 uint64_t in_fid_volatile
,
532 DATA_BLOB
*out_output_buffer
);
534 struct tevent_req
*smb2cli_query_directory_send(TALLOC_CTX
*mem_ctx
,
535 struct tevent_context
*ev
,
536 struct smbXcli_conn
*conn
,
537 uint32_t timeout_msec
,
538 struct smbXcli_session
*session
,
539 struct smbXcli_tcon
*tcon
,
543 uint64_t fid_persistent
,
544 uint64_t fid_volatile
,
546 uint32_t outbuf_len
);
547 NTSTATUS
smb2cli_query_directory_recv(struct tevent_req
*req
,
550 uint32_t *data_length
);
551 NTSTATUS
smb2cli_query_directory(struct smbXcli_conn
*conn
,
552 uint32_t timeout_msec
,
553 struct smbXcli_session
*session
,
554 struct smbXcli_tcon
*tcon
,
558 uint64_t fid_persistent
,
559 uint64_t fid_volatile
,
564 uint32_t *data_length
);
566 struct tevent_req
*smb2cli_ioctl_send(TALLOC_CTX
*mem_ctx
,
567 struct tevent_context
*ev
,
568 struct smbXcli_conn
*conn
,
569 uint32_t timeout_msec
,
570 struct smbXcli_session
*session
,
571 struct smbXcli_tcon
*tcon
,
572 uint64_t in_fid_persistent
,
573 uint64_t in_fid_volatile
,
574 uint32_t in_ctl_code
,
575 uint32_t in_max_input_length
,
576 const DATA_BLOB
*in_input_buffer
,
577 uint32_t in_max_output_length
,
578 const DATA_BLOB
*in_output_buffer
,
580 NTSTATUS
smb2cli_ioctl_recv(struct tevent_req
*req
,
582 DATA_BLOB
*out_input_buffer
,
583 DATA_BLOB
*out_output_buffer
);
584 NTSTATUS
smb2cli_ioctl(struct smbXcli_conn
*conn
,
585 uint32_t timeout_msec
,
586 struct smbXcli_session
*session
,
587 struct smbXcli_tcon
*tcon
,
588 uint64_t in_fid_persistent
,
589 uint64_t in_fid_volatile
,
590 uint32_t in_ctl_code
,
591 uint32_t in_max_input_length
,
592 const DATA_BLOB
*in_input_buffer
,
593 uint32_t in_max_output_length
,
594 const DATA_BLOB
*in_output_buffer
,
597 DATA_BLOB
*out_input_buffer
,
598 DATA_BLOB
*out_output_buffer
);
600 struct tevent_req
*smb2cli_echo_send(TALLOC_CTX
*mem_ctx
,
601 struct tevent_context
*ev
,
602 struct smbXcli_conn
*conn
,
603 uint32_t timeout_msec
);
604 NTSTATUS
smb2cli_echo_recv(struct tevent_req
*req
);
605 NTSTATUS
smb2cli_echo(struct smbXcli_conn
*conn
,
606 uint32_t timeout_msec
);
608 #endif /* _SMBXCLI_BASE_H_ */