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