2 Samba Unix/Linux SMB client library
3 More client RAP (SMB Remote Procedure Calls) functions
4 Copyright (C) 2001 Steve French (sfrench@us.ibm.com)
5 Copyright (C) 2001 Jim McDonough (jmcd@us.ibm.com)
6 Copyright (C) 2007 Jeremy Allison. jra@samba.org
7 Copyright (C) Andrew Tridgell 1994-1998
8 Copyright (C) Gerald (Jerry) Carter 2004
9 Copyright (C) James Peach 2007
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef _LIBSMB_CLIRAP_H
26 #define _LIBSMB_CLIRAP_H
30 /* The following definitions come from libsmb/clirap.c */
32 NTSTATUS
cli_RNetShareEnum(
33 struct cli_state
*cli
,
34 void (*fn
)(const char *, uint32_t, const char *, void *),
36 NTSTATUS
cli_NetServerEnum(
37 struct cli_state
*cli
,
40 void (*fn
)(const char *, uint32_t, const char *, void *),
42 NTSTATUS
cli_oem_change_password(struct cli_state
*cli
,
44 const char *new_password
,
45 const char *old_password
);
46 NTSTATUS
cli_setpathinfo_ext(struct cli_state
*cli
, const char *fname
,
47 struct timespec create_time
,
48 struct timespec access_time
,
49 struct timespec write_time
,
50 struct timespec change_time
,
52 struct tevent_req
*cli_setfileinfo_ext_send(
54 struct tevent_context
*ev
,
55 struct cli_state
*cli
,
57 struct timespec create_time
,
58 struct timespec access_time
,
59 struct timespec write_time
,
60 struct timespec change_time
,
62 NTSTATUS
cli_setfileinfo_ext_recv(struct tevent_req
*req
);
63 NTSTATUS
cli_setfileinfo_ext(
64 struct cli_state
*cli
,
66 struct timespec create_time
,
67 struct timespec access_time
,
68 struct timespec write_time
,
69 struct timespec change_time
,
71 struct tevent_req
*cli_qpathinfo2_send(TALLOC_CTX
*mem_ctx
,
72 struct tevent_context
*ev
,
73 struct cli_state
*cli
,
75 NTSTATUS
cli_qpathinfo2_recv(struct tevent_req
*req
,
76 struct timespec
*create_time
,
77 struct timespec
*access_time
,
78 struct timespec
*write_time
,
79 struct timespec
*change_time
,
84 NTSTATUS
cli_qpathinfo2(struct cli_state
*cli
,
86 struct timespec
*create_time
,
87 struct timespec
*access_time
,
88 struct timespec
*write_time
,
89 struct timespec
*change_time
,
94 NTSTATUS
cli_qpathinfo3(struct cli_state
*cli
, const char *fname
,
95 struct timespec
*create_time
,
96 struct timespec
*access_time
,
97 struct timespec
*write_time
,
98 struct timespec
*change_time
,
99 off_t
*size
, uint32_t *pattr
,
101 struct tevent_req
*cli_qpathinfo_streams_send(TALLOC_CTX
*mem_ctx
,
102 struct tevent_context
*ev
,
103 struct cli_state
*cli
,
105 NTSTATUS
cli_qpathinfo_streams_recv(struct tevent_req
*req
,
107 unsigned int *pnum_streams
,
108 struct stream_struct
**pstreams
);
109 NTSTATUS
cli_qpathinfo_streams(struct cli_state
*cli
, const char *fname
,
111 unsigned int *pnum_streams
,
112 struct stream_struct
**pstreams
);
113 bool parse_streams_blob(TALLOC_CTX
*mem_ctx
, const uint8_t *rdata
,
115 unsigned int *pnum_streams
,
116 struct stream_struct
**pstreams
);
117 struct tevent_req
*cli_qfileinfo_basic_send(
119 struct tevent_context
*ev
,
120 struct cli_state
*cli
,
122 NTSTATUS
cli_qfileinfo_basic_recv(
123 struct tevent_req
*req
,
126 struct timespec
*create_time
,
127 struct timespec
*access_time
,
128 struct timespec
*write_time
,
129 struct timespec
*change_time
,
131 NTSTATUS
cli_qfileinfo_basic(
132 struct cli_state
*cli
,
136 struct timespec
*create_time
,
137 struct timespec
*access_time
,
138 struct timespec
*write_time
,
139 struct timespec
*change_time
,
141 struct tevent_req
*cli_qpathinfo_basic_send(TALLOC_CTX
*mem_ctx
,
142 struct tevent_context
*ev
,
143 struct cli_state
*cli
,
145 NTSTATUS
cli_qpathinfo_basic_recv(struct tevent_req
*req
,
146 SMB_STRUCT_STAT
*sbuf
, uint32_t *attributes
);
147 NTSTATUS
cli_qpathinfo_basic(struct cli_state
*cli
, const char *name
,
148 SMB_STRUCT_STAT
*sbuf
, uint32_t *attributes
);
149 NTSTATUS
cli_qpathinfo_alt_name(struct cli_state
*cli
, const char *fname
, fstring alt_name
);
150 struct tevent_req
*cli_qpathinfo_send(TALLOC_CTX
*mem_ctx
,
151 struct tevent_context
*ev
,
152 struct cli_state
*cli
, const char *fname
,
153 uint16_t level
, uint32_t min_rdata
,
155 NTSTATUS
cli_qpathinfo_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
156 uint8_t **rdata
, uint32_t *num_rdata
);
157 NTSTATUS
cli_qpathinfo(TALLOC_CTX
*mem_ctx
, struct cli_state
*cli
,
158 const char *fname
, uint16_t level
, uint32_t min_rdata
,
160 uint8_t **rdata
, uint32_t *num_rdata
);
162 struct tevent_req
*cli_qfileinfo_send(TALLOC_CTX
*mem_ctx
,
163 struct tevent_context
*ev
,
164 struct cli_state
*cli
,
169 NTSTATUS
cli_qfileinfo_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
170 uint16_t *recv_flags2
,
171 uint8_t **rdata
, uint32_t *num_rdata
);
172 NTSTATUS
cli_qfileinfo(TALLOC_CTX
*mem_ctx
,
173 struct cli_state
*cli
,
178 uint16_t *recv_flags2
,
180 uint32_t *num_rdata
);
182 struct tevent_req
*cli_flush_send(TALLOC_CTX
*mem_ctx
,
183 struct tevent_context
*ev
,
184 struct cli_state
*cli
,
186 NTSTATUS
cli_flush_recv(struct tevent_req
*req
);
187 NTSTATUS
cli_flush(TALLOC_CTX
*mem_ctx
, struct cli_state
*cli
, uint16_t fnum
);
189 struct tevent_req
*cli_shadow_copy_data_send(TALLOC_CTX
*mem_ctx
,
190 struct tevent_context
*ev
,
191 struct cli_state
*cli
,
194 NTSTATUS
cli_shadow_copy_data_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
195 char ***pnames
, int *pnum_names
);
196 NTSTATUS
cli_shadow_copy_data(TALLOC_CTX
*mem_ctx
, struct cli_state
*cli
,
197 uint16_t fnum
, bool get_names
,
198 char ***pnames
, int *pnum_names
);
200 struct tevent_req
*cli_fsctl_send(
202 struct tevent_context
*ev
,
203 struct cli_state
*cli
,
208 NTSTATUS
cli_fsctl_recv(
209 struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
, DATA_BLOB
*out
);
212 #endif /* _LIBSMB_CLIRAP_H */