2 Unix SMB/CIFS implementation.
4 Copyright (C) Volker Lendecke 2011
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/>.
24 struct smbXcli_session
;
27 struct tevent_req
*smb2cli_session_setup_send(TALLOC_CTX
*mem_ctx
,
28 struct tevent_context
*ev
,
29 struct smbXcli_conn
*conn
,
30 uint32_t timeout_msec
,
31 struct smbXcli_session
*session
,
33 uint32_t in_capabilities
,
35 struct smbXcli_session
*in_previous_session
,
36 const DATA_BLOB
*in_security_buffer
);
37 NTSTATUS
smb2cli_session_setup_recv(struct tevent_req
*req
,
39 struct iovec
**recv_iov
,
40 DATA_BLOB
*out_security_buffer
);
42 struct tevent_req
*smb2cli_logoff_send(TALLOC_CTX
*mem_ctx
,
43 struct tevent_context
*ev
,
44 struct cli_state
*cli
);
45 NTSTATUS
smb2cli_logoff_recv(struct tevent_req
*req
);
46 NTSTATUS
smb2cli_logoff(struct cli_state
*cli
);
48 struct tevent_req
*smb2cli_tcon_send(TALLOC_CTX
*mem_ctx
,
49 struct tevent_context
*ev
,
50 struct cli_state
*cli
,
52 NTSTATUS
smb2cli_tcon_recv(struct tevent_req
*req
);
53 NTSTATUS
smb2cli_tcon(struct cli_state
*cli
, const char *share
);
55 struct tevent_req
*smb2cli_tdis_send(TALLOC_CTX
*mem_ctx
,
56 struct tevent_context
*ev
,
57 struct cli_state
*cli
);
58 NTSTATUS
smb2cli_tdis_recv(struct tevent_req
*req
);
59 NTSTATUS
smb2cli_tdis(struct cli_state
*cli
);
61 struct tevent_req
*smb2cli_create_send(
63 struct tevent_context
*ev
,
64 struct cli_state
*cli
,
66 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
67 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
68 uint32_t desired_access
,
69 uint32_t file_attributes
,
70 uint32_t share_access
,
71 uint32_t create_disposition
,
72 uint32_t create_options
,
73 struct smb2_create_blobs
*blobs
);
74 NTSTATUS
smb2cli_create_recv(struct tevent_req
*req
,
75 uint64_t *fid_persistent
,
76 uint64_t *fid_volatile
);
77 NTSTATUS
smb2cli_create(struct cli_state
*cli
,
79 uint8_t oplock_level
, /* SMB2_OPLOCK_LEVEL_* */
80 uint32_t impersonation_level
, /* SMB2_IMPERSONATION_* */
81 uint32_t desired_access
,
82 uint32_t file_attributes
,
83 uint32_t share_access
,
84 uint32_t create_disposition
,
85 uint32_t create_options
,
86 struct smb2_create_blobs
*blobs
,
87 uint64_t *fid_persistent
,
88 uint64_t *fid_volatile
);
90 struct tevent_req
*smb2cli_close_send(TALLOC_CTX
*mem_ctx
,
91 struct tevent_context
*ev
,
92 struct cli_state
*cli
,
94 uint64_t fid_persistent
,
95 uint64_t fid_volatile
);
96 NTSTATUS
smb2cli_close_recv(struct tevent_req
*req
);
97 NTSTATUS
smb2cli_close(struct cli_state
*cli
, uint16_t flags
,
98 uint64_t fid_persistent
, uint64_t fid_volatile
);
100 struct tevent_req
*smb2cli_flush_send(TALLOC_CTX
*mem_ctx
,
101 struct tevent_context
*ev
,
102 struct cli_state
*cli
,
103 uint64_t fid_persistent
,
104 uint64_t fid_volatile
);
105 NTSTATUS
smb2cli_flush_recv(struct tevent_req
*req
);
106 NTSTATUS
smb2cli_flush(struct cli_state
*cli
,
107 uint64_t fid_persistent
,
108 uint64_t fid_volatile
);
110 struct tevent_req
*smb2cli_read_send(TALLOC_CTX
*mem_ctx
,
111 struct tevent_context
*ev
,
112 struct cli_state
*cli
,
115 uint64_t fid_persistent
,
116 uint64_t fid_volatile
,
117 uint64_t minimum_count
,
118 uint64_t remaining_bytes
);
119 NTSTATUS
smb2cli_read_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
120 uint8_t **data
, uint32_t *data_length
);
121 NTSTATUS
smb2cli_read(struct cli_state
*cli
,
124 uint64_t fid_persistent
,
125 uint64_t fid_volatile
,
126 uint64_t minimum_count
,
127 uint64_t remaining_bytes
,
130 uint32_t *data_length
);
132 struct tevent_req
*smb2cli_write_send(TALLOC_CTX
*mem_ctx
,
133 struct tevent_context
*ev
,
134 struct cli_state
*cli
,
137 uint64_t fid_persistent
,
138 uint64_t fid_volatile
,
139 uint32_t remaining_bytes
,
141 const uint8_t *data
);
142 NTSTATUS
smb2cli_write_recv(struct tevent_req
*req
);
143 NTSTATUS
smb2cli_write(struct cli_state
*cli
,
146 uint64_t fid_persistent
,
147 uint64_t fid_volatile
,
148 uint32_t remaining_bytes
,
150 const uint8_t *data
);
152 struct tevent_req
*smb2cli_query_directory_send(TALLOC_CTX
*mem_ctx
,
153 struct tevent_context
*ev
,
154 struct cli_state
*cli
,
158 uint64_t fid_persistent
,
159 uint64_t fid_volatile
,
161 uint32_t outbuf_len
);
162 NTSTATUS
smb2cli_query_directory_recv(struct tevent_req
*req
,
165 uint32_t *data_length
);
166 NTSTATUS
smb2cli_query_directory(struct cli_state
*cli
,
170 uint64_t fid_persistent
,
171 uint64_t fid_volatile
,
176 uint32_t *data_length
);
178 #endif /* __SMB2CLI_H__ */