VERSION: Disable GIT_SNAPSHOT for the 4.11.8 release.
[Samba.git] / source3 / libsmb / proto.h
blob48855d7112cf4ea6227ed9e475f080041638e562
1 /*
2 Unix SMB/CIFS implementation.
4 Copyright (C) Andrew Bartlett 2001-2003
5 Copyright (C) Andrew Tridgell 1994-1998,2000-2001
6 Copyright (C) Gerald (Jerry) Carter 2004
7 Copyright (C) Jelmer Vernooij 2003
8 Copyright (C) Jeremy Allison 2001-2009,2011
9 Copyright (C) Stefan Metzmacher 2003,2009
10 Copyright (C) Volker Lendecke 2011
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 3 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #ifndef _LIBSMB_PROTO_H_
27 #define _LIBSMB_PROTO_H_
29 #include "auth_info.h"
31 struct smb_trans_enc_state;
32 struct cli_credentials;
33 struct cli_state;
34 struct file_info;
35 struct print_job_info;
37 /* The following definitions come from libsmb/cliconnect.c */
39 struct cli_credentials *cli_session_creds_init(TALLOC_CTX *mem_ctx,
40 const char *username,
41 const char *domain,
42 const char *realm,
43 const char *password,
44 bool use_kerberos,
45 bool fallback_after_kerberos,
46 bool use_ccache,
47 bool password_is_nt_hash);
48 NTSTATUS cli_session_creds_prepare_krb5(struct cli_state *cli,
49 struct cli_credentials *creds);
50 struct tevent_req *cli_session_setup_creds_send(TALLOC_CTX *mem_ctx,
51 struct tevent_context *ev,
52 struct cli_state *cli,
53 struct cli_credentials *creds);
54 NTSTATUS cli_session_setup_creds_recv(struct tevent_req *req);
55 NTSTATUS cli_session_setup_creds(struct cli_state *cli,
56 struct cli_credentials *creds);
57 NTSTATUS cli_session_setup_anon(struct cli_state *cli);
58 struct tevent_req *cli_session_setup_guest_create(TALLOC_CTX *mem_ctx,
59 struct tevent_context *ev,
60 struct cli_state *cli,
61 struct tevent_req **psmbreq);
62 struct tevent_req *cli_session_setup_guest_send(TALLOC_CTX *mem_ctx,
63 struct tevent_context *ev,
64 struct cli_state *cli);
65 NTSTATUS cli_session_setup_guest_recv(struct tevent_req *req);
66 NTSTATUS cli_ulogoff(struct cli_state *cli);
67 struct tevent_req *cli_tcon_andx_create(TALLOC_CTX *mem_ctx,
68 struct tevent_context *ev,
69 struct cli_state *cli,
70 const char *share, const char *dev,
71 const char *pass, int passlen,
72 struct tevent_req **psmbreq);
73 struct tevent_req *cli_tcon_andx_send(TALLOC_CTX *mem_ctx,
74 struct tevent_context *ev,
75 struct cli_state *cli,
76 const char *share, const char *dev,
77 const char *pass, int passlen);
78 NTSTATUS cli_tcon_andx_recv(struct tevent_req *req);
79 NTSTATUS cli_tcon_andx(struct cli_state *cli, const char *share,
80 const char *dev, const char *pass, int passlen);
81 NTSTATUS cli_tree_connect_creds(struct cli_state *cli,
82 const char *share, const char *dev,
83 struct cli_credentials *creds);
84 NTSTATUS cli_tree_connect(struct cli_state *cli, const char *share,
85 const char *dev, const char *pass);
86 NTSTATUS cli_tdis(struct cli_state *cli);
87 NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss,
88 uint16_t port, int name_type, const char *myname,
89 int signing_state, int flags, struct cli_state **pcli);
90 NTSTATUS cli_start_connection(struct cli_state **output_cli,
91 const char *my_name,
92 const char *dest_host,
93 const struct sockaddr_storage *dest_ss, int port,
94 int signing_state, int flags);
95 NTSTATUS cli_smb1_setup_encryption(struct cli_state *cli,
96 struct cli_credentials *creds);
97 struct tevent_req *cli_full_connection_creds_send(
98 TALLOC_CTX *mem_ctx, struct tevent_context *ev,
99 const char *my_name, const char *dest_host,
100 const struct sockaddr_storage *dest_ss, int port,
101 const char *service, const char *service_type,
102 struct cli_credentials *creds,
103 int flags, int signing_state);
104 NTSTATUS cli_full_connection_creds_recv(struct tevent_req *req,
105 struct cli_state **output_cli);
106 NTSTATUS cli_full_connection_creds(struct cli_state **output_cli,
107 const char *my_name,
108 const char *dest_host,
109 const struct sockaddr_storage *dest_ss, int port,
110 const char *service, const char *service_type,
111 struct cli_credentials *creds,
112 int flags,
113 int signing_state);
114 NTSTATUS cli_full_connection(struct cli_state **output_cli,
115 const char *my_name,
116 const char *dest_host,
117 const struct sockaddr_storage *dest_ss, int port,
118 const char *service, const char *service_type,
119 const char *user, const char *domain,
120 const char *password, int flags,
121 int signing_state);
122 NTSTATUS cli_raw_tcon(struct cli_state *cli,
123 const char *service, const char *pass, const char *dev,
124 uint16_t *max_xmit, uint16_t *tid);
125 struct cli_state *get_ipc_connect(char *server,
126 struct sockaddr_storage *server_ss,
127 const struct user_auth_info *user_info);
128 struct cli_state *get_ipc_connect_master_ip(TALLOC_CTX *ctx,
129 struct sockaddr_storage *mb_ip,
130 const struct user_auth_info *user_info,
131 char **pp_workgroup_out);
132 struct cli_state *get_ipc_connect_master_ip_bcast(TALLOC_CTX *ctx,
133 const struct user_auth_info *user_info,
134 char **pp_workgroup_out);
136 /* The following definitions come from libsmb/clidfs.c */
138 NTSTATUS cli_cm_force_encryption_creds(struct cli_state *c,
139 struct cli_credentials *creds,
140 const char *sharename);
141 NTSTATUS cli_cm_force_encryption(struct cli_state *c,
142 const char *username,
143 const char *password,
144 const char *domain,
145 const char *sharename);
146 NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
147 struct cli_state *referring_cli,
148 const char *server,
149 const char *share,
150 const struct user_auth_info *auth_info,
151 bool force_encrypt,
152 int max_protocol,
153 int port,
154 int name_type,
155 struct cli_state **pcli);
156 void cli_cm_display(struct cli_state *c);
157 struct client_dfs_referral;
158 NTSTATUS cli_dfs_get_referral_ex(TALLOC_CTX *ctx,
159 struct cli_state *cli,
160 const char *path,
161 uint16_t max_referral_level,
162 struct client_dfs_referral **refs,
163 size_t *num_refs,
164 size_t *consumed);
165 NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx,
166 struct cli_state *cli,
167 const char *path,
168 struct client_dfs_referral **refs,
169 size_t *num_refs,
170 size_t *consumed);
171 NTSTATUS cli_resolve_path(TALLOC_CTX *ctx,
172 const char *mountpt,
173 const struct user_auth_info *dfs_auth_info,
174 struct cli_state *rootcli,
175 const char *path,
176 struct cli_state **targetcli,
177 char **pp_targetpath);
179 bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
180 struct cli_state *cli,
181 const char *sharename,
182 char **pp_newserver,
183 char **pp_newshare,
184 bool force_encrypt,
185 struct cli_credentials *creds);
187 /* The following definitions come from libsmb/clientgen.c */
189 int cli_set_message(char *buf,int num_words,int num_bytes,bool zero);
190 unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout);
191 bool cli_set_backup_intent(struct cli_state *cli, bool flag);
192 extern struct GUID cli_state_client_guid;
193 struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
194 int fd,
195 const char *remote_name,
196 int signing_state,
197 int flags);
198 void cli_nt_pipes_close(struct cli_state *cli);
199 void cli_shutdown(struct cli_state *cli);
200 uint16_t cli_state_get_vc_num(struct cli_state *cli);
201 uint32_t cli_setpid(struct cli_state *cli, uint32_t pid);
202 uint32_t cli_getpid(struct cli_state *cli);
203 bool cli_state_is_encryption_on(struct cli_state *cli);
204 bool cli_state_has_tcon(struct cli_state *cli);
205 uint32_t cli_state_get_tid(struct cli_state *cli);
206 uint32_t cli_state_set_tid(struct cli_state *cli, uint32_t tid);
207 struct smbXcli_tcon;
208 struct smbXcli_tcon *cli_state_save_tcon(struct cli_state *cli);
209 void cli_state_restore_tcon(struct cli_state *cli, struct smbXcli_tcon *tcon);
210 uint16_t cli_state_get_uid(struct cli_state *cli);
211 uint16_t cli_state_set_uid(struct cli_state *cli, uint16_t uid);
212 bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive);
213 uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs);
214 time_t cli_state_server_time(struct cli_state *cli);
215 struct tevent_req *cli_echo_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
216 struct cli_state *cli, uint16_t num_echos,
217 DATA_BLOB data);
218 NTSTATUS cli_echo_recv(struct tevent_req *req);
219 NTSTATUS cli_echo(struct cli_state *cli, uint16_t num_echos, DATA_BLOB data);
220 NTSTATUS cli_smb(TALLOC_CTX *mem_ctx, struct cli_state *cli,
221 uint8_t smb_command, uint8_t additional_flags,
222 uint8_t wct, uint16_t *vwv,
223 uint32_t num_bytes, const uint8_t *bytes,
224 struct tevent_req **result_parent,
225 uint8_t min_wct, uint8_t *pwct, uint16_t **pvwv,
226 uint32_t *pnum_bytes, uint8_t **pbytes);
228 /* The following definitions come from libsmb/clierror.c */
230 const char *cli_errstr(struct cli_state *cli);
231 NTSTATUS cli_nt_error(struct cli_state *cli);
232 void cli_dos_error(struct cli_state *cli, uint8_t *eclass, uint32_t *ecode);
233 int cli_errno(struct cli_state *cli);
234 bool cli_is_error(struct cli_state *cli);
235 bool cli_is_nt_error(struct cli_state *cli);
236 bool cli_is_dos_error(struct cli_state *cli);
237 bool cli_state_is_connected(struct cli_state *cli);
239 /* The following definitions come from libsmb/clifile.c */
241 struct tevent_req *cli_setpathinfo_send(TALLOC_CTX *mem_ctx,
242 struct tevent_context *ev,
243 struct cli_state *cli,
244 uint16_t level,
245 const char *path,
246 uint8_t *data,
247 size_t data_len);
248 NTSTATUS cli_setpathinfo_recv(struct tevent_req *req);
249 NTSTATUS cli_setpathinfo(struct cli_state *cli,
250 uint16_t level,
251 const char *path,
252 uint8_t *data,
253 size_t data_len);
255 struct tevent_req *cli_posix_symlink_send(TALLOC_CTX *mem_ctx,
256 struct tevent_context *ev,
257 struct cli_state *cli,
258 const char *oldname,
259 const char *newname);
260 NTSTATUS cli_posix_symlink_recv(struct tevent_req *req);
261 NTSTATUS cli_posix_symlink(struct cli_state *cli,
262 const char *oldname,
263 const char *newname);
264 struct tevent_req *cli_posix_readlink_send(TALLOC_CTX *mem_ctx,
265 struct tevent_context *ev,
266 struct cli_state *cli,
267 const char *fname);
268 NTSTATUS cli_posix_readlink_recv(
269 struct tevent_req *req, TALLOC_CTX *mem_ctx, char **target);
270 NTSTATUS cli_posix_readlink(
271 struct cli_state *cli,
272 const char *fname,
273 TALLOC_CTX *mem_ctx,
274 char **target);
275 struct tevent_req *cli_posix_hardlink_send(TALLOC_CTX *mem_ctx,
276 struct tevent_context *ev,
277 struct cli_state *cli,
278 const char *oldname,
279 const char *newname);
280 NTSTATUS cli_posix_hardlink_recv(struct tevent_req *req);
281 NTSTATUS cli_posix_hardlink(struct cli_state *cli,
282 const char *oldname,
283 const char *newname);
284 uint32_t unix_perms_to_wire(mode_t perms);
285 mode_t wire_perms_to_unix(uint32_t perms);
286 struct tevent_req *cli_posix_getacl_send(TALLOC_CTX *mem_ctx,
287 struct tevent_context *ev,
288 struct cli_state *cli,
289 const char *fname);
290 NTSTATUS cli_posix_getacl_recv(struct tevent_req *req,
291 TALLOC_CTX *mem_ctx,
292 size_t *prb_size,
293 char **retbuf);
294 NTSTATUS cli_posix_getacl(struct cli_state *cli,
295 const char *fname,
296 TALLOC_CTX *mem_ctx,
297 size_t *prb_size,
298 char **retbuf);
299 struct tevent_req *cli_posix_setacl_send(TALLOC_CTX *mem_ctx,
300 struct tevent_context *ev,
301 struct cli_state *cli,
302 const char *fname,
303 const void *acl_buf,
304 size_t acl_buf_size);
305 NTSTATUS cli_posix_setacl_recv(struct tevent_req *req);
306 NTSTATUS cli_posix_setacl(struct cli_state *cli,
307 const char *fname,
308 const void *acl_buf,
309 size_t acl_buf_size);
310 struct tevent_req *cli_posix_stat_send(TALLOC_CTX *mem_ctx,
311 struct tevent_context *ev,
312 struct cli_state *cli,
313 const char *fname,
314 SMB_STRUCT_STAT *sbuf);
315 NTSTATUS cli_posix_stat_recv(struct tevent_req *req);
316 NTSTATUS cli_posix_stat(struct cli_state *cli,
317 const char *fname,
318 SMB_STRUCT_STAT *sbuf);
319 struct tevent_req *cli_posix_chmod_send(TALLOC_CTX *mem_ctx,
320 struct tevent_context *ev,
321 struct cli_state *cli,
322 const char *fname,
323 mode_t mode);
324 NTSTATUS cli_posix_chmod_recv(struct tevent_req *req);
325 NTSTATUS cli_posix_chmod(struct cli_state *cli, const char *fname, mode_t mode);
326 struct tevent_req *cli_posix_chown_send(TALLOC_CTX *mem_ctx,
327 struct tevent_context *ev,
328 struct cli_state *cli,
329 const char *fname,
330 uid_t uid,
331 gid_t gid);
332 NTSTATUS cli_posix_chown_recv(struct tevent_req *req);
333 NTSTATUS cli_posix_chown(struct cli_state *cli,
334 const char *fname,
335 uid_t uid,
336 gid_t gid);
337 struct tevent_req *cli_rename_send(TALLOC_CTX *mem_ctx,
338 struct tevent_context *ev,
339 struct cli_state *cli,
340 const char *fname_src,
341 const char *fname_dst,
342 bool replace);
343 NTSTATUS cli_rename_recv(struct tevent_req *req);
344 NTSTATUS cli_rename(struct cli_state *cli,
345 const char *fname_src,
346 const char *fname_dst,
347 bool replace);
348 struct tevent_req *cli_ntrename_send(TALLOC_CTX *mem_ctx,
349 struct tevent_context *ev,
350 struct cli_state *cli,
351 const char *fname_src,
352 const char *fname_dst);
353 NTSTATUS cli_ntrename_recv(struct tevent_req *req);
354 NTSTATUS cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
356 struct tevent_req *cli_hardlink_send(
357 TALLOC_CTX *mem_ctx,
358 struct tevent_context *ev,
359 struct cli_state *cli,
360 const char *fname_src,
361 const char *fname_dst);
362 NTSTATUS cli_hardlink_recv(struct tevent_req *req);
363 NTSTATUS cli_hardlink(
364 struct cli_state *cli,
365 const char *fname_src,
366 const char *fname_dst);
368 struct tevent_req *cli_unlink_send(TALLOC_CTX *mem_ctx,
369 struct tevent_context *ev,
370 struct cli_state *cli,
371 const char *fname,
372 uint16_t mayhave_attrs);
373 NTSTATUS cli_unlink_recv(struct tevent_req *req);
374 NTSTATUS cli_unlink(struct cli_state *cli, const char *fname, uint16_t mayhave_attrs);
376 struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx,
377 struct tevent_context *ev,
378 struct cli_state *cli,
379 const char *dname);
380 NTSTATUS cli_mkdir_recv(struct tevent_req *req);
381 NTSTATUS cli_mkdir(struct cli_state *cli, const char *dname);
382 struct tevent_req *cli_rmdir_send(TALLOC_CTX *mem_ctx,
383 struct tevent_context *ev,
384 struct cli_state *cli,
385 const char *dname);
386 NTSTATUS cli_rmdir_recv(struct tevent_req *req);
387 NTSTATUS cli_rmdir(struct cli_state *cli, const char *dname);
388 struct tevent_req *cli_nt_delete_on_close_send(TALLOC_CTX *mem_ctx,
389 struct tevent_context *ev,
390 struct cli_state *cli,
391 uint16_t fnum,
392 bool flag);
393 NTSTATUS cli_nt_delete_on_close_recv(struct tevent_req *req);
394 NTSTATUS cli_nt_delete_on_close(struct cli_state *cli, uint16_t fnum, bool flag);
395 struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx,
396 struct tevent_context *ev,
397 struct cli_state *cli,
398 const char *fname,
399 uint32_t CreatFlags,
400 uint32_t DesiredAccess,
401 uint32_t FileAttributes,
402 uint32_t ShareAccess,
403 uint32_t CreateDisposition,
404 uint32_t CreateOptions,
405 uint32_t ImpersonationLevel,
406 uint8_t SecurityFlags);
407 NTSTATUS cli_ntcreate_recv(struct tevent_req *req,
408 uint16_t *pfnum,
409 struct smb_create_returns *cr);
410 NTSTATUS cli_ntcreate(struct cli_state *cli,
411 const char *fname,
412 uint32_t CreatFlags,
413 uint32_t DesiredAccess,
414 uint32_t FileAttributes,
415 uint32_t ShareAccess,
416 uint32_t CreateDisposition,
417 uint32_t CreateOptions,
418 uint8_t SecurityFlags,
419 uint16_t *pfid,
420 struct smb_create_returns *cr);
421 struct tevent_req *cli_openx_create(TALLOC_CTX *mem_ctx,
422 struct tevent_context *ev,
423 struct cli_state *cli, const char *fname,
424 int flags, int share_mode,
425 struct tevent_req **psmbreq);
426 struct tevent_req *cli_openx_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
427 struct cli_state *cli, const char *fname,
428 int flags, int share_mode);
429 NTSTATUS cli_openx_recv(struct tevent_req *req, uint16_t *fnum);
430 NTSTATUS cli_openx(struct cli_state *cli, const char *fname, int flags, int share_mode, uint16_t *pfnum);
431 NTSTATUS cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode, uint16_t *pfnum);
432 struct tevent_req *cli_smb1_close_create(TALLOC_CTX *mem_ctx,
433 struct tevent_context *ev,
434 struct cli_state *cli, uint16_t fnum,
435 struct tevent_req **psubreq);
436 struct tevent_req *cli_close_send(TALLOC_CTX *mem_ctx,
437 struct tevent_context *ev,
438 struct cli_state *cli, uint16_t fnum);
439 NTSTATUS cli_close_recv(struct tevent_req *req);
440 NTSTATUS cli_close(struct cli_state *cli, uint16_t fnum);
441 struct tevent_req *cli_ftruncate_send(TALLOC_CTX *mem_ctx,
442 struct tevent_context *ev,
443 struct cli_state *cli,
444 uint16_t fnum,
445 uint64_t size);
446 NTSTATUS cli_ftruncate_recv(struct tevent_req *req);
447 NTSTATUS cli_ftruncate(struct cli_state *cli, uint16_t fnum, uint64_t size);
448 NTSTATUS cli_locktype(struct cli_state *cli, uint16_t fnum,
449 uint32_t offset, uint32_t len,
450 int timeout, unsigned char locktype);
451 struct smb1_lock_element {
452 uint16_t pid;
453 uint64_t offset;
454 uint64_t length;
457 struct tevent_req *cli_lockingx_create(
458 TALLOC_CTX *mem_ctx,
459 struct tevent_context *ev,
460 struct cli_state *cli,
461 uint16_t fnum,
462 uint8_t typeoflock,
463 uint8_t newoplocklevel,
464 int32_t timeout,
465 uint16_t num_unlocks,
466 const struct smb1_lock_element *unlocks,
467 uint16_t num_locks,
468 const struct smb1_lock_element *locks,
469 struct tevent_req **psmbreq);
470 struct tevent_req *cli_lockingx_send(
471 TALLOC_CTX *mem_ctx,
472 struct tevent_context *ev,
473 struct cli_state *cli,
474 uint16_t fnum,
475 uint8_t typeoflock,
476 uint8_t newoplocklevel,
477 int32_t timeout,
478 uint16_t num_unlocks,
479 const struct smb1_lock_element *unlocks,
480 uint16_t num_locks,
481 const struct smb1_lock_element *locks);
482 NTSTATUS cli_lockingx_recv(struct tevent_req *req);
483 NTSTATUS cli_lockingx(
484 struct cli_state *cli,
485 uint16_t fnum,
486 uint8_t typeoflock,
487 uint8_t newoplocklevel,
488 int32_t timeout,
489 uint16_t num_unlocks,
490 const struct smb1_lock_element *unlocks,
491 uint16_t num_locks,
492 const struct smb1_lock_element *locks);
494 NTSTATUS cli_lock32(struct cli_state *cli, uint16_t fnum, uint32_t offset,
495 uint32_t len, int timeout, enum brl_type lock_type);
496 struct tevent_req *cli_unlock_send(TALLOC_CTX *mem_ctx,
497 struct tevent_context *ev,
498 struct cli_state *cli,
499 uint16_t fnum,
500 uint64_t offset,
501 uint64_t len);
502 NTSTATUS cli_unlock_recv(struct tevent_req *req);
503 NTSTATUS cli_unlock(struct cli_state *cli, uint16_t fnum, uint32_t offset, uint32_t len);
504 struct tevent_req *cli_posix_lock_send(TALLOC_CTX *mem_ctx,
505 struct tevent_context *ev,
506 struct cli_state *cli,
507 uint16_t fnum,
508 uint64_t offset,
509 uint64_t len,
510 bool wait_lock,
511 enum brl_type lock_type);
512 NTSTATUS cli_posix_lock_recv(struct tevent_req *req);
513 NTSTATUS cli_posix_lock(struct cli_state *cli, uint16_t fnum,
514 uint64_t offset, uint64_t len,
515 bool wait_lock, enum brl_type lock_type);
516 struct tevent_req *cli_posix_unlock_send(TALLOC_CTX *mem_ctx,
517 struct tevent_context *ev,
518 struct cli_state *cli,
519 uint16_t fnum,
520 uint64_t offset,
521 uint64_t len);
522 NTSTATUS cli_posix_unlock_recv(struct tevent_req *req);
523 NTSTATUS cli_posix_unlock(struct cli_state *cli, uint16_t fnum, uint64_t offset, uint64_t len);
524 struct tevent_req *cli_getattrE_send(TALLOC_CTX *mem_ctx,
525 struct tevent_context *ev,
526 struct cli_state *cli,
527 uint16_t fnum);
528 NTSTATUS cli_getattrE_recv(struct tevent_req *req,
529 uint16_t *attr,
530 off_t *size,
531 time_t *change_time,
532 time_t *access_time,
533 time_t *write_time);
534 NTSTATUS cli_getattrE(struct cli_state *cli,
535 uint16_t fnum,
536 uint16_t *attr,
537 off_t *size,
538 time_t *change_time,
539 time_t *access_time,
540 time_t *write_time);
541 struct tevent_req *cli_setattrE_send(TALLOC_CTX *mem_ctx,
542 struct tevent_context *ev,
543 struct cli_state *cli,
544 uint16_t fnum,
545 time_t change_time,
546 time_t access_time,
547 time_t write_time);
548 NTSTATUS cli_setattrE_recv(struct tevent_req *req);
549 NTSTATUS cli_setattrE(struct cli_state *cli,
550 uint16_t fnum,
551 time_t change_time,
552 time_t access_time,
553 time_t write_time);
554 struct tevent_req *cli_getatr_send(TALLOC_CTX *mem_ctx,
555 struct tevent_context *ev,
556 struct cli_state *cli,
557 const char *fname);
558 NTSTATUS cli_getatr_recv(struct tevent_req *req,
559 uint16_t *attr,
560 off_t *size,
561 time_t *write_time);
562 NTSTATUS cli_getatr(struct cli_state *cli,
563 const char *fname,
564 uint16_t *attr,
565 off_t *size,
566 time_t *write_time);
567 struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx,
568 struct tevent_context *ev,
569 struct cli_state *cli,
570 const char *fname,
571 uint16_t attr,
572 time_t mtime);
573 NTSTATUS cli_setatr_recv(struct tevent_req *req);
574 NTSTATUS cli_setatr(struct cli_state *cli,
575 const char *fname,
576 uint16_t attr,
577 time_t mtime);
578 struct tevent_req *cli_chkpath_send(TALLOC_CTX *mem_ctx,
579 struct tevent_context *ev,
580 struct cli_state *cli,
581 const char *fname);
582 NTSTATUS cli_chkpath_recv(struct tevent_req *req);
583 NTSTATUS cli_chkpath(struct cli_state *cli, const char *path);
584 struct tevent_req *cli_dskattr_send(TALLOC_CTX *mem_ctx,
585 struct tevent_context *ev,
586 struct cli_state *cli);
587 NTSTATUS cli_dskattr_recv(struct tevent_req *req, int *bsize, int *total,
588 int *avail);
589 NTSTATUS cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail);
590 NTSTATUS cli_disk_size(struct cli_state *cli, const char *path, uint64_t *bsize,
591 uint64_t *total, uint64_t *avail);
592 struct tevent_req *cli_ctemp_send(TALLOC_CTX *mem_ctx,
593 struct tevent_context *ev,
594 struct cli_state *cli,
595 const char *path);
596 NTSTATUS cli_ctemp_recv(struct tevent_req *req,
597 TALLOC_CTX *ctx,
598 uint16_t *pfnum,
599 char **outfile);
600 NTSTATUS cli_ctemp(struct cli_state *cli,
601 TALLOC_CTX *ctx,
602 const char *path,
603 uint16_t *pfnum,
604 char **out_path);
605 NTSTATUS cli_raw_ioctl(struct cli_state *cli, uint16_t fnum, uint32_t code, DATA_BLOB *blob);
606 NTSTATUS cli_set_ea_path(struct cli_state *cli, const char *path,
607 const char *ea_name, const char *ea_val,
608 size_t ea_len);
609 NTSTATUS cli_set_ea_fnum(struct cli_state *cli, uint16_t fnum,
610 const char *ea_name, const char *ea_val,
611 size_t ea_len);
612 struct tevent_req *cli_get_ea_list_path_send(TALLOC_CTX *mem_ctx,
613 struct tevent_context *ev,
614 struct cli_state *cli,
615 const char *fname);
616 NTSTATUS cli_get_ea_list_path_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
617 size_t *pnum_eas, struct ea_struct **peas);
618 NTSTATUS cli_get_ea_list_path(struct cli_state *cli, const char *path,
619 TALLOC_CTX *ctx,
620 size_t *pnum_eas,
621 struct ea_struct **pea_list);
622 struct tevent_req *cli_posix_open_send(TALLOC_CTX *mem_ctx,
623 struct tevent_context *ev,
624 struct cli_state *cli,
625 const char *fname,
626 int flags,
627 mode_t mode);
628 NTSTATUS cli_posix_open_recv(struct tevent_req *req, uint16_t *pfnum);
629 NTSTATUS cli_posix_open(struct cli_state *cli, const char *fname,
630 int flags, mode_t mode, uint16_t *fnum);
631 struct tevent_req *cli_posix_mkdir_send(TALLOC_CTX *mem_ctx,
632 struct tevent_context *ev,
633 struct cli_state *cli,
634 const char *fname,
635 mode_t mode);
636 NTSTATUS cli_posix_mkdir_recv(struct tevent_req *req);
637 NTSTATUS cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode);
639 struct tevent_req *cli_posix_unlink_send(TALLOC_CTX *mem_ctx,
640 struct tevent_context *ev,
641 struct cli_state *cli,
642 const char *fname);
643 NTSTATUS cli_posix_unlink_recv(struct tevent_req *req);
644 NTSTATUS cli_posix_unlink(struct cli_state *cli, const char *fname);
646 struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX *mem_ctx,
647 struct tevent_context *ev,
648 struct cli_state *cli,
649 const char *fname);
650 NTSTATUS cli_posix_rmdir_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
651 NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname);
652 struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
653 struct tevent_context *ev,
654 struct cli_state *cli, uint16_t fnum,
655 uint32_t buffer_size,
656 uint32_t completion_filter, bool recursive);
657 NTSTATUS cli_notify_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
658 uint32_t *pnum_changes,
659 struct notify_change **pchanges);
660 NTSTATUS cli_notify(struct cli_state *cli, uint16_t fnum, uint32_t buffer_size,
661 uint32_t completion_filter, bool recursive,
662 TALLOC_CTX *mem_ctx, uint32_t *pnum_changes,
663 struct notify_change **pchanges);
665 struct tevent_req *cli_nttrans_create_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev,
667 struct cli_state *cli,
668 const char *fname,
669 uint32_t CreatFlags,
670 uint32_t DesiredAccess,
671 uint32_t FileAttributes,
672 uint32_t ShareAccess,
673 uint32_t CreateDisposition,
674 uint32_t CreateOptions,
675 uint8_t SecurityFlags,
676 struct security_descriptor *secdesc,
677 struct ea_struct *eas,
678 int num_eas);
679 NTSTATUS cli_nttrans_create_recv(struct tevent_req *req,
680 uint16_t *fnum,
681 struct smb_create_returns *cr);
682 NTSTATUS cli_nttrans_create(struct cli_state *cli,
683 const char *fname,
684 uint32_t CreatFlags,
685 uint32_t DesiredAccess,
686 uint32_t FileAttributes,
687 uint32_t ShareAccess,
688 uint32_t CreateDisposition,
689 uint32_t CreateOptions,
690 uint8_t SecurityFlags,
691 struct security_descriptor *secdesc,
692 struct ea_struct *eas,
693 int num_eas,
694 uint16_t *pfid,
695 struct smb_create_returns *cr);
697 /* The following definitions come from libsmb/clifsinfo.c */
699 struct tevent_req *cli_unix_extensions_version_send(TALLOC_CTX *mem_ctx,
700 struct tevent_context *ev,
701 struct cli_state *cli);
702 NTSTATUS cli_unix_extensions_version_recv(struct tevent_req *req,
703 uint16_t *pmajor, uint16_t *pminor,
704 uint32_t *pcaplow,
705 uint32_t *pcaphigh);
706 NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16_t *pmajor,
707 uint16_t *pminor, uint32_t *pcaplow,
708 uint32_t *pcaphigh);
709 struct tevent_req *cli_set_unix_extensions_capabilities_send(
710 TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli,
711 uint16_t major, uint16_t minor, uint32_t caplow, uint32_t caphigh);
712 NTSTATUS cli_set_unix_extensions_capabilities_recv(struct tevent_req *req);
713 NTSTATUS cli_set_unix_extensions_capabilities(struct cli_state *cli,
714 uint16_t major, uint16_t minor,
715 uint32_t caplow, uint32_t caphigh);
716 struct tevent_req *cli_get_fs_attr_info_send(TALLOC_CTX *mem_ctx,
717 struct tevent_context *ev,
718 struct cli_state *cli);
719 NTSTATUS cli_get_fs_attr_info_recv(struct tevent_req *req, uint32_t *fs_attr);
720 NTSTATUS cli_get_fs_attr_info(struct cli_state *cli, uint32_t *fs_attr);
721 NTSTATUS cli_get_fs_volume_info(struct cli_state *cli,
722 TALLOC_CTX *mem_ctx, char **volume_name,
723 uint32_t *pserial_number, time_t *pdate);
724 NTSTATUS cli_get_fs_full_size_info(struct cli_state *cli,
725 uint64_t *total_allocation_units,
726 uint64_t *caller_allocation_units,
727 uint64_t *actual_allocation_units,
728 uint64_t *sectors_per_allocation_unit,
729 uint64_t *bytes_per_sector);
730 NTSTATUS cli_get_posix_fs_info(struct cli_state *cli,
731 uint32_t *optimal_transfer_size,
732 uint32_t *block_size,
733 uint64_t *total_blocks,
734 uint64_t *blocks_available,
735 uint64_t *user_blocks_available,
736 uint64_t *total_file_nodes,
737 uint64_t *free_file_nodes,
738 uint64_t *fs_identifier);
739 struct tevent_req *cli_posix_whoami_send(TALLOC_CTX *mem_ctx,
740 struct tevent_context *ev,
741 struct cli_state *cli);
742 NTSTATUS cli_posix_whoami_recv(struct tevent_req *req,
743 TALLOC_CTX *mem_ctx,
744 uint64_t *puid,
745 uint64_t *pgid,
746 uint32_t *pnum_gids,
747 uint64_t **pgids,
748 uint32_t *pnum_sids,
749 struct dom_sid **psids,
750 bool *pguest);
751 NTSTATUS cli_posix_whoami(struct cli_state *cli,
752 TALLOC_CTX *mem_ctx,
753 uint64_t *puid,
754 uint64_t *pgid,
755 uint32_t *num_gids,
756 uint64_t **gids,
757 uint32_t *num_sids,
758 struct dom_sid **sids,
759 bool *pguest);
761 /* The following definitions come from libsmb/clilist.c */
763 NTSTATUS is_bad_finfo_name(const struct cli_state *cli,
764 const struct file_info *finfo);
766 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint16_t attribute,
767 NTSTATUS (*fn)(const char *, struct file_info *,
768 const char *, void *), void *state);
769 NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask,
770 uint16_t attribute, int info_level,
771 NTSTATUS (*fn)(const char *mnt, struct file_info *finfo,
772 const char *mask, void *private_data),
773 void *private_data);
774 struct tevent_req *cli_list_send(TALLOC_CTX *mem_ctx,
775 struct tevent_context *ev,
776 struct cli_state *cli,
777 const char *mask,
778 uint16_t attribute,
779 uint16_t info_level);
780 NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
781 struct file_info **finfo, size_t *num_finfo);
782 NTSTATUS cli_list(struct cli_state *cli,const char *Mask,uint16_t attribute,
783 NTSTATUS (*fn)(const char *, struct file_info *, const char *,
784 void *), void *state);
786 /* The following definitions come from libsmb/climessage.c */
788 struct tevent_req *cli_message_send(TALLOC_CTX *mem_ctx,
789 struct tevent_context *ev,
790 struct cli_state *cli,
791 const char *host, const char *username,
792 const char *message);
793 NTSTATUS cli_message_recv(struct tevent_req *req);
794 NTSTATUS cli_message(struct cli_state *cli, const char *host,
795 const char *username, const char *message);
797 /* The following definitions come from libsmb/clioplock.c */
799 struct tevent_req *cli_smb_oplock_break_waiter_send(TALLOC_CTX *mem_ctx,
800 struct tevent_context *ev,
801 struct cli_state *cli);
802 NTSTATUS cli_smb_oplock_break_waiter_recv(struct tevent_req *req,
803 uint16_t *pfnum,
804 uint8_t *plevel);
806 struct tevent_req *cli_oplock_ack_send(TALLOC_CTX *mem_ctx,
807 struct tevent_context *ev,
808 struct cli_state *cli,
809 uint16_t fnum, uint8_t level);
810 NTSTATUS cli_oplock_ack_recv(struct tevent_req *req);
812 /* The following definitions come from libsmb/cliprint.c */
814 int cli_print_queue(struct cli_state *cli,
815 void (*fn)(struct print_job_info *));
816 int cli_printjob_del(struct cli_state *cli, int job);
818 /* The following definitions come from libsmb/cliquota.c */
820 NTSTATUS cli_get_quota_handle(struct cli_state *cli, uint16_t *quota_fnum);
821 void free_ntquota_list(SMB_NTQUOTA_LIST **qt_list);
822 bool parse_user_quota_record(const uint8_t *rdata,
823 unsigned int rdata_count,
824 unsigned int *offset,
825 SMB_NTQUOTA_STRUCT *pqt);
826 bool add_record_to_ntquota_list(TALLOC_CTX *mem_ctx,
827 SMB_NTQUOTA_STRUCT *pqt,
828 SMB_NTQUOTA_LIST **pqt_list);
829 NTSTATUS parse_user_quota_list(const uint8_t *curdata,
830 uint32_t curdata_size,
831 TALLOC_CTX *mem_ctx,
832 SMB_NTQUOTA_LIST **pqt_list);
833 NTSTATUS parse_fs_quota_buffer(const uint8_t *rdata,
834 unsigned int rdata_count,
835 SMB_NTQUOTA_STRUCT *pqt);
836 NTSTATUS build_user_quota_buffer(SMB_NTQUOTA_LIST *qt_list,
837 uint32_t maxlen,
838 TALLOC_CTX *mem_ctx,
839 DATA_BLOB *outbuf,
840 SMB_NTQUOTA_LIST **end_ptr);
841 NTSTATUS build_fs_quota_buffer(TALLOC_CTX *mem_ctx,
842 const SMB_NTQUOTA_STRUCT *pqt,
843 DATA_BLOB *blob,
844 uint32_t maxlen);
845 NTSTATUS cli_get_user_quota(struct cli_state *cli, int quota_fnum,
846 SMB_NTQUOTA_STRUCT *pqt);
847 NTSTATUS cli_set_user_quota(struct cli_state *cli,
848 int quota_fnum,
849 SMB_NTQUOTA_LIST *qtl);
850 NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum,
851 SMB_NTQUOTA_LIST **pqt_list);
852 NTSTATUS cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum,
853 SMB_NTQUOTA_STRUCT *pqt);
854 NTSTATUS cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum,
855 SMB_NTQUOTA_STRUCT *pqt);
857 /* The following definitions come from libsmb/clireadwrite.c */
859 struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
860 struct tevent_context *ev,
861 struct cli_state *cli, uint16_t fnum,
862 off_t offset, size_t size,
863 struct tevent_req **psmbreq);
864 struct tevent_req *cli_read_andx_send(TALLOC_CTX *mem_ctx,
865 struct tevent_context *ev,
866 struct cli_state *cli, uint16_t fnum,
867 off_t offset, size_t size);
868 NTSTATUS cli_read_andx_recv(struct tevent_req *req, ssize_t *received,
869 uint8_t **rcvbuf);
870 struct tevent_req *cli_pull_send(TALLOC_CTX *mem_ctx,
871 struct tevent_context *ev,
872 struct cli_state *cli,
873 uint16_t fnum, off_t start_offset,
874 off_t size, size_t window_size,
875 NTSTATUS (*sink)(char *buf, size_t n,
876 void *priv),
877 void *priv);
878 NTSTATUS cli_pull_recv(struct tevent_req *req, off_t *received);
879 NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
880 off_t start_offset, off_t size, size_t window_size,
881 NTSTATUS (*sink)(char *buf, size_t n, void *priv),
882 void *priv, off_t *received);
883 NTSTATUS cli_read_sink(char *buf, size_t n, void *priv);
884 struct tevent_req *cli_read_send(
885 TALLOC_CTX *mem_ctx,
886 struct tevent_context *ev,
887 struct cli_state *cli,
888 uint16_t fnum,
889 char *buf,
890 off_t offset,
891 size_t size);
892 NTSTATUS cli_read_recv(struct tevent_req *req, size_t *received);
893 NTSTATUS cli_read(struct cli_state *cli, uint16_t fnum,
894 char *buf, off_t offset, size_t size,
895 size_t *nread);
896 NTSTATUS cli_smbwrite(struct cli_state *cli, uint16_t fnum, char *buf,
897 off_t offset, size_t size1, size_t *ptotal);
898 struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx,
899 struct tevent_context *ev,
900 struct cli_state *cli, uint16_t fnum,
901 uint16_t mode, const uint8_t *buf,
902 off_t offset, size_t size,
903 struct tevent_req **reqs_before,
904 int num_reqs_before,
905 struct tevent_req **psmbreq);
906 struct tevent_req *cli_write_andx_send(TALLOC_CTX *mem_ctx,
907 struct tevent_context *ev,
908 struct cli_state *cli, uint16_t fnum,
909 uint16_t mode, const uint8_t *buf,
910 off_t offset, size_t size);
911 NTSTATUS cli_write_andx_recv(struct tevent_req *req, size_t *pwritten);
913 struct tevent_req *cli_write_send(TALLOC_CTX *mem_ctx,
914 struct tevent_context *ev,
915 struct cli_state *cli, uint16_t fnum,
916 uint16_t mode, const uint8_t *buf,
917 off_t offset, size_t size);
918 NTSTATUS cli_write_recv(struct tevent_req *req, size_t *pwritten);
920 struct tevent_req *cli_writeall_send(
921 TALLOC_CTX *mem_ctx,
922 struct tevent_context *ev,
923 struct cli_state *cli,
924 uint16_t fnum,
925 uint16_t mode,
926 const uint8_t *buf,
927 off_t offset,
928 size_t size);
929 NTSTATUS cli_writeall_recv(struct tevent_req *req, size_t *pwritten);
930 NTSTATUS cli_writeall(struct cli_state *cli, uint16_t fnum, uint16_t mode,
931 const uint8_t *buf, off_t offset, size_t size,
932 size_t *pwritten);
934 struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
935 struct cli_state *cli,
936 uint16_t fnum, uint16_t mode,
937 off_t start_offset, size_t window_size,
938 size_t (*source)(uint8_t *buf, size_t n,
939 void *priv),
940 void *priv);
941 NTSTATUS cli_push_recv(struct tevent_req *req);
942 NTSTATUS cli_push(struct cli_state *cli, uint16_t fnum, uint16_t mode,
943 off_t start_offset, size_t window_size,
944 size_t (*source)(uint8_t *buf, size_t n, void *priv),
945 void *priv);
947 NTSTATUS cli_splice(struct cli_state *srccli, struct cli_state *dstcli,
948 uint16_t src_fnum, uint16_t dst_fnum,
949 off_t size,
950 off_t src_offset, off_t dst_offset,
951 off_t *written,
952 int (*splice_cb)(off_t n, void *priv), void *priv);
954 /* The following definitions come from libsmb/clisecdesc.c */
956 NTSTATUS cli_query_security_descriptor(struct cli_state *cli,
957 uint16_t fnum,
958 uint32_t sec_info,
959 TALLOC_CTX *mem_ctx,
960 struct security_descriptor **sd);
961 NTSTATUS cli_query_secdesc(struct cli_state *cli, uint16_t fnum,
962 TALLOC_CTX *mem_ctx, struct security_descriptor **sd);
963 NTSTATUS cli_set_security_descriptor(struct cli_state *cli,
964 uint16_t fnum,
965 uint32_t sec_info,
966 const struct security_descriptor *sd);
967 NTSTATUS cli_set_secdesc(struct cli_state *cli, uint16_t fnum,
968 const struct security_descriptor *sd);
970 NTSTATUS cli_query_mxac(struct cli_state *cli,
971 const char *filename,
972 uint32_t *mxac);
974 /* The following definitions come from libsmb/clistr.c */
976 size_t clistr_pull_talloc(TALLOC_CTX *ctx,
977 const char *base,
978 uint16_t flags2,
979 char **pp_dest,
980 const void *src,
981 int src_len,
982 int flags);
983 bool clistr_is_previous_version_path(const char *path,
984 const char **startp,
985 const char **endp,
986 time_t *ptime);
988 /* The following definitions come from libsmb/clitrans.c */
990 struct tevent_req *cli_trans_send(
991 TALLOC_CTX *mem_ctx, struct tevent_context *ev,
992 struct cli_state *cli, uint16_t additional_flags2, uint8_t cmd,
993 const char *pipe_name, uint16_t fid, uint16_t function, int flags,
994 uint16_t *setup, uint8_t num_setup, uint8_t max_setup,
995 uint8_t *param, uint32_t num_param, uint32_t max_param,
996 uint8_t *data, uint32_t num_data, uint32_t max_data);
997 NTSTATUS cli_trans_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
998 uint16_t *recv_flags2,
999 uint16_t **setup, uint8_t min_setup,
1000 uint8_t *num_setup,
1001 uint8_t **param, uint32_t min_param,
1002 uint32_t *num_param,
1003 uint8_t **data, uint32_t min_data,
1004 uint32_t *num_data);
1005 NTSTATUS cli_trans(TALLOC_CTX *mem_ctx, struct cli_state *cli,
1006 uint8_t trans_cmd,
1007 const char *pipe_name, uint16_t fid, uint16_t function,
1008 int flags,
1009 uint16_t *setup, uint8_t num_setup, uint8_t max_setup,
1010 uint8_t *param, uint32_t num_param, uint32_t max_param,
1011 uint8_t *data, uint32_t num_data, uint32_t max_data,
1012 uint16_t *recv_flags2,
1013 uint16_t **rsetup, uint8_t min_rsetup, uint8_t *num_rsetup,
1014 uint8_t **rparam, uint32_t min_rparam, uint32_t *num_rparam,
1015 uint8_t **rdata, uint32_t min_rdata, uint32_t *num_rdata);
1017 /* The following definitions come from libsmb/reparse_symlink.c */
1019 bool symlink_reparse_buffer_marshall(
1020 const char *substitute, const char *printname, uint32_t flags,
1021 TALLOC_CTX *mem_ctx, uint8_t **pdst, size_t *pdstlen);
1022 bool symlink_reparse_buffer_parse(
1023 const uint8_t *src, size_t srclen, TALLOC_CTX *mem_ctx,
1024 char **psubstitute_name, char **pprint_name, uint32_t *pflags);
1026 /* The following definitions come from libsmb/clisymlink.c */
1028 struct tevent_req *cli_symlink_send(TALLOC_CTX *mem_ctx,
1029 struct tevent_context *ev,
1030 struct cli_state *cli,
1031 const char *oldpath,
1032 const char *newpath,
1033 uint32_t flags);
1034 NTSTATUS cli_symlink_recv(struct tevent_req *req);
1035 NTSTATUS cli_symlink(struct cli_state *cli, const char *oldname,
1036 const char *newname, uint32_t flags);
1038 struct tevent_req *cli_readlink_send(TALLOC_CTX *mem_ctx,
1039 struct tevent_context *ev,
1040 struct cli_state *cli,
1041 const char *fname);
1042 NTSTATUS cli_readlink_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
1043 char **psubstitute_name, char **pprint_name,
1044 uint32_t *pflags);
1045 NTSTATUS cli_readlink(struct cli_state *cli, const char *fname,
1046 TALLOC_CTX *mem_ctx, char **psubstitute_name,
1047 char **pprint_name, uint32_t *pflags);
1049 NTSTATUS fill_quota_buffer(TALLOC_CTX *mem_ctx,
1050 SMB_NTQUOTA_LIST *tmp_list,
1051 bool return_single,
1052 uint32_t max_data,
1053 DATA_BLOB *blob,
1054 SMB_NTQUOTA_LIST **end_ptr);
1055 /* The following definitions come from libsmb/passchange.c */
1057 NTSTATUS remote_password_change(const char *remote_machine,
1058 const char *domain, const char *user_name,
1059 const char *old_passwd, const char *new_passwd,
1060 char **err_str);
1062 #endif /* _LIBSMB_PROTO_H_ */