2011-08-11 15:29:59 +04:00
/*
Unix SMB / CIFS implementation .
Infrastructure for async SMB client requests
Copyright ( C ) Volker Lendecke 2008
Copyright ( C ) Stefan Metzmacher 2011
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
# ifndef _SMBXCLI_BASE_H_
# define _SMBXCLI_BASE_H_
2019-03-21 13:21:21 +03:00
# define SMB_SUICIDE_PACKET 0x74697865
2023-08-21 22:41:06 +03:00
# include "replace.h"
# include <tevent.h>
# include "libcli/smb/smb_constants.h"
# include "libcli/util/ntstatus.h"
# include "lib/util/time.h"
# include "lib/util/data_blob.h"
2011-08-11 15:29:59 +04:00
struct smbXcli_conn ;
2011-09-03 12:18:17 +04:00
struct smbXcli_session ;
2012-06-02 20:03:20 +04:00
struct smbXcli_tcon ;
2011-08-11 15:29:59 +04:00
struct smb_trans_enc_state ;
2011-09-15 15:21:42 +04:00
struct GUID ;
2012-08-07 09:24:22 +04:00
struct iovec ;
struct smb2_create_blobs ;
2014-05-09 07:08:41 +04:00
struct smb_create_returns ;
2021-03-10 01:49:19 +03:00
struct smb311_capabilities ;
2011-08-11 15:29:59 +04:00
struct smbXcli_conn * smbXcli_conn_create ( TALLOC_CTX * mem_ctx ,
int fd ,
const char * remote_name ,
enum smb_signing_setting signing_state ,
2011-09-15 15:21:42 +04:00
uint32_t smb1_capabilities ,
2012-02-29 05:02:29 +04:00
struct GUID * client_guid ,
2021-03-10 01:49:19 +03:00
uint32_t smb2_capabilities ,
const struct smb311_capabilities * smb3_capabilities ) ;
2011-08-11 15:29:59 +04:00
bool smbXcli_conn_is_connected ( struct smbXcli_conn * conn ) ;
void smbXcli_conn_disconnect ( struct smbXcli_conn * conn , NTSTATUS status ) ;
2019-08-29 13:28:14 +03:00
struct tevent_queue * smbXcli_conn_send_queue ( struct smbXcli_conn * conn ) ;
2011-08-11 15:29:59 +04:00
bool smbXcli_conn_has_async_calls ( struct smbXcli_conn * conn ) ;
2013-05-17 22:41:45 +04:00
bool smbXcli_conn_dfs_supported ( struct smbXcli_conn * conn ) ;
2011-08-11 15:29:59 +04:00
enum protocol_types smbXcli_conn_protocol ( struct smbXcli_conn * conn ) ;
bool smbXcli_conn_use_unicode ( struct smbXcli_conn * conn ) ;
2017-08-29 16:35:49 +03:00
bool smbXcli_conn_signing_mandatory ( struct smbXcli_conn * conn ) ;
2022-08-25 16:16:10 +03:00
bool smbXcli_conn_have_posix ( struct smbXcli_conn * conn ) ;
2017-03-26 08:10:34 +03:00
bool smbXcli_conn_support_passthrough ( struct smbXcli_conn * conn ) ;
2011-08-11 15:29:59 +04:00
void smbXcli_conn_set_sockopt ( struct smbXcli_conn * conn , const char * options ) ;
const struct sockaddr_storage * smbXcli_conn_local_sockaddr ( struct smbXcli_conn * conn ) ;
const struct sockaddr_storage * smbXcli_conn_remote_sockaddr ( struct smbXcli_conn * conn ) ;
const char * smbXcli_conn_remote_name ( struct smbXcli_conn * conn ) ;
2011-09-15 16:02:49 +04:00
uint16_t smbXcli_conn_max_requests ( struct smbXcli_conn * conn ) ;
NTTIME smbXcli_conn_server_system_time ( struct smbXcli_conn * conn ) ;
const DATA_BLOB * smbXcli_conn_server_gss_blob ( struct smbXcli_conn * conn ) ;
const struct GUID * smbXcli_conn_server_guid ( struct smbXcli_conn * conn ) ;
2018-01-11 13:25:49 +03:00
bool smbXcli_conn_get_force_channel_sequence ( struct smbXcli_conn * conn ) ;
void smbXcli_conn_set_force_channel_sequence ( struct smbXcli_conn * conn ,
bool v ) ;
2011-09-15 16:02:49 +04:00
2012-01-04 16:28:07 +04:00
struct tevent_req * smbXcli_conn_samba_suicide_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint8_t exitcode ) ;
NTSTATUS smbXcli_conn_samba_suicide_recv ( struct tevent_req * req ) ;
NTSTATUS smbXcli_conn_samba_suicide ( struct smbXcli_conn * conn ,
uint8_t exitcode ) ;
2011-08-11 15:29:59 +04:00
void smbXcli_req_unset_pending ( struct tevent_req * req ) ;
bool smbXcli_req_set_pending ( struct tevent_req * req ) ;
2018-10-28 04:03:28 +03:00
struct timeval smbXcli_req_endtime ( struct tevent_req * req ) ;
2011-08-11 15:29:59 +04:00
2011-09-15 16:02:49 +04:00
uint32_t smb1cli_conn_capabilities ( struct smbXcli_conn * conn ) ;
uint32_t smb1cli_conn_max_xmit ( struct smbXcli_conn * conn ) ;
2013-08-13 16:05:05 +04:00
bool smb1cli_conn_req_possible ( struct smbXcli_conn * conn ) ;
2011-09-15 16:02:49 +04:00
uint32_t smb1cli_conn_server_session_key ( struct smbXcli_conn * conn ) ;
const uint8_t * smb1cli_conn_server_challenge ( struct smbXcli_conn * conn ) ;
uint16_t smb1cli_conn_server_security_mode ( struct smbXcli_conn * conn ) ;
2011-11-25 18:13:38 +04:00
bool smb1cli_conn_server_readbraw ( struct smbXcli_conn * conn ) ;
bool smb1cli_conn_server_writebraw ( struct smbXcli_conn * conn ) ;
bool smb1cli_conn_server_lockread ( struct smbXcli_conn * conn ) ;
bool smb1cli_conn_server_writeunlock ( struct smbXcli_conn * conn ) ;
2011-09-15 16:02:49 +04:00
int smb1cli_conn_server_time_zone ( struct smbXcli_conn * conn ) ;
2011-08-11 15:29:59 +04:00
bool smb1cli_conn_activate_signing ( struct smbXcli_conn * conn ,
const DATA_BLOB user_session_key ,
const DATA_BLOB response ) ;
bool smb1cli_conn_check_signing ( struct smbXcli_conn * conn ,
const uint8_t * buf , uint32_t seqnum ) ;
bool smb1cli_conn_signing_is_active ( struct smbXcli_conn * conn ) ;
void smb1cli_conn_set_encryption ( struct smbXcli_conn * conn ,
struct smb_trans_enc_state * es ) ;
bool smb1cli_conn_encryption_on ( struct smbXcli_conn * conn ) ;
bool smb1cli_is_andx_req ( uint8_t cmd ) ;
size_t smb1cli_req_wct_ofs ( struct tevent_req * * reqs , int num_reqs ) ;
uint16_t smb1cli_req_mid ( struct tevent_req * req ) ;
void smb1cli_req_set_mid ( struct tevent_req * req , uint16_t mid ) ;
uint32_t smb1cli_req_seqnum ( struct tevent_req * req ) ;
void smb1cli_req_set_seqnum ( struct tevent_req * req , uint32_t seqnum ) ;
2011-11-16 14:37:05 +04:00
struct smb1cli_req_expected_response {
NTSTATUS status ;
uint8_t wct ;
} ;
2011-08-11 15:29:59 +04:00
struct tevent_req * smb1cli_req_create ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint8_t smb_command ,
uint8_t additional_flags ,
uint8_t clear_flags ,
uint16_t additional_flags2 ,
uint16_t clear_flags2 ,
uint32_t timeout_msec ,
uint32_t pid ,
2012-07-23 23:34:58 +04:00
struct smbXcli_tcon * tcon ,
2012-07-23 22:15:21 +04:00
struct smbXcli_session * session ,
2011-08-11 15:29:59 +04:00
uint8_t wct , uint16_t * vwv ,
int iov_count ,
struct iovec * bytes_iov ) ;
NTSTATUS smb1cli_req_chain_submit ( struct tevent_req * * reqs , int num_reqs ) ;
struct tevent_req * smb1cli_req_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint8_t smb_command ,
uint8_t additional_flags ,
uint8_t clear_flags ,
uint16_t additional_flags2 ,
uint16_t clear_flags2 ,
uint32_t timeout_msec ,
uint32_t pid ,
2012-07-23 23:34:58 +04:00
struct smbXcli_tcon * tcon ,
2012-07-23 22:15:21 +04:00
struct smbXcli_session * session ,
2011-08-11 15:29:59 +04:00
uint8_t wct , uint16_t * vwv ,
uint32_t num_bytes ,
const uint8_t * bytes ) ;
NTSTATUS smb1cli_req_recv ( struct tevent_req * req ,
2011-11-16 14:37:05 +04:00
TALLOC_CTX * mem_ctx ,
struct iovec * * piov ,
uint8_t * * phdr ,
uint8_t * pwct ,
uint16_t * * pvwv ,
uint32_t * pvwv_offset ,
uint32_t * pnum_bytes ,
uint8_t * * pbytes ,
uint32_t * pbytes_offset ,
uint8_t * * pinbuf ,
const struct smb1cli_req_expected_response * expected ,
size_t num_expected ) ;
2011-08-11 15:29:59 +04:00
2011-09-18 01:38:09 +04:00
struct tevent_req * smb1cli_trans_send (
TALLOC_CTX * mem_ctx , struct tevent_context * ev ,
struct smbXcli_conn * conn , uint8_t cmd ,
uint8_t additional_flags , uint8_t clear_flags ,
uint16_t additional_flags2 , uint16_t clear_flags2 ,
uint32_t timeout_msec ,
2012-07-23 23:34:58 +04:00
uint32_t pid ,
struct smbXcli_tcon * tcon ,
2012-07-23 22:15:21 +04:00
struct smbXcli_session * session ,
2011-09-18 01:38:09 +04:00
const char * pipe_name , uint16_t fid , uint16_t function , int flags ,
uint16_t * setup , uint8_t num_setup , uint8_t max_setup ,
uint8_t * param , uint32_t num_param , uint32_t max_param ,
uint8_t * data , uint32_t num_data , uint32_t max_data ) ;
NTSTATUS smb1cli_trans_recv ( struct tevent_req * req , TALLOC_CTX * mem_ctx ,
uint16_t * recv_flags2 ,
uint16_t * * setup , uint8_t min_setup ,
uint8_t * num_setup ,
uint8_t * * param , uint32_t min_param ,
uint32_t * num_param ,
uint8_t * * data , uint32_t min_data ,
uint32_t * num_data ) ;
NTSTATUS smb1cli_trans ( TALLOC_CTX * mem_ctx , struct smbXcli_conn * conn ,
uint8_t trans_cmd ,
uint8_t additional_flags , uint8_t clear_flags ,
uint16_t additional_flags2 , uint16_t clear_flags2 ,
uint32_t timeout_msec ,
2012-07-23 23:34:58 +04:00
uint32_t pid ,
struct smbXcli_tcon * tcon ,
2012-07-23 22:15:21 +04:00
struct smbXcli_session * session ,
2011-09-18 01:38:09 +04:00
const char * pipe_name , uint16_t fid , uint16_t function ,
int flags ,
uint16_t * setup , uint8_t num_setup , uint8_t max_setup ,
uint8_t * param , uint32_t num_param , uint32_t max_param ,
uint8_t * data , uint32_t num_data , uint32_t max_data ,
uint16_t * recv_flags2 ,
uint16_t * * rsetup , uint8_t min_rsetup , uint8_t * num_rsetup ,
uint8_t * * rparam , uint32_t min_rparam , uint32_t * num_rparam ,
uint8_t * * rdata , uint32_t min_rdata , uint32_t * num_rdata ) ;
2012-09-28 21:53:16 +04:00
struct tevent_req * smb1cli_echo_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint16_t num_echos ,
DATA_BLOB data ) ;
NTSTATUS smb1cli_echo_recv ( struct tevent_req * req ) ;
NTSTATUS smb1cli_echo ( struct smbXcli_conn * conn , uint32_t timeout_msec ,
uint16_t num_echos , DATA_BLOB data ) ;
2016-11-03 18:28:12 +03:00
struct tevent_req * smb1cli_session_setup_lm21_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_session * session ,
uint16_t in_buf_size ,
uint16_t in_mpx_max ,
uint16_t in_vc_num ,
uint32_t in_sess_key ,
const char * in_user ,
const char * in_domain ,
const DATA_BLOB in_password ,
const char * in_native_os ,
const char * in_native_lm ) ;
NTSTATUS smb1cli_session_setup_lm21_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
char * * out_native_os ,
char * * out_native_lm ) ;
2016-10-25 16:40:59 +03:00
struct tevent_req * smb1cli_session_setup_nt1_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_session * session ,
uint16_t in_buf_size ,
uint16_t in_mpx_max ,
uint16_t in_vc_num ,
uint32_t in_sess_key ,
const char * in_user ,
const char * in_domain ,
const DATA_BLOB in_apassword ,
const DATA_BLOB in_upassword ,
uint32_t in_capabilities ,
const char * in_native_os ,
const char * in_native_lm ) ;
NTSTATUS smb1cli_session_setup_nt1_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
struct iovec * * precv_iov ,
const uint8_t * * precv_inbuf ,
char * * out_native_os ,
char * * out_native_lm ,
char * * out_primary_domain ) ;
2016-10-25 22:01:37 +03:00
struct tevent_req * smb1cli_session_setup_ext_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_session * session ,
uint16_t in_buf_size ,
uint16_t in_mpx_max ,
uint16_t in_vc_num ,
uint32_t in_sess_key ,
const DATA_BLOB in_security_blob ,
uint32_t in_capabilities ,
const char * in_native_os ,
const char * in_native_lm ) ;
NTSTATUS smb1cli_session_setup_ext_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
struct iovec * * precv_iov ,
const uint8_t * * precv_inbuf ,
DATA_BLOB * out_security_blob ,
char * * out_native_os ,
char * * out_native_lm ) ;
2016-11-03 18:28:12 +03:00
2013-09-10 12:43:35 +04:00
struct tevent_req * smb1cli_ntcreatex_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_tcon * tcon ,
struct smbXcli_session * session ,
const char * fname ,
uint32_t CreatFlags ,
uint32_t RootDirectoryFid ,
uint32_t DesiredAccess ,
uint64_t AllocationSize ,
uint32_t FileAttributes ,
uint32_t ShareAccess ,
uint32_t CreateDisposition ,
uint32_t CreateOptions ,
uint32_t ImpersonationLevel ,
uint8_t SecurityFlags ) ;
NTSTATUS smb1cli_ntcreatex_recv ( struct tevent_req * req , uint16_t * pfnum ) ;
NTSTATUS smb1cli_ntcreatex ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_tcon * tcon ,
struct smbXcli_session * session ,
const char * fname ,
uint32_t CreatFlags ,
uint32_t RootDirectoryFid ,
uint32_t DesiredAccess ,
uint64_t AllocationSize ,
uint32_t FileAttributes ,
uint32_t ShareAccess ,
uint32_t CreateDisposition ,
uint32_t CreateOptions ,
uint32_t ImpersonationLevel ,
uint8_t SecurityFlags ,
uint16_t * pfnum ) ;
2013-09-12 11:51:01 +04:00
struct tevent_req * smb1cli_close_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_tcon * tcon ,
struct smbXcli_session * session ,
uint16_t fnum ,
uint32_t last_modified ) ;
NTSTATUS smb1cli_close_recv ( struct tevent_req * req ) ;
NTSTATUS smb1cli_close ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_tcon * tcon ,
struct smbXcli_session * session ,
uint16_t fnum ,
uint32_t last_modified ) ;
2013-09-12 13:31:48 +04:00
struct tevent_req * smb1cli_writex_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_tcon * tcon ,
struct smbXcli_session * session ,
uint16_t fnum ,
uint16_t mode ,
const uint8_t * buf ,
uint64_t offset ,
uint32_t size ) ;
NTSTATUS smb1cli_writex_recv ( struct tevent_req * req ,
uint32_t * pwritten ,
uint16_t * pavailable ) ;
NTSTATUS smb1cli_writex ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_tcon * tcon ,
struct smbXcli_session * session ,
uint16_t fnum ,
uint16_t mode ,
const uint8_t * buf ,
uint64_t offset ,
uint32_t size ,
uint32_t * pwritten ,
uint16_t * pavailable ) ;
2013-09-12 16:35:35 +04:00
struct tevent_req * smb1cli_readx_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
uint32_t pid ,
struct smbXcli_tcon * tcon ,
struct smbXcli_session * session ,
uint16_t fnum ,
uint64_t offset ,
uint32_t size ) ;
NTSTATUS smb1cli_readx_recv ( struct tevent_req * req ,
uint32_t * received ,
uint8_t * * rcvbuf ) ;
2013-09-10 12:43:35 +04:00
2013-08-13 17:49:19 +04:00
bool smb2cli_conn_req_possible ( struct smbXcli_conn * conn , uint32_t * max_dyn_len ) ;
2011-09-15 16:02:49 +04:00
uint32_t smb2cli_conn_server_capabilities ( struct smbXcli_conn * conn ) ;
uint16_t smb2cli_conn_server_security_mode ( struct smbXcli_conn * conn ) ;
2021-07-14 17:23:54 +03:00
uint16_t smb2cli_conn_server_signing_algo ( struct smbXcli_conn * conn ) ;
uint16_t smb2cli_conn_server_encryption_algo ( struct smbXcli_conn * conn ) ;
2011-09-15 16:02:49 +04:00
uint32_t smb2cli_conn_max_trans_size ( struct smbXcli_conn * conn ) ;
uint32_t smb2cli_conn_max_read_size ( struct smbXcli_conn * conn ) ;
uint32_t smb2cli_conn_max_write_size ( struct smbXcli_conn * conn ) ;
2011-09-06 19:52:02 +04:00
void smb2cli_conn_set_max_credits ( struct smbXcli_conn * conn ,
uint16_t max_credits ) ;
2017-02-27 14:29:25 +03:00
uint16_t smb2cli_conn_get_cur_credits ( struct smbXcli_conn * conn ) ;
2015-05-08 13:52:23 +03:00
uint8_t smb2cli_conn_get_io_priority ( struct smbXcli_conn * conn ) ;
void smb2cli_conn_set_io_priority ( struct smbXcli_conn * conn ,
uint8_t io_priority ) ;
2015-05-28 01:13:15 +03:00
uint32_t smb2cli_conn_cc_chunk_len ( struct smbXcli_conn * conn ) ;
void smb2cli_conn_set_cc_chunk_len ( struct smbXcli_conn * conn ,
uint32_t chunk_len ) ;
uint32_t smb2cli_conn_cc_max_chunks ( struct smbXcli_conn * conn ) ;
void smb2cli_conn_set_cc_max_chunks ( struct smbXcli_conn * conn ,
uint32_t max_chunks ) ;
2017-02-26 11:28:12 +03:00
void smb2cli_conn_set_mid ( struct smbXcli_conn * conn , uint64_t mid ) ;
uint64_t smb2cli_conn_get_mid ( struct smbXcli_conn * conn ) ;
2011-09-15 16:02:49 +04:00
2021-06-29 16:24:13 +03:00
NTSTATUS smb2cli_parse_dyn_buffer ( uint32_t dyn_offset ,
const DATA_BLOB dyn_buffer ,
uint32_t min_offset ,
uint32_t buffer_offset ,
uint32_t buffer_length ,
uint32_t max_length ,
uint32_t * next_offset ,
DATA_BLOB * buffer ) ;
2011-09-15 13:47:11 +04:00
struct tevent_req * smb2cli_req_create ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
2011-09-15 14:23:05 +04:00
struct smbXcli_conn * conn ,
2011-09-15 13:47:11 +04:00
uint16_t cmd ,
uint32_t additional_flags ,
uint32_t clear_flags ,
2011-09-15 14:23:05 +04:00
uint32_t timeout_msec ,
2012-07-25 12:36:27 +04:00
struct smbXcli_tcon * tcon ,
2011-09-03 12:18:17 +04:00
struct smbXcli_session * session ,
2011-09-15 13:47:11 +04:00
const uint8_t * fixed ,
uint16_t fixed_len ,
const uint8_t * dyn ,
2013-08-13 11:54:42 +04:00
uint32_t dyn_len ,
uint32_t max_dyn_len ) ;
2011-10-27 19:20:27 +04:00
void smb2cli_req_set_notify_async ( struct tevent_req * req ) ;
2011-09-15 13:47:11 +04:00
NTSTATUS smb2cli_req_compound_submit ( struct tevent_req * * reqs ,
int num_reqs ) ;
2011-09-06 19:52:02 +04:00
void smb2cli_req_set_credit_charge ( struct tevent_req * req , uint16_t charge ) ;
2011-09-15 13:47:11 +04:00
struct smb2cli_req_expected_response {
NTSTATUS status ;
uint16_t body_size ;
} ;
struct tevent_req * smb2cli_req_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
2011-09-15 14:23:05 +04:00
struct smbXcli_conn * conn ,
2011-09-15 13:47:11 +04:00
uint16_t cmd ,
uint32_t additional_flags ,
uint32_t clear_flags ,
2011-09-15 14:23:05 +04:00
uint32_t timeout_msec ,
2012-07-25 12:36:27 +04:00
struct smbXcli_tcon * tcon ,
2011-09-03 12:18:17 +04:00
struct smbXcli_session * session ,
2011-09-15 13:47:11 +04:00
const uint8_t * fixed ,
uint16_t fixed_len ,
const uint8_t * dyn ,
2013-08-13 12:25:52 +04:00
uint32_t dyn_len ,
uint32_t max_dyn_len ) ;
2011-09-15 13:47:11 +04:00
NTSTATUS smb2cli_req_recv ( struct tevent_req * req , TALLOC_CTX * mem_ctx ,
struct iovec * * piov ,
const struct smb2cli_req_expected_response * expected ,
size_t num_expected ) ;
2014-09-24 10:59:58 +04:00
/*
* This expects an iov [ 3 ] array , that is filled with references to
* the buffers used for the sending the requests into the socket .
*
* This can only be called after smb2cli_req_recv ( subreq ) before
* the TALLOC_FREE ( subreq ) .
*/
NTSTATUS smb2cli_req_get_sent_iov ( struct tevent_req * req ,
struct iovec * sent_iov ) ;
2022-08-25 10:54:52 +03:00
struct smb2_negotiate_contexts ;
2011-09-15 15:12:43 +04:00
struct tevent_req * smbXcli_negprot_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
enum protocol_types min_protocol ,
2017-02-27 18:14:39 +03:00
enum protocol_types max_protocol ,
2022-08-25 10:54:52 +03:00
uint16_t max_credits ,
struct smb2_negotiate_contexts * in_ctx ) ;
NTSTATUS smbXcli_negprot_recv (
struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
struct smb2_negotiate_contexts * * out_ctx ) ;
2011-09-15 15:12:43 +04:00
NTSTATUS smbXcli_negprot ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
enum protocol_types min_protocol ,
2023-09-19 21:10:12 +03:00
enum protocol_types max_protocol ,
struct smb2_negotiate_contexts * in_ctx ,
TALLOC_CTX * mem_ctx ,
struct smb2_negotiate_contexts * * out_ctx ) ;
2014-09-26 23:15:00 +04:00
struct tevent_req * smb2cli_validate_negotiate_info_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ) ;
NTSTATUS smb2cli_validate_negotiate_info_recv ( struct tevent_req * req ) ;
2011-09-15 15:12:43 +04:00
2011-09-03 12:18:17 +04:00
struct smbXcli_session * smbXcli_session_create ( TALLOC_CTX * mem_ctx ,
struct smbXcli_conn * conn ) ;
2019-06-11 18:42:38 +03:00
struct smbXcli_session * smbXcli_session_shallow_copy ( TALLOC_CTX * mem_ctx ,
2013-01-29 04:51:25 +04:00
struct smbXcli_session * src ) ;
2016-04-18 18:38:46 +03:00
bool smbXcli_session_is_guest ( struct smbXcli_session * session ) ;
2014-09-25 03:46:15 +04:00
bool smbXcli_session_is_authenticated ( struct smbXcli_session * session ) ;
2019-02-06 21:23:35 +03:00
NTSTATUS smb2cli_session_signing_key ( struct smbXcli_session * session ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * key ) ;
NTSTATUS smb2cli_session_encryption_key ( struct smbXcli_session * session ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * key ) ;
NTSTATUS smb2cli_session_decryption_key ( struct smbXcli_session * session ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * key ) ;
2012-08-01 10:59:01 +04:00
NTSTATUS smbXcli_session_application_key ( struct smbXcli_session * session ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * key ) ;
2012-10-22 16:18:20 +04:00
void smbXcli_session_set_disconnect_expired ( struct smbXcli_session * session ) ;
2012-06-02 14:49:22 +04:00
uint16_t smb1cli_session_current_id ( struct smbXcli_session * session ) ;
void smb1cli_session_set_id ( struct smbXcli_session * session ,
uint16_t session_id ) ;
2016-04-18 18:33:11 +03:00
void smb1cli_session_set_action ( struct smbXcli_session * session ,
uint16_t action ) ;
2012-08-01 10:53:30 +04:00
NTSTATUS smb1cli_session_set_session_key ( struct smbXcli_session * session ,
const DATA_BLOB _session_key ) ;
2012-08-01 11:01:25 +04:00
NTSTATUS smb1cli_session_protect_session_key ( struct smbXcli_session * session ) ;
2011-09-03 12:18:17 +04:00
uint8_t smb2cli_session_security_mode ( struct smbXcli_session * session ) ;
uint64_t smb2cli_session_current_id ( struct smbXcli_session * session ) ;
2012-04-16 14:45:02 +04:00
uint16_t smb2cli_session_get_flags ( struct smbXcli_session * session ) ;
2011-09-03 12:18:17 +04:00
void smb2cli_session_set_id_and_flags ( struct smbXcli_session * session ,
uint64_t session_id ,
uint16_t session_flags ) ;
2012-07-26 03:54:33 +04:00
void smb2cli_session_increment_channel_sequence ( struct smbXcli_session * session ) ;
2014-07-10 13:00:10 +04:00
uint16_t smb2cli_session_reset_channel_sequence ( struct smbXcli_session * session ,
uint16_t channel_sequence ) ;
2016-03-01 17:15:10 +03:00
uint16_t smb2cli_session_current_channel_sequence ( struct smbXcli_session * session ) ;
2014-07-10 15:16:04 +04:00
void smb2cli_session_start_replay ( struct smbXcli_session * session ) ;
void smb2cli_session_stop_replay ( struct smbXcli_session * session ) ;
2018-11-09 17:17:19 +03:00
void smb2cli_session_require_signed_response ( struct smbXcli_session * session ,
bool require_signed_response ) ;
2014-09-25 00:58:49 +04:00
NTSTATUS smb2cli_session_update_preauth ( struct smbXcli_session * session ,
const struct iovec * iov ) ;
2012-02-27 11:48:55 +04:00
NTSTATUS smb2cli_session_set_session_key ( struct smbXcli_session * session ,
const DATA_BLOB session_key ,
const struct iovec * recv_iov ) ;
2011-09-19 21:05:20 +04:00
NTSTATUS smb2cli_session_create_channel ( TALLOC_CTX * mem_ctx ,
struct smbXcli_session * session1 ,
struct smbXcli_conn * conn ,
struct smbXcli_session * * _session2 ) ;
2012-02-27 11:48:55 +04:00
NTSTATUS smb2cli_session_set_channel_key ( struct smbXcli_session * session ,
const DATA_BLOB channel_key ,
const struct iovec * recv_iov ) ;
2013-08-16 21:44:34 +04:00
NTSTATUS smb2cli_session_encryption_on ( struct smbXcli_session * session ) ;
2020-08-20 13:09:05 +03:00
uint16_t smb2cli_session_get_encryption_cipher ( struct smbXcli_session * session ) ;
2011-09-03 12:18:17 +04:00
2012-06-02 20:03:20 +04:00
struct smbXcli_tcon * smbXcli_tcon_create ( TALLOC_CTX * mem_ctx ) ;
2017-06-14 02:06:22 +03:00
struct smbXcli_tcon * smbXcli_tcon_copy ( TALLOC_CTX * mem_ctx ,
const struct smbXcli_tcon * tcon_in ) ;
2013-09-27 07:02:09 +04:00
void smbXcli_tcon_set_fs_attributes ( struct smbXcli_tcon * tcon ,
uint32_t fs_attributes ) ;
uint32_t smbXcli_tcon_get_fs_attributes ( struct smbXcli_tcon * tcon ) ;
2013-09-13 13:07:32 +04:00
bool smbXcli_tcon_is_dfs_share ( struct smbXcli_tcon * tcon ) ;
2012-06-02 20:03:20 +04:00
uint16_t smb1cli_tcon_current_id ( struct smbXcli_tcon * tcon ) ;
void smb1cli_tcon_set_id ( struct smbXcli_tcon * tcon , uint16_t tcon_id ) ;
bool smb1cli_tcon_set_values ( struct smbXcli_tcon * tcon ,
uint16_t tcon_id ,
uint16_t optional_support ,
uint32_t maximal_access ,
uint32_t guest_maximal_access ,
const char * service ,
const char * fs_type ) ;
uint32_t smb2cli_tcon_current_id ( struct smbXcli_tcon * tcon ) ;
2017-06-14 02:08:22 +03:00
void smb2cli_tcon_set_id ( struct smbXcli_tcon * tcon , uint32_t tcon_id ) ;
2012-07-25 11:27:00 +04:00
uint32_t smb2cli_tcon_capabilities ( struct smbXcli_tcon * tcon ) ;
2015-10-10 01:08:05 +03:00
uint32_t smb2cli_tcon_flags ( struct smbXcli_tcon * tcon ) ;
2012-06-02 20:03:20 +04:00
void smb2cli_tcon_set_values ( struct smbXcli_tcon * tcon ,
2012-07-25 14:33:39 +04:00
struct smbXcli_session * session ,
2012-06-02 20:03:20 +04:00
uint32_t tcon_id ,
uint8_t type ,
uint32_t flags ,
uint32_t capabilities ,
uint32_t maximal_access ) ;
2014-09-26 08:29:02 +04:00
void smb2cli_tcon_should_sign ( struct smbXcli_tcon * tcon ,
bool should_sign ) ;
bool smb2cli_tcon_is_signing_on ( struct smbXcli_tcon * tcon ) ;
2014-09-26 08:25:53 +04:00
void smb2cli_tcon_should_encrypt ( struct smbXcli_tcon * tcon ,
bool should_encrypt ) ;
2013-09-20 09:46:54 +04:00
bool smb2cli_tcon_is_encryption_on ( struct smbXcli_tcon * tcon ) ;
2012-06-02 20:03:20 +04:00
2012-04-16 14:49:58 +04:00
struct tevent_req * smb2cli_session_setup_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
uint8_t in_flags ,
uint32_t in_capabilities ,
uint32_t in_channel ,
uint64_t in_previous_session_id ,
const DATA_BLOB * in_security_buffer ) ;
NTSTATUS smb2cli_session_setup_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
struct iovec * * recv_iov ,
DATA_BLOB * out_security_buffer ) ;
2012-05-14 11:47:05 +04:00
struct tevent_req * smb2cli_logoff_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ) ;
NTSTATUS smb2cli_logoff_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_logoff ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ) ;
2021-09-16 11:51:43 +03:00
/* smb2cli_raw_tcon* should only be used in tests! */
struct tevent_req * smb2cli_raw_tcon_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t additional_flags ,
uint32_t clear_flags ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ,
uint16_t tcon_flags ,
const char * unc ) ;
NTSTATUS smb2cli_raw_tcon_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_raw_tcon ( struct smbXcli_conn * conn ,
uint32_t additional_flags ,
uint32_t clear_flags ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ,
uint16_t tcon_flags ,
const char * unc ) ;
2014-09-25 05:28:37 +04:00
struct tevent_req * smb2cli_tcon_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ,
uint16_t flags ,
const char * unc ) ;
NTSTATUS smb2cli_tcon_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_tcon ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ,
uint16_t flags ,
const char * unc ) ;
struct tevent_req * smb2cli_tdis_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ) ;
NTSTATUS smb2cli_tdis_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_tdis ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ) ;
2021-10-25 16:23:43 +03:00
struct symlink_reparse_struct ;
2012-05-15 12:23:54 +04:00
struct tevent_req * smb2cli_create_send (
TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 12:23:54 +04:00
const char * filename ,
uint8_t oplock_level , /* SMB2_OPLOCK_LEVEL_* */
uint32_t impersonation_level , /* SMB2_IMPERSONATION_* */
uint32_t desired_access ,
uint32_t file_attributes ,
uint32_t share_access ,
uint32_t create_disposition ,
uint32_t create_options ,
struct smb2_create_blobs * blobs ) ;
NTSTATUS smb2cli_create_recv ( struct tevent_req * req ,
uint64_t * fid_persistent ,
2013-08-08 02:01:50 +04:00
uint64_t * fid_volatile ,
2014-06-27 13:32:34 +04:00
struct smb_create_returns * cr ,
TALLOC_CTX * mem_ctx ,
2021-10-25 16:23:43 +03:00
struct smb2_create_blobs * blobs ,
struct symlink_reparse_struct * * psymlink ) ;
2012-05-15 12:23:54 +04:00
NTSTATUS smb2cli_create ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 12:23:54 +04:00
const char * filename ,
uint8_t oplock_level , /* SMB2_OPLOCK_LEVEL_* */
uint32_t impersonation_level , /* SMB2_IMPERSONATION_* */
uint32_t desired_access ,
uint32_t file_attributes ,
uint32_t share_access ,
uint32_t create_disposition ,
uint32_t create_options ,
struct smb2_create_blobs * blobs ,
uint64_t * fid_persistent ,
2013-08-08 02:01:50 +04:00
uint64_t * fid_volatile ,
2014-06-27 13:32:34 +04:00
struct smb_create_returns * cr ,
TALLOC_CTX * mem_ctx ,
2021-10-25 16:23:43 +03:00
struct smb2_create_blobs * ret_blobs ,
struct symlink_reparse_struct * * psymlink ) ;
2012-05-15 12:23:54 +04:00
2012-05-15 12:26:25 +04:00
struct tevent_req * smb2cli_close_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 12:26:25 +04:00
uint16_t flags ,
uint64_t fid_persistent ,
uint64_t fid_volatile ) ;
NTSTATUS smb2cli_close_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_close ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 12:26:25 +04:00
uint16_t flags ,
uint64_t fid_persistent ,
uint64_t fid_volatile ) ;
2012-05-15 12:50:49 +04:00
struct tevent_req * smb2cli_read_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 12:50:49 +04:00
uint32_t length ,
uint64_t offset ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
uint64_t minimum_count ,
uint64_t remaining_bytes ) ;
NTSTATUS smb2cli_read_recv ( struct tevent_req * req , TALLOC_CTX * mem_ctx ,
uint8_t * * data , uint32_t * data_length ) ;
NTSTATUS smb2cli_read ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 12:50:49 +04:00
uint32_t length ,
uint64_t offset ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
uint64_t minimum_count ,
uint64_t remaining_bytes ,
TALLOC_CTX * mem_ctx ,
uint8_t * * data ,
uint32_t * data_length ) ;
2012-05-15 13:11:24 +04:00
struct tevent_req * smb2cli_write_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 13:11:24 +04:00
uint32_t length ,
uint64_t offset ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
uint32_t remaining_bytes ,
uint32_t flags ,
const uint8_t * data ) ;
2013-08-08 01:41:24 +04:00
NTSTATUS smb2cli_write_recv ( struct tevent_req * req ,
uint32_t * written ) ;
2012-05-15 13:11:24 +04:00
NTSTATUS smb2cli_write ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 13:11:24 +04:00
uint32_t length ,
uint64_t offset ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
uint32_t remaining_bytes ,
uint32_t flags ,
2013-08-08 01:41:24 +04:00
const uint8_t * data ,
uint32_t * written ) ;
2012-05-15 13:11:24 +04:00
2012-05-15 14:00:19 +04:00
struct tevent_req * smb2cli_flush_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:00:19 +04:00
uint64_t fid_persistent ,
uint64_t fid_volatile ) ;
NTSTATUS smb2cli_flush_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_flush ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:00:19 +04:00
uint64_t fid_persistent ,
uint64_t fid_volatile ) ;
2012-05-15 14:05:50 +04:00
struct tevent_req * smb2cli_set_info_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:05:50 +04:00
uint8_t in_info_type ,
uint8_t in_file_info_class ,
const DATA_BLOB * in_input_buffer ,
uint32_t in_additional_info ,
uint64_t in_fid_persistent ,
uint64_t in_fid_volatile ) ;
NTSTATUS smb2cli_set_info_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_set_info ( struct smbXcli_conn * conn ,
2012-07-24 00:32:49 +04:00
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ,
uint8_t in_info_type ,
uint8_t in_file_info_class ,
const DATA_BLOB * in_input_buffer ,
uint32_t in_additional_info ,
uint64_t in_fid_persistent ,
uint64_t in_fid_volatile ) ;
2012-05-15 14:05:50 +04:00
2012-05-15 14:14:47 +04:00
struct tevent_req * smb2cli_query_info_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:14:47 +04:00
uint8_t in_info_type ,
uint8_t in_file_info_class ,
uint32_t in_max_output_length ,
const DATA_BLOB * in_input_buffer ,
uint32_t in_additional_info ,
uint32_t in_flags ,
uint64_t in_fid_persistent ,
uint64_t in_fid_volatile ) ;
NTSTATUS smb2cli_query_info_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * out_output_buffer ) ;
NTSTATUS smb2cli_query_info ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:14:47 +04:00
uint8_t in_info_type ,
uint8_t in_file_info_class ,
uint32_t in_max_output_length ,
const DATA_BLOB * in_input_buffer ,
uint32_t in_additional_info ,
uint32_t in_flags ,
uint64_t in_fid_persistent ,
uint64_t in_fid_volatile ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * out_output_buffer ) ;
2012-05-15 14:19:11 +04:00
struct tevent_req * smb2cli_query_directory_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:19:11 +04:00
uint8_t level ,
uint8_t flags ,
uint32_t file_index ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
const char * mask ,
uint32_t outbuf_len ) ;
NTSTATUS smb2cli_query_directory_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
uint8_t * * data ,
uint32_t * data_length ) ;
NTSTATUS smb2cli_query_directory ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:19:11 +04:00
uint8_t level ,
uint8_t flags ,
uint32_t file_index ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
const char * mask ,
uint32_t outbuf_len ,
TALLOC_CTX * mem_ctx ,
uint8_t * * data ,
uint32_t * data_length ) ;
2017-07-25 13:11:37 +03:00
struct tevent_req * smb2cli_notify_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ,
uint32_t output_buffer_length ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
uint32_t completion_filter ,
bool recursive ) ;
NTSTATUS smb2cli_notify_recv ( struct tevent_req * req , TALLOC_CTX * mem_ctx ,
uint8_t * * data , uint32_t * data_length ) ;
NTSTATUS smb2cli_notify ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
struct smbXcli_tcon * tcon ,
uint32_t output_buffer_length ,
uint64_t fid_persistent ,
uint64_t fid_volatile ,
uint32_t completion_filter ,
bool recursive ,
TALLOC_CTX * mem_ctx ,
uint8_t * * data ,
uint32_t * data_length ) ;
2012-05-15 14:24:38 +04:00
struct tevent_req * smb2cli_ioctl_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:24:38 +04:00
uint64_t in_fid_persistent ,
uint64_t in_fid_volatile ,
uint32_t in_ctl_code ,
uint32_t in_max_input_length ,
const DATA_BLOB * in_input_buffer ,
uint32_t in_max_output_length ,
const DATA_BLOB * in_output_buffer ,
uint32_t in_flags ) ;
NTSTATUS smb2cli_ioctl_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * out_input_buffer ,
DATA_BLOB * out_output_buffer ) ;
NTSTATUS smb2cli_ioctl ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ,
struct smbXcli_session * session ,
2012-07-24 00:32:49 +04:00
struct smbXcli_tcon * tcon ,
2012-05-15 14:24:38 +04:00
uint64_t in_fid_persistent ,
uint64_t in_fid_volatile ,
uint32_t in_ctl_code ,
uint32_t in_max_input_length ,
const DATA_BLOB * in_input_buffer ,
uint32_t in_max_output_length ,
const DATA_BLOB * in_output_buffer ,
uint32_t in_flags ,
TALLOC_CTX * mem_ctx ,
DATA_BLOB * out_input_buffer ,
DATA_BLOB * out_output_buffer ) ;
2012-09-28 21:18:37 +04:00
struct tevent_req * smb2cli_echo_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct smbXcli_conn * conn ,
uint32_t timeout_msec ) ;
NTSTATUS smb2cli_echo_recv ( struct tevent_req * req ) ;
NTSTATUS smb2cli_echo ( struct smbXcli_conn * conn ,
uint32_t timeout_msec ) ;
2011-08-11 15:29:59 +04:00
# endif /* _SMBXCLI_BASE_H_ */