libcli/smb: move smb2cli_write.c from source3 to the toplevel
[Samba/gebeck_regimport.git] / source3 / libsmb / smb2cli.h
blob2b3b7fe25dfc84f1049c66c0aaf09b75d56d1e90
1 /*
2 Unix SMB/CIFS implementation.
3 smb2 client routines
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/>.
20 #ifndef __SMB2CLI_H__
21 #define __SMB2CLI_H__
23 struct smbXcli_conn;
24 struct smbXcli_session;
25 struct cli_state;
27 struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
28 struct tevent_context *ev,
29 struct cli_state *cli,
30 const char *share);
31 NTSTATUS smb2cli_tcon_recv(struct tevent_req *req);
32 NTSTATUS smb2cli_tcon(struct cli_state *cli, const char *share);
34 struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
35 struct tevent_context *ev,
36 struct cli_state *cli);
37 NTSTATUS smb2cli_tdis_recv(struct tevent_req *req);
38 NTSTATUS smb2cli_tdis(struct cli_state *cli);
40 struct tevent_req *smb2cli_flush_send(TALLOC_CTX *mem_ctx,
41 struct tevent_context *ev,
42 struct smbXcli_conn *conn,
43 uint32_t timeout_msec,
44 struct smbXcli_session *session,
45 uint32_t tcon_id,
46 uint64_t fid_persistent,
47 uint64_t fid_volatile);
48 NTSTATUS smb2cli_flush_recv(struct tevent_req *req);
49 NTSTATUS smb2cli_flush(struct smbXcli_conn *conn,
50 uint32_t timeout_msec,
51 struct smbXcli_session *session,
52 uint32_t tcon_id,
53 uint64_t fid_persistent,
54 uint64_t fid_volatile);
56 struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
57 struct tevent_context *ev,
58 struct smbXcli_conn *conn,
59 uint32_t timeout_msec,
60 struct smbXcli_session *session,
61 uint32_t tcon_id,
62 uint8_t level,
63 uint8_t flags,
64 uint32_t file_index,
65 uint64_t fid_persistent,
66 uint64_t fid_volatile,
67 const char *mask,
68 uint32_t outbuf_len);
69 NTSTATUS smb2cli_query_directory_recv(struct tevent_req *req,
70 TALLOC_CTX *mem_ctx,
71 uint8_t **data,
72 uint32_t *data_length);
73 NTSTATUS smb2cli_query_directory(struct smbXcli_conn *conn,
74 uint32_t timeout_msec,
75 struct smbXcli_session *session,
76 uint32_t tcon_id,
77 uint8_t level,
78 uint8_t flags,
79 uint32_t file_index,
80 uint64_t fid_persistent,
81 uint64_t fid_volatile,
82 const char *mask,
83 uint32_t outbuf_len,
84 TALLOC_CTX *mem_ctx,
85 uint8_t **data,
86 uint32_t *data_length);
88 struct tevent_req *smb2cli_ioctl_send(TALLOC_CTX *mem_ctx,
89 struct tevent_context *ev,
90 struct smbXcli_conn *conn,
91 uint32_t timeout_msec,
92 struct smbXcli_session *session,
93 uint32_t tcon_id,
94 uint64_t in_fid_persistent,
95 uint64_t in_fid_volatile,
96 uint32_t in_ctl_code,
97 uint32_t in_max_input_length,
98 const DATA_BLOB *in_input_buffer,
99 uint32_t in_max_output_length,
100 const DATA_BLOB *in_output_buffer,
101 uint32_t in_flags);
102 NTSTATUS smb2cli_ioctl_recv(struct tevent_req *req,
103 TALLOC_CTX *mem_ctx,
104 DATA_BLOB *out_input_buffer,
105 DATA_BLOB *out_output_buffer);
106 NTSTATUS smb2cli_ioctl(struct smbXcli_conn *conn,
107 uint32_t timeout_msec,
108 struct smbXcli_session *session,
109 uint32_t tcon_id,
110 uint64_t in_fid_persistent,
111 uint64_t in_fid_volatile,
112 uint32_t in_ctl_code,
113 uint32_t in_max_input_length,
114 const DATA_BLOB *in_input_buffer,
115 uint32_t in_max_output_length,
116 const DATA_BLOB *in_output_buffer,
117 uint32_t in_flags,
118 TALLOC_CTX *mem_ctx,
119 DATA_BLOB *out_input_buffer,
120 DATA_BLOB *out_output_buffer);
122 struct tevent_req *smb2cli_query_info_send(TALLOC_CTX *mem_ctx,
123 struct tevent_context *ev,
124 struct smbXcli_conn *conn,
125 uint32_t timeout_msec,
126 struct smbXcli_session *session,
127 uint32_t tcon_id,
128 uint8_t in_info_type,
129 uint8_t in_file_info_class,
130 uint32_t in_max_output_length,
131 const DATA_BLOB *in_input_buffer,
132 uint32_t in_additional_info,
133 uint32_t in_flags,
134 uint64_t in_fid_persistent,
135 uint64_t in_fid_volatile);
136 NTSTATUS smb2cli_query_info_recv(struct tevent_req *req,
137 TALLOC_CTX *mem_ctx,
138 DATA_BLOB *out_output_buffer);
139 NTSTATUS smb2cli_query_info(struct smbXcli_conn *conn,
140 uint32_t timeout_msec,
141 struct smbXcli_session *session,
142 uint32_t tcon_id,
143 uint8_t in_info_type,
144 uint8_t in_file_info_class,
145 uint32_t in_max_output_length,
146 const DATA_BLOB *in_input_buffer,
147 uint32_t in_additional_info,
148 uint32_t in_flags,
149 uint64_t in_fid_persistent,
150 uint64_t in_fid_volatile,
151 TALLOC_CTX *mem_ctx,
152 DATA_BLOB *out_output_buffer);
154 struct tevent_req *smb2cli_set_info_send(TALLOC_CTX *mem_ctx,
155 struct tevent_context *ev,
156 struct smbXcli_conn *conn,
157 uint32_t timeout_msec,
158 struct smbXcli_session *session,
159 uint32_t tcon_id,
160 uint8_t in_info_type,
161 uint8_t in_file_info_class,
162 const DATA_BLOB *in_input_buffer,
163 uint32_t in_additional_info,
164 uint64_t in_fid_persistent,
165 uint64_t in_fid_volatile);
166 NTSTATUS smb2cli_set_info_recv(struct tevent_req *req);
167 NTSTATUS smb2cli_set_info(struct smbXcli_conn *conn,
168 uint32_t timeout_msec,
169 struct smbXcli_session *session,
170 uint32_t tcon_id,
171 uint8_t in_info_type,
172 uint8_t in_file_info_class,
173 const DATA_BLOB *in_input_buffer,
174 uint32_t in_additional_info,
175 uint64_t in_fid_persistent,
176 uint64_t in_fid_volatile);
178 #endif /* __SMB2CLI_H__ */