2 Unix SMB/CIFS implementation.
4 Copyright (C) Volker Lendecke 2011
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/>.
24 struct smbXcli_session
;
27 struct tevent_req
*smb2cli_logoff_send(TALLOC_CTX
*mem_ctx
,
28 struct tevent_context
*ev
,
29 struct cli_state
*cli
);
30 NTSTATUS
smb2cli_logoff_recv(struct tevent_req
*req
);
31 NTSTATUS
smb2cli_logoff(struct cli_state
*cli
);
33 struct tevent_req
*smb2cli_tcon_send(TALLOC_CTX
*mem_ctx
,
34 struct tevent_context
*ev
,
35 struct cli_state
*cli
,
37 NTSTATUS
smb2cli_tcon_recv(struct tevent_req
*req
);
38 NTSTATUS
smb2cli_tcon(struct cli_state
*cli
, const char *share
);
40 struct tevent_req
*smb2cli_tdis_send(TALLOC_CTX
*mem_ctx
,
41 struct tevent_context
*ev
,
42 struct cli_state
*cli
);
43 NTSTATUS
smb2cli_tdis_recv(struct tevent_req
*req
);
44 NTSTATUS
smb2cli_tdis(struct cli_state
*cli
);
46 struct tevent_req
*smb2cli_create_send(
48 struct tevent_context
*ev
,
49 struct smbXcli_conn
*conn
,
50 uint32_t timeout_msec
,
51 struct smbXcli_session
*session
,
54 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
55 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
56 uint32_t desired_access
,
57 uint32_t file_attributes
,
58 uint32_t share_access
,
59 uint32_t create_disposition
,
60 uint32_t create_options
,
61 struct smb2_create_blobs
*blobs
);
62 NTSTATUS
smb2cli_create_recv(struct tevent_req
*req
,
63 uint64_t *fid_persistent
,
64 uint64_t *fid_volatile
);
65 NTSTATUS
smb2cli_create(struct smbXcli_conn
*conn
,
66 uint32_t timeout_msec
,
67 struct smbXcli_session
*session
,
70 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
71 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
72 uint32_t desired_access
,
73 uint32_t file_attributes
,
74 uint32_t share_access
,
75 uint32_t create_disposition
,
76 uint32_t create_options
,
77 struct smb2_create_blobs
*blobs
,
78 uint64_t *fid_persistent
,
79 uint64_t *fid_volatile
);
81 struct tevent_req
*smb2cli_close_send(TALLOC_CTX
*mem_ctx
,
82 struct tevent_context
*ev
,
83 struct smbXcli_conn
*conn
,
84 uint32_t timeout_msec
,
85 struct smbXcli_session
*session
,
88 uint64_t fid_persistent
,
89 uint64_t fid_volatile
);
90 NTSTATUS
smb2cli_close_recv(struct tevent_req
*req
);
91 NTSTATUS
smb2cli_close(struct smbXcli_conn
*conn
,
92 uint32_t timeout_msec
,
93 struct smbXcli_session
*session
,
96 uint64_t fid_persistent
,
97 uint64_t fid_volatile
);
99 struct tevent_req
*smb2cli_flush_send(TALLOC_CTX
*mem_ctx
,
100 struct tevent_context
*ev
,
101 struct cli_state
*cli
,
102 uint64_t fid_persistent
,
103 uint64_t fid_volatile
);
104 NTSTATUS
smb2cli_flush_recv(struct tevent_req
*req
);
105 NTSTATUS
smb2cli_flush(struct cli_state
*cli
,
106 uint64_t fid_persistent
,
107 uint64_t fid_volatile
);
109 struct tevent_req
*smb2cli_read_send(TALLOC_CTX
*mem_ctx
,
110 struct tevent_context
*ev
,
111 struct smbXcli_conn
*conn
,
112 uint32_t timeout_msec
,
113 struct smbXcli_session
*session
,
117 uint64_t fid_persistent
,
118 uint64_t fid_volatile
,
119 uint64_t minimum_count
,
120 uint64_t remaining_bytes
);
121 NTSTATUS
smb2cli_read_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
122 uint8_t **data
, uint32_t *data_length
);
123 NTSTATUS
smb2cli_read(struct smbXcli_conn
*conn
,
124 uint32_t timeout_msec
,
125 struct smbXcli_session
*session
,
129 uint64_t fid_persistent
,
130 uint64_t fid_volatile
,
131 uint64_t minimum_count
,
132 uint64_t remaining_bytes
,
135 uint32_t *data_length
);
137 struct tevent_req
*smb2cli_write_send(TALLOC_CTX
*mem_ctx
,
138 struct tevent_context
*ev
,
139 struct cli_state
*cli
,
142 uint64_t fid_persistent
,
143 uint64_t fid_volatile
,
144 uint32_t remaining_bytes
,
146 const uint8_t *data
);
147 NTSTATUS
smb2cli_write_recv(struct tevent_req
*req
);
148 NTSTATUS
smb2cli_write(struct cli_state
*cli
,
151 uint64_t fid_persistent
,
152 uint64_t fid_volatile
,
153 uint32_t remaining_bytes
,
155 const uint8_t *data
);
157 struct tevent_req
*smb2cli_query_directory_send(TALLOC_CTX
*mem_ctx
,
158 struct tevent_context
*ev
,
159 struct cli_state
*cli
,
163 uint64_t fid_persistent
,
164 uint64_t fid_volatile
,
166 uint32_t outbuf_len
);
167 NTSTATUS
smb2cli_query_directory_recv(struct tevent_req
*req
,
170 uint32_t *data_length
);
171 NTSTATUS
smb2cli_query_directory(struct cli_state
*cli
,
175 uint64_t fid_persistent
,
176 uint64_t fid_volatile
,
181 uint32_t *data_length
);
183 struct tevent_req
*smb2cli_ioctl_send(TALLOC_CTX
*mem_ctx
,
184 struct tevent_context
*ev
,
185 struct cli_state
*cli
,
186 uint64_t in_fid_persistent
,
187 uint64_t in_fid_volatile
,
188 uint32_t in_ctl_code
,
189 uint32_t in_max_input_length
,
190 const DATA_BLOB
*in_input_buffer
,
191 uint32_t in_max_output_length
,
192 const DATA_BLOB
*in_output_buffer
,
194 NTSTATUS
smb2cli_ioctl_recv(struct tevent_req
*req
,
196 DATA_BLOB
*out_input_buffer
,
197 DATA_BLOB
*out_output_buffer
);
198 NTSTATUS
smb2cli_ioctl(struct cli_state
*cli
,
199 uint64_t in_fid_persistent
,
200 uint64_t in_fid_volatile
,
201 uint32_t in_ctl_code
,
202 uint32_t in_max_input_length
,
203 const DATA_BLOB
*in_input_buffer
,
204 uint32_t in_max_output_length
,
205 const DATA_BLOB
*in_output_buffer
,
208 DATA_BLOB
*out_input_buffer
,
209 DATA_BLOB
*out_output_buffer
);
211 struct tevent_req
*smb2cli_query_info_send(TALLOC_CTX
*mem_ctx
,
212 struct tevent_context
*ev
,
213 struct smbXcli_conn
*conn
,
214 uint32_t timeout_msec
,
215 struct smbXcli_session
*session
,
217 uint8_t in_info_type
,
218 uint8_t in_file_info_class
,
219 uint32_t in_max_output_length
,
220 const DATA_BLOB
*in_input_buffer
,
221 uint32_t in_additional_info
,
223 uint64_t in_fid_persistent
,
224 uint64_t in_fid_volatile
);
225 NTSTATUS
smb2cli_query_info_recv(struct tevent_req
*req
,
227 DATA_BLOB
*out_output_buffer
);
228 NTSTATUS
smb2cli_query_info(struct smbXcli_conn
*conn
,
229 uint32_t timeout_msec
,
230 struct smbXcli_session
*session
,
232 uint8_t in_info_type
,
233 uint8_t in_file_info_class
,
234 uint32_t in_max_output_length
,
235 const DATA_BLOB
*in_input_buffer
,
236 uint32_t in_additional_info
,
238 uint64_t in_fid_persistent
,
239 uint64_t in_fid_volatile
,
241 DATA_BLOB
*out_output_buffer
);
243 struct tevent_req
*smb2cli_set_info_send(TALLOC_CTX
*mem_ctx
,
244 struct tevent_context
*ev
,
245 struct smbXcli_conn
*conn
,
246 uint32_t timeout_msec
,
247 struct smbXcli_session
*session
,
249 uint8_t in_info_type
,
250 uint8_t in_file_info_class
,
251 const DATA_BLOB
*in_input_buffer
,
252 uint32_t in_additional_info
,
253 uint64_t in_fid_persistent
,
254 uint64_t in_fid_volatile
);
255 NTSTATUS
smb2cli_set_info_recv(struct tevent_req
*req
);
256 NTSTATUS
smb2cli_set_info(struct smbXcli_conn
*conn
,
257 uint32_t timeout_msec
,
258 struct smbXcli_session
*session
,
260 uint8_t in_info_type
,
261 uint8_t in_file_info_class
,
262 const DATA_BLOB
*in_input_buffer
,
263 uint32_t in_additional_info
,
264 uint64_t in_fid_persistent
,
265 uint64_t in_fid_volatile
);
267 #endif /* __SMB2CLI_H__ */