Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/libsmb/proto.h

    r740 r988  
    2727#define _LIBSMB_PROTO_H_
    2828
     29#include "ads.h"
     30#include "auth_info.h"
     31
     32struct smb_trans_enc_state;
     33
    2934/* The following definitions come from libsmb/cliconnect.c  */
    3035
    31 ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user,
    32                               const char *pass, const char *user_domain,
    33                                     const char * dest_realm);
    34 
     36struct tevent_req *cli_session_setup_send(TALLOC_CTX *mem_ctx,
     37                                          struct tevent_context *ev,
     38                                          struct cli_state *cli,
     39                                          const char *user,
     40                                          const char *pass, int passlen,
     41                                          const char *ntpass, int ntpasslen,
     42                                          const char *workgroup);
     43NTSTATUS cli_session_setup_recv(struct tevent_req *req);
    3544NTSTATUS cli_session_setup(struct cli_state *cli,
    3645                           const char *user,
     
    3948                           const char *workgroup);
    4049struct tevent_req *cli_session_setup_guest_create(TALLOC_CTX *mem_ctx,
    41                                                   struct event_context *ev,
     50                                                  struct tevent_context *ev,
    4251                                                  struct cli_state *cli,
    4352                                                  struct tevent_req **psmbreq);
    4453struct tevent_req *cli_session_setup_guest_send(TALLOC_CTX *mem_ctx,
    45                                                 struct event_context *ev,
     54                                                struct tevent_context *ev,
    4655                                                struct cli_state *cli);
    4756NTSTATUS cli_session_setup_guest_recv(struct tevent_req *req);
    48 struct tevent_req *cli_ulogoff_send(TALLOC_CTX *mem_ctx,
    49                                     struct tevent_context *ev,
    50                                     struct cli_state *cli);
    51 NTSTATUS cli_ulogoff_recv(struct tevent_req *req);
    5257NTSTATUS cli_ulogoff(struct cli_state *cli);
    5358struct tevent_req *cli_tcon_andx_create(TALLOC_CTX *mem_ctx,
    54                                         struct event_context *ev,
     59                                        struct tevent_context *ev,
    5560                                        struct cli_state *cli,
    5661                                        const char *share, const char *dev,
     
    5863                                        struct tevent_req **psmbreq);
    5964struct tevent_req *cli_tcon_andx_send(TALLOC_CTX *mem_ctx,
    60                                       struct event_context *ev,
     65                                      struct tevent_context *ev,
    6166                                      struct cli_state *cli,
    6267                                      const char *share, const char *dev,
     
    6570NTSTATUS cli_tcon_andx(struct cli_state *cli, const char *share,
    6671                       const char *dev, const char *pass, int passlen);
    67 struct tevent_req *cli_tdis_send(TALLOC_CTX *mem_ctx,
    68                                  struct tevent_context *ev,
    69                                  struct cli_state *cli);
    70 NTSTATUS cli_tdis_recv(struct tevent_req *req);
     72NTSTATUS cli_tree_connect(struct cli_state *cli, const char *share,
     73                          const char *dev, const char *pass, int passlen);
    7174NTSTATUS cli_tdis(struct cli_state *cli);
    72 NTSTATUS cli_negprot(struct cli_state *cli);
    73 struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx,
    74                                     struct event_context *ev,
    75                                     struct cli_state *cli);
    76 NTSTATUS cli_negprot_recv(struct tevent_req *req);
    77 bool cli_session_request(struct cli_state *cli,
    78                          struct nmb_name *calling, struct nmb_name *called);
    79 NTSTATUS cli_connect(struct cli_state *cli,
    80                 const char *host,
    81                 struct sockaddr_storage *dest_ss);
     75NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss,
     76                        uint16_t port, int name_type, const char *myname,
     77                        int signing_state, int flags, struct cli_state **pcli);
    8278NTSTATUS cli_start_connection(struct cli_state **output_cli,
    8379                              const char *my_name,
    8480                              const char *dest_host,
    85                               struct sockaddr_storage *dest_ss, int port,
     81                              const struct sockaddr_storage *dest_ss, int port,
    8682                              int signing_state, int flags);
     83struct tevent_req *cli_full_connection_send(
     84        TALLOC_CTX *mem_ctx, struct tevent_context *ev,
     85        const char *my_name, const char *dest_host,
     86        const struct sockaddr_storage *dest_ss, int port,
     87        const char *service, const char *service_type,
     88        const char *user, const char *domain,
     89        const char *password, int flags, int signing_state);
     90NTSTATUS cli_full_connection_recv(struct tevent_req *req,
     91                                  struct cli_state **output_cli);
    8792NTSTATUS cli_full_connection(struct cli_state **output_cli,
    8893                             const char *my_name,
    8994                             const char *dest_host,
    90                              struct sockaddr_storage *dest_ss, int port,
     95                             const struct sockaddr_storage *dest_ss, int port,
    9196                             const char *service, const char *service_type,
    9297                             const char *user, const char *domain,
    9398                             const char *password, int flags,
    9499                             int signing_state);
    95 bool attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
    96                                      struct sockaddr_storage *pdest_ss);
    97100NTSTATUS cli_raw_tcon(struct cli_state *cli,
    98101                      const char *service, const char *pass, const char *dev,
    99                       uint16 *max_xmit, uint16 *tid);
     102                      uint16_t *max_xmit, uint16_t *tid);
    100103struct cli_state *get_ipc_connect(char *server,
    101104                                struct sockaddr_storage *server_ss,
     
    116119                        const char *domain,
    117120                        const char *sharename);
    118 struct cli_state *cli_cm_open(TALLOC_CTX *ctx,
     121NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
    119122                                struct cli_state *referring_cli,
    120123                                const char *server,
     
    125128                                int max_protocol,
    126129                                int port,
    127                                 int name_type);
    128 void cli_cm_display(const struct cli_state *c);
     130                                int name_type,
     131                                struct cli_state **pcli);
     132void cli_cm_display(struct cli_state *c);
    129133struct client_dfs_referral;
    130134NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx,
     
    134138                        size_t *num_refs,
    135139                        size_t *consumed);
    136 bool cli_resolve_path(TALLOC_CTX *ctx,
    137                         const char *mountpt,
    138                         const struct user_auth_info *dfs_auth_info,
    139                         struct cli_state *rootcli,
    140                         const char *path,
    141                         struct cli_state **targetcli,
    142                         char **pp_targetpath);
     140NTSTATUS cli_resolve_path(TALLOC_CTX *ctx,
     141                          const char *mountpt,
     142                          const struct user_auth_info *dfs_auth_info,
     143                          struct cli_state *rootcli,
     144                          const char *path,
     145                          struct cli_state **targetcli,
     146                          char **pp_targetpath);
    143147
    144148bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
     
    156160int cli_set_message(char *buf,int num_words,int num_bytes,bool zero);
    157161unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout);
    158 void cli_set_port(struct cli_state *cli, int port);
    159 bool cli_state_seqnum_persistent(struct cli_state *cli,
    160                                  uint16_t mid);
    161 bool cli_state_seqnum_remove(struct cli_state *cli,
    162                              uint16_t mid);
    163 bool cli_receive_smb(struct cli_state *cli);
    164 bool cli_send_smb(struct cli_state *cli);
     162bool cli_set_backup_intent(struct cli_state *cli, bool flag);
    165163void cli_setup_packet_buf(struct cli_state *cli, char *buf);
    166 void cli_setup_packet(struct cli_state *cli);
    167 void cli_setup_bcc(struct cli_state *cli, void *p);
    168 NTSTATUS cli_set_domain(struct cli_state *cli, const char *domain);
    169 NTSTATUS cli_set_username(struct cli_state *cli, const char *username);
    170 NTSTATUS cli_set_password(struct cli_state *cli, const char *password);
    171 NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password);
    172 struct cli_state *cli_initialise(void);
    173 struct cli_state *cli_initialise_ex(int signing_state);
     164extern struct GUID cli_state_client_guid;
     165struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
     166                                   int fd,
     167                                   const char *remote_name,
     168                                   const char *remote_realm,
     169                                   int signing_state,
     170                                   int flags);
    174171void cli_nt_pipes_close(struct cli_state *cli);
    175172void cli_shutdown(struct cli_state *cli);
    176 void cli_sockopt(struct cli_state *cli, const char *options);
    177 uint16 cli_setpid(struct cli_state *cli, uint16 pid);
     173const char *cli_state_remote_realm(struct cli_state *cli);
     174uint16_t cli_state_get_vc_num(struct cli_state *cli);
     175uint16_t cli_setpid(struct cli_state *cli, uint16_t pid);
     176uint16_t cli_getpid(struct cli_state *cli);
     177bool cli_state_has_tcon(struct cli_state *cli);
     178uint16_t cli_state_get_tid(struct cli_state *cli);
     179uint16_t cli_state_set_tid(struct cli_state *cli, uint16_t tid);
     180uint16_t cli_state_get_uid(struct cli_state *cli);
     181uint16_t cli_state_set_uid(struct cli_state *cli, uint16_t uid);
    178182bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive);
    179 struct tevent_req *cli_echo_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
     183uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs);
     184time_t cli_state_server_time(struct cli_state *cli);
     185struct tevent_req *cli_echo_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
    180186                                 struct cli_state *cli, uint16_t num_echos,
    181187                                 DATA_BLOB data);
    182188NTSTATUS cli_echo_recv(struct tevent_req *req);
    183189NTSTATUS cli_echo(struct cli_state *cli, uint16_t num_echos, DATA_BLOB data);
    184 bool cli_ucs2(struct cli_state *cli);
    185190bool is_andx_req(uint8_t cmd);
    186191NTSTATUS cli_smb(TALLOC_CTX *mem_ctx, struct cli_state *cli,
     
    196201const char *cli_errstr(struct cli_state *cli);
    197202NTSTATUS cli_nt_error(struct cli_state *cli);
    198 void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode);
     203void cli_dos_error(struct cli_state *cli, uint8_t *eclass, uint32_t *ecode);
    199204int cli_errno(struct cli_state *cli);
    200205bool cli_is_error(struct cli_state *cli);
    201206bool cli_is_nt_error(struct cli_state *cli);
    202207bool cli_is_dos_error(struct cli_state *cli);
    203 NTSTATUS cli_get_nt_error(struct cli_state *cli);
    204 void cli_set_nt_error(struct cli_state *cli, NTSTATUS status);
    205 void cli_reset_error(struct cli_state *cli);
    206208bool cli_state_is_connected(struct cli_state *cli);
    207209
     
    223225
    224226struct tevent_req *cli_posix_symlink_send(TALLOC_CTX *mem_ctx,
    225                                         struct event_context *ev,
     227                                        struct tevent_context *ev,
    226228                                        struct cli_state *cli,
    227229                                        const char *oldname,
     
    232234                        const char *newname);
    233235struct tevent_req *cli_posix_readlink_send(TALLOC_CTX *mem_ctx,
    234                                         struct event_context *ev,
     236                                        struct tevent_context *ev,
    235237                                        struct cli_state *cli,
    236238                                        const char *fname,
     
    241243                        char *linkpath, size_t len);
    242244struct tevent_req *cli_posix_hardlink_send(TALLOC_CTX *mem_ctx,
    243                                         struct event_context *ev,
     245                                        struct tevent_context *ev,
    244246                                        struct cli_state *cli,
    245247                                        const char *oldname,
     
    251253uint32_t unix_perms_to_wire(mode_t perms);
    252254mode_t wire_perms_to_unix(uint32_t perms);
    253 struct tevent_req *cli_posix_getfacl_send(TALLOC_CTX *mem_ctx,
    254                                         struct event_context *ev,
     255struct tevent_req *cli_posix_getacl_send(TALLOC_CTX *mem_ctx,
     256                                        struct tevent_context *ev,
    255257                                        struct cli_state *cli,
    256258                                        const char *fname);
    257 NTSTATUS cli_posix_getfacl_recv(struct tevent_req *req,
     259NTSTATUS cli_posix_getacl_recv(struct tevent_req *req,
    258260                                TALLOC_CTX *mem_ctx,
    259261                                size_t *prb_size,
    260262                                char **retbuf);
    261 NTSTATUS cli_posix_getfacl(struct cli_state *cli,
     263NTSTATUS cli_posix_getacl(struct cli_state *cli,
    262264                        const char *fname,
    263265                        TALLOC_CTX *mem_ctx,
    264266                        size_t *prb_size,
    265267                        char **retbuf);
     268struct tevent_req *cli_posix_setacl_send(TALLOC_CTX *mem_ctx,
     269                                        struct tevent_context *ev,
     270                                        struct cli_state *cli,
     271                                        const char *fname,
     272                                        const void *acl_buf,
     273                                        size_t acl_buf_size);
     274NTSTATUS cli_posix_setacl_recv(struct tevent_req *req);
     275NTSTATUS cli_posix_setacl(struct cli_state *cli,
     276                        const char *fname,
     277                        const void *acl_buf,
     278                        size_t acl_buf_size);
    266279struct tevent_req *cli_posix_stat_send(TALLOC_CTX *mem_ctx,
    267                                         struct event_context *ev,
     280                                        struct tevent_context *ev,
    268281                                        struct cli_state *cli,
    269282                                        const char *fname);
     
    274287                        SMB_STRUCT_STAT *sbuf);
    275288struct tevent_req *cli_posix_chmod_send(TALLOC_CTX *mem_ctx,
    276                                         struct event_context *ev,
     289                                        struct tevent_context *ev,
    277290                                        struct cli_state *cli,
    278291                                        const char *fname,
     
    281294NTSTATUS cli_posix_chmod(struct cli_state *cli, const char *fname, mode_t mode);
    282295struct tevent_req *cli_posix_chown_send(TALLOC_CTX *mem_ctx,
    283                                         struct event_context *ev,
     296                                        struct tevent_context *ev,
    284297                                        struct cli_state *cli,
    285298                                        const char *fname,
     
    292305                        gid_t gid);
    293306struct tevent_req *cli_rename_send(TALLOC_CTX *mem_ctx,
    294                                 struct event_context *ev,
     307                                struct tevent_context *ev,
    295308                                struct cli_state *cli,
    296309                                const char *fname_src,
     
    299312NTSTATUS cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst);
    300313struct tevent_req *cli_ntrename_send(TALLOC_CTX *mem_ctx,
    301                                 struct event_context *ev,
     314                                struct tevent_context *ev,
    302315                                struct cli_state *cli,
    303316                                const char *fname_src,
     
    307320
    308321struct tevent_req *cli_nt_hardlink_send(TALLOC_CTX *mem_ctx,
    309                                 struct event_context *ev,
     322                                struct tevent_context *ev,
    310323                                struct cli_state *cli,
    311324                                const char *fname_src,
     
    315328
    316329struct tevent_req *cli_unlink_send(TALLOC_CTX *mem_ctx,
    317                                 struct event_context *ev,
     330                                struct tevent_context *ev,
    318331                                struct cli_state *cli,
    319332                                const char *fname,
     
    323336
    324337struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx,
    325                                   struct event_context *ev,
     338                                  struct tevent_context *ev,
    326339                                  struct cli_state *cli,
    327340                                  const char *dname);
     
    329342NTSTATUS cli_mkdir(struct cli_state *cli, const char *dname);
    330343struct tevent_req *cli_rmdir_send(TALLOC_CTX *mem_ctx,
    331                                   struct event_context *ev,
     344                                  struct tevent_context *ev,
    332345                                  struct cli_state *cli,
    333346                                  const char *dname);
     
    335348NTSTATUS cli_rmdir(struct cli_state *cli, const char *dname);
    336349struct tevent_req *cli_nt_delete_on_close_send(TALLOC_CTX *mem_ctx,
    337                                         struct event_context *ev,
     350                                        struct tevent_context *ev,
    338351                                        struct cli_state *cli,
    339352                                        uint16_t fnum,
     
    342355NTSTATUS cli_nt_delete_on_close(struct cli_state *cli, uint16_t fnum, bool flag);
    343356struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx,
    344                                      struct event_context *ev,
     357                                     struct tevent_context *ev,
    345358                                     struct cli_state *cli,
    346359                                     const char *fname,
     
    352365                                     uint32_t CreateOptions,
    353366                                     uint8_t SecurityFlags);
    354 NTSTATUS cli_ntcreate_recv(struct tevent_req *req, uint16_t *pfnum);
     367NTSTATUS cli_ntcreate_recv(struct tevent_req *req,
     368                        uint16_t *pfnum,
     369                        struct smb_create_returns *cr);
    355370NTSTATUS cli_ntcreate(struct cli_state *cli,
    356371                      const char *fname,
     
    362377                      uint32_t CreateOptions,
    363378                      uint8_t SecurityFlags,
    364                       uint16_t *pfid);
     379                      uint16_t *pfid,
     380                      struct smb_create_returns *cr);
    365381uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, const char *str,
    366382                            size_t str_len, size_t *pconverted_size);
    367383uint8_t *smb_bytes_push_bytes(uint8_t *buf, uint8_t prefix,
    368384                              const uint8_t *bytes, size_t num_bytes);
    369 struct tevent_req *cli_open_create(TALLOC_CTX *mem_ctx,
    370                                    struct event_context *ev,
     385uint8_t *trans2_bytes_push_str(uint8_t *buf, bool ucs2,
     386                               const char *str, size_t str_len,
     387                               size_t *pconverted_size);
     388uint8_t *trans2_bytes_push_bytes(uint8_t *buf,
     389                                 const uint8_t *bytes, size_t num_bytes);
     390struct tevent_req *cli_openx_create(TALLOC_CTX *mem_ctx,
     391                                   struct tevent_context *ev,
    371392                                   struct cli_state *cli, const char *fname,
    372393                                   int flags, int share_mode,
    373394                                   struct tevent_req **psmbreq);
    374 struct tevent_req *cli_open_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
     395struct tevent_req *cli_openx_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
    375396                                 struct cli_state *cli, const char *fname,
    376397                                 int flags, int share_mode);
    377 NTSTATUS cli_open_recv(struct tevent_req *req, uint16_t *fnum);
     398NTSTATUS cli_openx_recv(struct tevent_req *req, uint16_t *fnum);
     399NTSTATUS cli_openx(struct cli_state *cli, const char *fname, int flags, int share_mode, uint16_t *pfnum);
    378400NTSTATUS cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode, uint16_t *pfnum);
    379401struct tevent_req *cli_close_create(TALLOC_CTX *mem_ctx,
    380                                     struct event_context *ev,
     402                                    struct tevent_context *ev,
    381403                                    struct cli_state *cli, uint16_t fnum,
    382404                                    struct tevent_req **psubreq);
    383405struct tevent_req *cli_close_send(TALLOC_CTX *mem_ctx,
    384                                   struct event_context *ev,
     406                                  struct tevent_context *ev,
    385407                                  struct cli_state *cli, uint16_t fnum);
    386408NTSTATUS cli_close_recv(struct tevent_req *req);
    387409NTSTATUS cli_close(struct cli_state *cli, uint16_t fnum);
    388410struct tevent_req *cli_ftruncate_send(TALLOC_CTX *mem_ctx,
    389                                         struct event_context *ev,
     411                                        struct tevent_context *ev,
    390412                                        struct cli_state *cli,
    391413                                        uint16_t fnum,
     
    396418                      uint32_t offset, uint32_t len,
    397419                      int timeout, unsigned char locktype);
    398 bool cli_lock(struct cli_state *cli, uint16_t fnum,
    399               uint32_t offset, uint32_t len, int timeout, enum brl_type lock_type);
     420NTSTATUS cli_lock32(struct cli_state *cli, uint16_t fnum, uint32_t offset,
     421                    uint32_t len, int timeout, enum brl_type lock_type);
    400422struct tevent_req *cli_unlock_send(TALLOC_CTX *mem_ctx,
    401                                 struct event_context *ev,
     423                                struct tevent_context *ev,
    402424                                struct cli_state *cli,
    403425                                uint16_t fnum,
     
    406428NTSTATUS cli_unlock_recv(struct tevent_req *req);
    407429NTSTATUS cli_unlock(struct cli_state *cli, uint16_t fnum, uint32_t offset, uint32_t len);
    408 bool cli_lock64(struct cli_state *cli, uint16_t fnum,
    409                 uint64_t offset, uint64_t len, int timeout, enum brl_type lock_type);
     430NTSTATUS cli_lock64(struct cli_state *cli, uint16_t fnum,
     431                    uint64_t offset, uint64_t len, int timeout,
     432                    enum brl_type lock_type);
    410433struct tevent_req *cli_unlock64_send(TALLOC_CTX *mem_ctx,
    411                                 struct event_context *ev,
     434                                struct tevent_context *ev,
    412435                                struct cli_state *cli,
    413436                                uint16_t fnum,
     
    417440NTSTATUS cli_unlock64(struct cli_state *cli, uint16_t fnum, uint64_t offset, uint64_t len);
    418441struct tevent_req *cli_posix_lock_send(TALLOC_CTX *mem_ctx,
    419                                         struct event_context *ev,
     442                                        struct tevent_context *ev,
    420443                                        struct cli_state *cli,
    421444                                        uint16_t fnum,
     
    429452                        bool wait_lock, enum brl_type lock_type);
    430453struct tevent_req *cli_posix_unlock_send(TALLOC_CTX *mem_ctx,
    431                                         struct event_context *ev,
     454                                        struct tevent_context *ev,
    432455                                        struct cli_state *cli,
    433456                                        uint16_t fnum,
     
    437460NTSTATUS cli_posix_unlock(struct cli_state *cli, uint16_t fnum, uint64_t offset, uint64_t len);
    438461struct tevent_req *cli_getattrE_send(TALLOC_CTX *mem_ctx,
    439                                 struct event_context *ev,
     462                                struct tevent_context *ev,
    440463                                struct cli_state *cli,
    441464                                uint16_t fnum);
    442465NTSTATUS cli_getattrE_recv(struct tevent_req *req,
    443466                        uint16_t *attr,
    444                         SMB_OFF_T *size,
     467                        off_t *size,
    445468                        time_t *change_time,
    446469                        time_t *access_time,
     
    449472                        uint16_t fnum,
    450473                        uint16_t *attr,
    451                         SMB_OFF_T *size,
     474                        off_t *size,
    452475                        time_t *change_time,
    453476                        time_t *access_time,
    454477                        time_t *write_time);
    455478struct tevent_req *cli_setattrE_send(TALLOC_CTX *mem_ctx,
    456                                 struct event_context *ev,
     479                                struct tevent_context *ev,
    457480                                struct cli_state *cli,
    458481                                uint16_t fnum,
     
    467490                        time_t write_time);
    468491struct tevent_req *cli_getatr_send(TALLOC_CTX *mem_ctx,
    469                                 struct event_context *ev,
     492                                struct tevent_context *ev,
    470493                                struct cli_state *cli,
    471494                                const char *fname);
    472495NTSTATUS cli_getatr_recv(struct tevent_req *req,
    473496                                uint16_t *attr,
    474                                 SMB_OFF_T *size,
     497                                off_t *size,
    475498                                time_t *write_time);
    476499NTSTATUS cli_getatr(struct cli_state *cli,
    477500                        const char *fname,
    478501                        uint16_t *attr,
    479                         SMB_OFF_T *size,
     502                        off_t *size,
    480503                        time_t *write_time);
    481504struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx,
    482                                 struct event_context *ev,
     505                                struct tevent_context *ev,
    483506                                struct cli_state *cli,
    484507                                const char *fname,
     
    491514                time_t mtime);
    492515struct tevent_req *cli_chkpath_send(TALLOC_CTX *mem_ctx,
    493                                   struct event_context *ev,
     516                                  struct tevent_context *ev,
    494517                                  struct cli_state *cli,
    495518                                  const char *fname);
     
    497520NTSTATUS cli_chkpath(struct cli_state *cli, const char *path);
    498521struct tevent_req *cli_dskattr_send(TALLOC_CTX *mem_ctx,
    499                                   struct event_context *ev,
     522                                  struct tevent_context *ev,
    500523                                  struct cli_state *cli);
    501524NTSTATUS cli_dskattr_recv(struct tevent_req *req, int *bsize, int *total,
    502525                          int *avail);
    503526NTSTATUS cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail);
     527NTSTATUS cli_disk_size(struct cli_state *cli, const char *path, uint64_t *bsize,
     528                       uint64_t *total, uint64_t *avail);
    504529struct tevent_req *cli_ctemp_send(TALLOC_CTX *mem_ctx,
    505                                 struct event_context *ev,
     530                                struct tevent_context *ev,
    506531                                struct cli_state *cli,
    507532                                const char *path);
     
    533558                struct ea_struct **pea_list);
    534559struct tevent_req *cli_posix_open_send(TALLOC_CTX *mem_ctx,
    535                                         struct event_context *ev,
     560                                        struct tevent_context *ev,
    536561                                        struct cli_state *cli,
    537562                                        const char *fname,
     
    542567                        int flags, mode_t mode, uint16_t *fnum);
    543568struct tevent_req *cli_posix_mkdir_send(TALLOC_CTX *mem_ctx,
    544                                         struct event_context *ev,
     569                                        struct tevent_context *ev,
    545570                                        struct cli_state *cli,
    546571                                        const char *fname,
     
    550575
    551576struct tevent_req *cli_posix_unlink_send(TALLOC_CTX *mem_ctx,
    552                                         struct event_context *ev,
     577                                        struct tevent_context *ev,
    553578                                        struct cli_state *cli,
    554579                                        const char *fname);
     
    557582
    558583struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX *mem_ctx,
    559                                         struct event_context *ev,
     584                                        struct tevent_context *ev,
    560585                                        struct cli_state *cli,
    561586                                        const char *fname);
     
    570595                         uint32_t *pnum_changes,
    571596                         struct notify_change **pchanges);
     597NTSTATUS cli_notify(struct cli_state *cli, uint16_t fnum, uint32_t buffer_size,
     598                    uint32_t completion_filter, bool recursive,
     599                    TALLOC_CTX *mem_ctx, uint32_t *pnum_changes,
     600                    struct notify_change **pchanges);
     601
     602struct tevent_req *cli_nttrans_create_send(TALLOC_CTX *mem_ctx,
     603                                           struct tevent_context *ev,
     604                                           struct cli_state *cli,
     605                                           const char *fname,
     606                                           uint32_t CreatFlags,
     607                                           uint32_t DesiredAccess,
     608                                           uint32_t FileAttributes,
     609                                           uint32_t ShareAccess,
     610                                           uint32_t CreateDisposition,
     611                                           uint32_t CreateOptions,
     612                                           uint8_t SecurityFlags,
     613                                           struct security_descriptor *secdesc,
     614                                           struct ea_struct *eas,
     615                                           int num_eas);
     616NTSTATUS cli_nttrans_create_recv(struct tevent_req *req,
     617                        uint16_t *fnum,
     618                        struct smb_create_returns *cr);
     619NTSTATUS cli_nttrans_create(struct cli_state *cli,
     620                            const char *fname,
     621                            uint32_t CreatFlags,
     622                            uint32_t DesiredAccess,
     623                            uint32_t FileAttributes,
     624                            uint32_t ShareAccess,
     625                            uint32_t CreateDisposition,
     626                            uint32_t CreateOptions,
     627                            uint8_t SecurityFlags,
     628                            struct security_descriptor *secdesc,
     629                            struct ea_struct *eas,
     630                            int num_eas,
     631                            uint16_t *pfid,
     632                            struct smb_create_returns *cr);
    572633
    573634/* The following definitions come from libsmb/clifsinfo.c  */
     
    580641                                          uint32_t *pcaplow,
    581642                                          uint32_t *pcaphigh);
    582 NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor,
    583                                      uint16 *pminor, uint32 *pcaplow,
    584                                      uint32 *pcaphigh);
     643NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16_t *pmajor,
     644                                     uint16_t *pminor, uint32_t *pcaplow,
     645                                     uint32_t *pcaphigh);
    585646struct tevent_req *cli_set_unix_extensions_capabilities_send(
    586647        TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli,
     
    588649NTSTATUS cli_set_unix_extensions_capabilities_recv(struct tevent_req *req);
    589650NTSTATUS cli_set_unix_extensions_capabilities(struct cli_state *cli,
    590                                               uint16 major, uint16 minor,
    591                                               uint32 caplow, uint32 caphigh);
     651                                              uint16_t major, uint16_t minor,
     652                                              uint32_t caplow, uint32_t caphigh);
    592653struct tevent_req *cli_get_fs_attr_info_send(TALLOC_CTX *mem_ctx,
    593654                                             struct tevent_context *ev,
     
    595656NTSTATUS cli_get_fs_attr_info_recv(struct tevent_req *req, uint32_t *fs_attr);
    596657NTSTATUS cli_get_fs_attr_info(struct cli_state *cli, uint32_t *fs_attr);
    597 NTSTATUS cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name,
    598                                 uint32 *pserial_number, time_t *pdate);
     658NTSTATUS cli_get_fs_volume_info(struct cli_state *cli,
     659                                TALLOC_CTX *mem_ctx, char **volume_name,
     660                                uint32_t *pserial_number, time_t *pdate);
    599661NTSTATUS cli_get_fs_full_size_info(struct cli_state *cli,
    600662                                   uint64_t *total_allocation_units,
     
    604666                                   uint64_t *bytes_per_sector);
    605667NTSTATUS cli_get_posix_fs_info(struct cli_state *cli,
    606                                uint32 *optimal_transfer_size,
    607                                uint32 *block_size,
     668                               uint32_t *optimal_transfer_size,
     669                               uint32_t *block_size,
    608670                               uint64_t *total_blocks,
    609671                               uint64_t *blocks_available,
     
    624686/* The following definitions come from libsmb/clilist.c  */
    625687
    626 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
     688NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint16_t attribute,
    627689                      NTSTATUS (*fn)(const char *, struct file_info *,
    628690                                 const char *, void *), void *state);
     
    640702NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
    641703                       struct file_info **finfo, size_t *num_finfo);
    642 NTSTATUS cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
     704NTSTATUS cli_list(struct cli_state *cli,const char *Mask,uint16_t attribute,
    643705                  NTSTATUS (*fn)(const char *, struct file_info *, const char *,
    644706                             void *), void *state);
     
    657719/* The following definitions come from libsmb/clioplock.c  */
    658720
     721struct tevent_req *cli_smb_oplock_break_waiter_send(TALLOC_CTX *mem_ctx,
     722                                                    struct tevent_context *ev,
     723                                                    struct cli_state *cli);
     724NTSTATUS cli_smb_oplock_break_waiter_recv(struct tevent_req *req,
     725                                          uint16_t *pfnum,
     726                                          uint8_t *plevel);
     727
    659728struct tevent_req *cli_oplock_ack_send(TALLOC_CTX *mem_ctx,
    660729                                       struct tevent_context *ev,
     
    662731                                       uint16_t fnum, uint8_t level);
    663732NTSTATUS cli_oplock_ack_recv(struct tevent_req *req);
    664 NTSTATUS cli_oplock_ack(struct cli_state *cli, uint16_t fnum, unsigned char level);
    665 void cli_oplock_handler(struct cli_state *cli,
    666                         NTSTATUS (*handler)(struct cli_state *, uint16_t, unsigned char));
    667733
    668734/* The following definitions come from libsmb/cliprint.c  */
     
    690756
    691757struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
    692                                         struct event_context *ev,
     758                                        struct tevent_context *ev,
    693759                                        struct cli_state *cli, uint16_t fnum,
    694760                                        off_t offset, size_t size,
    695761                                        struct tevent_req **psmbreq);
    696762struct tevent_req *cli_read_andx_send(TALLOC_CTX *mem_ctx,
    697                                       struct event_context *ev,
     763                                      struct tevent_context *ev,
    698764                                      struct cli_state *cli, uint16_t fnum,
    699765                                      off_t offset, size_t size);
     
    701767                            uint8_t **rcvbuf);
    702768struct tevent_req *cli_pull_send(TALLOC_CTX *mem_ctx,
    703                                  struct event_context *ev,
     769                                 struct tevent_context *ev,
    704770                                 struct cli_state *cli,
    705771                                 uint16_t fnum, off_t start_offset,
    706                                  SMB_OFF_T size, size_t window_size,
     772                                 off_t size, size_t window_size,
    707773                                 NTSTATUS (*sink)(char *buf, size_t n,
    708774                                                  void *priv),
    709775                                 void *priv);
    710 NTSTATUS cli_pull_recv(struct tevent_req *req, SMB_OFF_T *received);
     776NTSTATUS cli_pull_recv(struct tevent_req *req, off_t *received);
    711777NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
    712                   off_t start_offset, SMB_OFF_T size, size_t window_size,
     778                  off_t start_offset, off_t size, size_t window_size,
    713779                  NTSTATUS (*sink)(char *buf, size_t n, void *priv),
    714                   void *priv, SMB_OFF_T *received);
    715 ssize_t cli_read(struct cli_state *cli, uint16_t fnum, char *buf,
    716                  off_t offset, size_t size);
     780                  void *priv, off_t *received);
     781NTSTATUS cli_read(struct cli_state *cli, uint16_t fnum,
     782                  char *buf, off_t offset, size_t size,
     783                  size_t *nread);
    717784NTSTATUS cli_smbwrite(struct cli_state *cli, uint16_t fnum, char *buf,
    718785                      off_t offset, size_t size1, size_t *ptotal);
    719786struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx,
    720                                          struct event_context *ev,
     787                                         struct tevent_context *ev,
    721788                                         struct cli_state *cli, uint16_t fnum,
    722789                                         uint16_t mode, const uint8_t *buf,
     
    726793                                         struct tevent_req **psmbreq);
    727794struct tevent_req *cli_write_andx_send(TALLOC_CTX *mem_ctx,
    728                                        struct event_context *ev,
     795                                       struct tevent_context *ev,
    729796                                       struct cli_state *cli, uint16_t fnum,
    730797                                       uint16_t mode, const uint8_t *buf,
     
    736803                      size_t *pwritten);
    737804
    738 struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
     805struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
    739806                                 struct cli_state *cli,
    740807                                 uint16_t fnum, uint16_t mode,
     
    749816                  void *priv);
    750817
     818NTSTATUS cli_splice(struct cli_state *srccli, struct cli_state *dstcli,
     819                    uint16_t src_fnum, uint16_t dst_fnum,
     820                    off_t size,
     821                    off_t src_offset, off_t dst_offset,
     822                    off_t *written,
     823                    int (*splice_cb)(off_t n, void *priv), void *priv);
     824
    751825/* The following definitions come from libsmb/clisecdesc.c  */
    752826
    753 struct security_descriptor *cli_query_secdesc(struct cli_state *cli, uint16_t fnum,
    754                             TALLOC_CTX *mem_ctx);
     827NTSTATUS cli_query_security_descriptor(struct cli_state *cli,
     828                                       uint16_t fnum,
     829                                       uint32_t sec_info,
     830                                       TALLOC_CTX *mem_ctx,
     831                                       struct security_descriptor **sd);
     832NTSTATUS cli_query_secdesc(struct cli_state *cli, uint16_t fnum,
     833                          TALLOC_CTX *mem_ctx, struct security_descriptor **sd);
     834NTSTATUS cli_set_security_descriptor(struct cli_state *cli,
     835                                     uint16_t fnum,
     836                                     uint32_t sec_info,
     837                                     const struct security_descriptor *sd);
    755838NTSTATUS cli_set_secdesc(struct cli_state *cli, uint16_t fnum,
    756                          struct security_descriptor *sd);
     839                         const struct security_descriptor *sd);
    757840
    758841/* The following definitions come from libsmb/clistr.c  */
    759842
    760 size_t clistr_push_fn(const char *function,
    761                         unsigned int line,
    762                         struct cli_state *cli,
    763                         void *dest,
    764                         const char *src,
    765                         int dest_len,
    766                         int flags);
    767 size_t clistr_pull_fn(const char *function,
    768                         unsigned int line,
    769                         const char *inbuf,
    770                         char *dest,
    771                         const void *src,
    772                         int dest_len,
    773                         int src_len,
    774                         int flags);
    775 size_t clistr_pull_talloc_fn(const char *function,
    776                                 unsigned int line,
    777                                 TALLOC_CTX *ctx,
    778                                 const char *base,
    779                                 uint16_t flags2,
    780                                 char **pp_dest,
    781                                 const void *src,
    782                                 int src_len,
    783                                 int flags);
    784 size_t clistr_align_out(struct cli_state *cli, const void *p, int flags);
     843size_t clistr_pull_talloc(TALLOC_CTX *ctx,
     844                          const char *base,
     845                          uint16_t flags2,
     846                          char **pp_dest,
     847                          const void *src,
     848                          int src_len,
     849                          int flags);
    785850
    786851/* The following definitions come from libsmb/clitrans.c  */
    787852
    788853struct tevent_req *cli_trans_send(
    789         TALLOC_CTX *mem_ctx, struct event_context *ev,
     854        TALLOC_CTX *mem_ctx, struct tevent_context *ev,
    790855        struct cli_state *cli, uint8_t cmd,
    791856        const char *pipe_name, uint16_t fid, uint16_t function, int flags,
     
    813878                   uint8_t **rdata, uint32_t min_rdata, uint32_t *num_rdata);
    814879
    815 /* The following definitions come from libsmb/smb_seal.c  */
    816 
    817 NTSTATUS get_enc_ctx_num(const uint8_t *buf, uint16 *p_enc_ctx_num);
    818 bool common_encryption_on(struct smb_trans_enc_state *es);
    819 NTSTATUS common_ntlm_decrypt_buffer(struct ntlmssp_state *ntlmssp_state, char *buf);
    820 NTSTATUS common_ntlm_encrypt_buffer(struct ntlmssp_state *ntlmssp_state,
    821                                 uint16 enc_ctx_num,
    822                                 char *buf,
    823                                 char **ppbuf_out);
    824 NTSTATUS common_encrypt_buffer(struct smb_trans_enc_state *es, char *buffer, char **buf_out);
    825 NTSTATUS common_decrypt_buffer(struct smb_trans_enc_state *es, char *buf);
    826 void common_free_encryption_state(struct smb_trans_enc_state **pp_es);
    827 void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf);
    828 bool cli_encryption_on(struct cli_state *cli);
    829 void cli_free_encryption_context(struct cli_state *cli);
    830 void cli_free_enc_buffer(struct cli_state *cli, char *buf);
    831 NTSTATUS cli_decrypt_message(struct cli_state *cli);
    832 NTSTATUS cli_encrypt_message(struct cli_state *cli, char *buf, char **buf_out);
    833 
    834 /* The following definitions come from libsmb/clisigning.c  */
    835 
    836 bool cli_simple_set_signing(struct cli_state *cli,
    837                             const DATA_BLOB user_session_key,
    838                             const DATA_BLOB response);
    839 bool cli_temp_set_signing(struct cli_state *cli);
    840 void cli_calculate_sign_mac(struct cli_state *cli, char *buf, uint32_t *seqnum);
    841 bool cli_check_sign_mac(struct cli_state *cli, const char *buf, uint32_t seqnum);
    842 bool client_is_signing_on(struct cli_state *cli);
    843 bool client_is_signing_allowed(struct cli_state *cli);
    844 bool client_is_signing_mandatory(struct cli_state *cli);
    845 void cli_set_signing_negotiated(struct cli_state *cli);
     880/* The following definitions come from libsmb/reparse_symlink.c  */
     881
     882bool symlink_reparse_buffer_marshall(
     883        const char *substitute, const char *printname, uint32_t flags,
     884        TALLOC_CTX *mem_ctx, uint8_t **pdst, size_t *pdstlen);
     885bool symlink_reparse_buffer_parse(
     886        const uint8_t *src, size_t srclen, TALLOC_CTX *mem_ctx,
     887        char **psubstitute_name, char **pprint_name, uint32_t *pflags);
     888
     889/* The following definitions come from libsmb/clisymlink.c  */
     890
     891struct tevent_req *cli_symlink_send(TALLOC_CTX *mem_ctx,
     892                                    struct tevent_context *ev,
     893                                    struct cli_state *cli,
     894                                    const char *oldpath,
     895                                    const char *newpath,
     896                                    uint32_t flags);
     897NTSTATUS cli_symlink_recv(struct tevent_req *req);
     898NTSTATUS cli_symlink(struct cli_state *cli, const char *oldname,
     899                     const char *newname, uint32_t flags);
     900
     901struct tevent_req *cli_readlink_send(TALLOC_CTX *mem_ctx,
     902                                     struct tevent_context *ev,
     903                                     struct cli_state *cli,
     904                                     const char *fname);
     905NTSTATUS cli_readlink_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
     906                           char **psubstitute_name, char **pprint_name,
     907                           uint32_t *pflags);
     908NTSTATUS cli_readlink(struct cli_state *cli, const char *fname,
     909                       TALLOC_CTX *mem_ctx, char **psubstitute_name,
     910                      char **pprint_name, uint32_t *pflags);
    846911
    847912#endif /* _LIBSMB_PROTO_H_ */
Note: See TracChangeset for help on using the changeset viewer.