2 Unix SMB/CIFS implementation.
3 smb2 wrapper client routines
4 Copyright (C) Jeremy Allison 2013
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef __SMB2CLI_FNUM_H__
21 #define __SMB2CLI_FNUM_H__
24 struct smbXcli_session
;
28 NTSTATUS
cli_smb2_create_fnum(struct cli_state
*cli
,
30 uint32_t create_flags
,
31 uint32_t desired_access
,
32 uint32_t file_attributes
,
33 uint32_t share_access
,
34 uint32_t create_disposition
,
35 uint32_t create_options
,
37 struct smb2_create_returns
*cr
);
39 NTSTATUS
cli_smb2_close_fnum(struct cli_state
*cli
, uint16_t fnum
);
40 NTSTATUS
cli_smb2_mkdir(struct cli_state
*cli
, const char *dirname
);
41 NTSTATUS
cli_smb2_rmdir(struct cli_state
*cli
, const char *dirname
);
42 NTSTATUS
cli_smb2_unlink(struct cli_state
*cli
,const char *fname
);
43 NTSTATUS
cli_smb2_list(struct cli_state
*cli
,
45 NTSTATUS (*fn
)(const char *,
50 NTSTATUS
cli_smb2_qpathinfo_basic(struct cli_state
*cli
,
52 SMB_STRUCT_STAT
*sbuf
,
53 uint32_t *attributes
);
54 NTSTATUS
cli_smb2_qpathinfo_alt_name(struct cli_state
*cli
,
57 NTSTATUS
cli_smb2_qfileinfo_basic(struct cli_state
*cli
,
61 struct timespec
*create_time
,
62 struct timespec
*access_time
,
63 struct timespec
*write_time
,
64 struct timespec
*change_time
,
66 NTSTATUS
cli_smb2_getattrE(struct cli_state
*cli
,
73 NTSTATUS
cli_smb2_getatr(struct cli_state
*cli
,
78 NTSTATUS
cli_smb2_qpathinfo2(struct cli_state
*cli
,
80 struct timespec
*create_time
,
81 struct timespec
*access_time
,
82 struct timespec
*write_time
,
83 struct timespec
*change_time
,
87 NTSTATUS
cli_smb2_qpathinfo_streams(struct cli_state
*cli
,
90 unsigned int *pnum_streams
,
91 struct stream_struct
**pstreams
);
92 NTSTATUS
cli_smb2_setatr(struct cli_state
*cli
,
96 NTSTATUS
cli_smb2_setattrE(struct cli_state
*cli
,
101 NTSTATUS
cli_smb2_dskattr(struct cli_state
*cli
,
105 NTSTATUS
cli_smb2_query_security_descriptor(struct cli_state
*cli
,
109 struct security_descriptor
**ppsd
);
110 NTSTATUS
cli_smb2_set_security_descriptor(struct cli_state
*cli
,
113 const struct security_descriptor
*sd
);
114 NTSTATUS
cli_smb2_rename(struct cli_state
*cli
,
115 const char *fname_src
,
116 const char *fname_dst
);
117 NTSTATUS
cli_smb2_set_ea_fnum(struct cli_state
*cli
,
122 NTSTATUS
cli_smb2_get_ea_list_path(struct cli_state
*cli
,
126 struct ea_struct
**pea_list
);
127 NTSTATUS
cli_smb2_set_ea_path(struct cli_state
*cli
,
132 struct tevent_req
*cli_smb2_read_send(TALLOC_CTX
*mem_ctx
,
133 struct tevent_context
*ev
,
134 struct cli_state
*cli
,
138 NTSTATUS
cli_smb2_read_recv(struct tevent_req
*req
,
141 struct tevent_req
*cli_smb2_write_send(TALLOC_CTX
*mem_ctx
,
142 struct tevent_context
*ev
,
143 struct cli_state
*cli
,
149 NTSTATUS
cli_smb2_write_recv(struct tevent_req
*req
,
151 struct tevent_req
*cli_smb2_writeall_send(TALLOC_CTX
*mem_ctx
,
152 struct tevent_context
*ev
,
153 struct cli_state
*cli
,
159 NTSTATUS
cli_smb2_writeall_recv(struct tevent_req
*req
,
161 #endif /* __SMB2CLI_FNUM_H__ */