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