vfs_default: also call vfs_offload_token_ctx_init in vfswrap_offload_write_send
[samba.git] / source3 / libsmb / cli_smb2_fnum.h
index f3355b33ca31355bbddbe410674859a35b6638e2..abac569385ddedca21f7e10502b5549ee13484ce 100644 (file)
@@ -24,13 +24,19 @@ struct smbXcli_conn;
 struct smbXcli_session;
 struct cli_state;
 struct file_info;
+struct symlink_reparse_struct;
+
+struct cli_smb2_create_flags {
+       bool batch_oplock:1;
+       bool exclusive_oplock:1;
+};
 
 struct tevent_req *cli_smb2_create_fnum_send(
        TALLOC_CTX *mem_ctx,
        struct tevent_context *ev,
        struct cli_state *cli,
        const char *fname,
-       uint32_t create_flags,
+       struct cli_smb2_create_flags create_flags,
        uint32_t impersonation_level,
        uint32_t desired_access,
        uint32_t file_attributes,
@@ -43,11 +49,12 @@ NTSTATUS cli_smb2_create_fnum_recv(
        uint16_t *pfnum,
        struct smb_create_returns *cr,
        TALLOC_CTX *mem_ctx,
-       struct smb2_create_blobs *out_cblobs);
+       struct smb2_create_blobs *out_cblobs,
+       struct symlink_reparse_struct **symlink);
 NTSTATUS cli_smb2_create_fnum(
        struct cli_state *cli,
        const char *fname,
-       uint32_t create_flags,
+       struct cli_smb2_create_flags create_flags,
        uint32_t impersonation_level,
        uint32_t desired_access,
        uint32_t file_attributes,
@@ -63,7 +70,8 @@ NTSTATUS cli_smb2_create_fnum(
 struct tevent_req *cli_smb2_close_fnum_send(TALLOC_CTX *mem_ctx,
                                            struct tevent_context *ev,
                                            struct cli_state *cli,
-                                           uint16_t fnum);
+                                           uint16_t fnum,
+                                           uint16_t flags);
 NTSTATUS cli_smb2_close_fnum_recv(struct tevent_req *req);
 NTSTATUS cli_smb2_close_fnum(struct cli_state *cli, uint16_t fnum);
 struct tevent_req *cli_smb2_delete_on_close_send(TALLOC_CTX *mem_ctx,
@@ -97,7 +105,8 @@ struct tevent_req *cli_smb2_list_send(
        TALLOC_CTX *mem_ctx,
        struct tevent_context *ev,
        struct cli_state *cli,
-       const char *pathname);
+       const char *pathname,
+       unsigned int info_level);
 NTSTATUS cli_smb2_list_recv(
        struct tevent_req *req,
        TALLOC_CTX *mem_ctx,
@@ -106,9 +115,17 @@ NTSTATUS cli_smb2_qpathinfo_basic(struct cli_state *cli,
                        const char *name,
                        SMB_STRUCT_STAT *sbuf,
                        uint32_t *attributes);
-NTSTATUS cli_smb2_qpathinfo_alt_name(struct cli_state *cli,
-                       const char *name,
-                       fstring alt_name);
+struct tevent_req *cli_smb2_qpathinfo_send(TALLOC_CTX *mem_ctx,
+                                          struct tevent_context *ev,
+                                          struct cli_state *cli,
+                                          const char *fname,
+                                          uint16_t level,
+                                          uint32_t min_rdata,
+                                          uint32_t max_rdata);
+NTSTATUS cli_smb2_qpathinfo_recv(struct tevent_req *req,
+                                TALLOC_CTX *mem_ctx,
+                                uint8_t **rdata,
+                                uint32_t *num_rdata);
 struct tevent_req *cli_smb2_query_info_fnum_send(
        TALLOC_CTX *mem_ctx,
        struct tevent_context *ev,
@@ -150,25 +167,6 @@ NTSTATUS cli_smb2_query_info_fnum(
        uint32_t in_flags,
        TALLOC_CTX *mem_ctx,
        DATA_BLOB *outbuf);
-NTSTATUS cli_smb2_getatr(struct cli_state *cli,
-                       const char *name,
-                       uint32_t *pattr,
-                       off_t *size,
-                       time_t *write_time);
-NTSTATUS cli_smb2_qpathinfo2(struct cli_state *cli,
-                       const char *fname,
-                       struct timespec *create_time,
-                       struct timespec *access_time,
-                       struct timespec *write_time,
-                       struct timespec *change_time,
-                       off_t *size,
-                       uint32_t *pattr,
-                       SMB_INO_T *ino);
-NTSTATUS cli_smb2_qpathinfo_streams(struct cli_state *cli,
-                       const char *name,
-                       TALLOC_CTX *mem_ctx,
-                       unsigned int *pnum_streams,
-                       struct stream_struct **pstreams);
 NTSTATUS cli_smb2_setpathinfo(struct cli_state *cli,
                        const char *name,
                        uint8_t in_info_type,
@@ -311,21 +309,16 @@ NTSTATUS cli_smb2_notify(struct cli_state *cli, uint16_t fnum,
                         bool recursive, TALLOC_CTX *mem_ctx,
                         struct notify_change **pchanges,
                         uint32_t *pnum_changes);
-struct tevent_req *cli_smb2_set_reparse_point_fnum_send(
-                       TALLOC_CTX *mem_ctx,
-                       struct tevent_context *ev,
-                       struct cli_state *cli,
-                       uint16_t fnum,
-                       DATA_BLOB in_buf);
-NTSTATUS cli_smb2_set_reparse_point_fnum_recv(struct tevent_req *req);
 
-struct tevent_req *cli_smb2_get_reparse_point_fnum_send(
-                       TALLOC_CTX *mem_ctx,
-                       struct tevent_context *ev,
-                       struct cli_state *cli,
-                       uint16_t fnum);
-NTSTATUS cli_smb2_get_reparse_point_fnum_recv(struct tevent_req *req,
-                       TALLOC_CTX *mem_ctx,
-                       DATA_BLOB *output);
+struct tevent_req *cli_smb2_fsctl_send(
+       TALLOC_CTX *mem_ctx,
+       struct tevent_context *ev,
+       struct cli_state *cli,
+       uint16_t fnum,
+       uint32_t ctl_code,
+       const DATA_BLOB *in,
+       uint32_t max_out);
+NTSTATUS cli_smb2_fsctl_recv(
+       struct tevent_req *req, TALLOC_CTX *mem_ctx, DATA_BLOB *out);
 
 #endif /* __SMB2CLI_FNUM_H__ */