ctdb-scripts: Move connection tracking to 10.interface
[samba4-gss.git] / source3 / libsmb / clirap.h
blobe66575a9c83852dd7a673a49fd3890070a03abc5
1 /*
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
28 struct cli_state;
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 *),
35 void *state);
36 NTSTATUS cli_NetServerEnum(
37 struct cli_state *cli,
38 char *workgroup,
39 uint32_t stype,
40 void (*fn)(const char *, uint32_t, const char *, void *),
41 void *state);
42 NTSTATUS cli_oem_change_password(struct cli_state *cli,
43 const char *user,
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,
51 uint32_t attr);
52 struct tevent_req *cli_setfileinfo_ext_send(
53 TALLOC_CTX *mem_ctx,
54 struct tevent_context *ev,
55 struct cli_state *cli,
56 uint16_t fnum,
57 struct timespec create_time,
58 struct timespec access_time,
59 struct timespec write_time,
60 struct timespec change_time,
61 uint32_t attr);
62 NTSTATUS cli_setfileinfo_ext_recv(struct tevent_req *req);
63 NTSTATUS cli_setfileinfo_ext(
64 struct cli_state *cli,
65 uint16_t fnum,
66 struct timespec create_time,
67 struct timespec access_time,
68 struct timespec write_time,
69 struct timespec change_time,
70 uint32_t attr);
71 struct tevent_req *cli_qpathinfo2_send(TALLOC_CTX *mem_ctx,
72 struct tevent_context *ev,
73 struct cli_state *cli,
74 const char *fname);
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,
80 off_t *size,
81 uint32_t *pattr,
82 SMB_INO_T *ino,
83 mode_t *mode);
84 NTSTATUS cli_qpathinfo2(struct cli_state *cli,
85 const char *fname,
86 struct timespec *create_time,
87 struct timespec *access_time,
88 struct timespec *write_time,
89 struct timespec *change_time,
90 off_t *size,
91 uint32_t *pattr,
92 SMB_INO_T *ino,
93 mode_t *mode);
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,
100 SMB_INO_T *ino);
101 struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx,
102 struct tevent_context *ev,
103 struct cli_state *cli,
104 const char *fname);
105 NTSTATUS cli_qpathinfo_streams_recv(struct tevent_req *req,
106 TALLOC_CTX *mem_ctx,
107 unsigned int *pnum_streams,
108 struct stream_struct **pstreams);
109 NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
110 TALLOC_CTX *mem_ctx,
111 unsigned int *pnum_streams,
112 struct stream_struct **pstreams);
113 bool parse_streams_blob(TALLOC_CTX *mem_ctx, const uint8_t *rdata,
114 size_t data_len,
115 unsigned int *pnum_streams,
116 struct stream_struct **pstreams);
117 struct tevent_req *cli_qfileinfo_basic_send(
118 TALLOC_CTX *mem_ctx,
119 struct tevent_context *ev,
120 struct cli_state *cli,
121 uint16_t fnum);
122 NTSTATUS cli_qfileinfo_basic_recv(
123 struct tevent_req *req,
124 uint32_t *attr,
125 off_t *size,
126 struct timespec *create_time,
127 struct timespec *access_time,
128 struct timespec *write_time,
129 struct timespec *change_time,
130 SMB_INO_T *ino);
131 NTSTATUS cli_qfileinfo_basic(
132 struct cli_state *cli,
133 uint16_t fnum,
134 uint32_t *attr,
135 off_t *size,
136 struct timespec *create_time,
137 struct timespec *access_time,
138 struct timespec *write_time,
139 struct timespec *change_time,
140 SMB_INO_T *ino);
141 struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
142 struct tevent_context *ev,
143 struct cli_state *cli,
144 const char *fname);
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,
154 uint32_t max_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,
159 uint32_t max_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,
165 uint16_t fnum,
166 uint16_t fscc_level,
167 uint32_t min_rdata,
168 uint32_t max_rdata);
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,
174 uint16_t fnum,
175 uint16_t fscc_level,
176 uint32_t min_rdata,
177 uint32_t max_rdata,
178 uint16_t *recv_flags2,
179 uint8_t **rdata,
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,
185 uint16_t fnum);
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,
192 uint16_t fnum,
193 bool get_names);
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(
201 TALLOC_CTX *mem_ctx,
202 struct tevent_context *ev,
203 struct cli_state *cli,
204 uint16_t fnum,
205 uint32_t ctl_code,
206 const DATA_BLOB *in,
207 uint32_t max_out);
208 NTSTATUS cli_fsctl_recv(
209 struct tevent_req *req, TALLOC_CTX *mem_ctx, DATA_BLOB *out);
212 #endif /* _LIBSMB_CLIRAP_H */