source: vendor/3.6.23/source3/libsmb/clirap.h

Last change on this file was 740, checked in by Silvan Scherrer, 13 years ago

Samba Server: update vendor to 3.6.0

File size: 10.2 KB
Line 
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
10
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.
15
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.
20
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/>.
23*/
24
25#ifndef _LIBSMB_CLIRAP_H
26#define _LIBSMB_CLIRAP_H
27
28struct cli_state;
29
30/* The following definitions come from libsmb/clirap.c */
31
32bool cli_api(struct cli_state *cli,
33 char *param, int prcnt, int mprcnt,
34 char *data, int drcnt, int mdrcnt,
35 char **rparam, unsigned int *rprcnt,
36 char **rdata, unsigned int *rdrcnt);
37bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation);
38int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state);
39bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
40 void (*fn)(const char *, uint32, const char *, void *),
41 void *state);
42bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
43 const char *old_password);
44struct tevent_req *cli_qpathinfo1_send(TALLOC_CTX *mem_ctx,
45 struct event_context *ev,
46 struct cli_state *cli,
47 const char *fname);
48NTSTATUS cli_qpathinfo1_recv(struct tevent_req *req,
49 time_t *change_time,
50 time_t *access_time,
51 time_t *write_time,
52 SMB_OFF_T *size,
53 uint16 *mode);
54NTSTATUS cli_qpathinfo1(struct cli_state *cli,
55 const char *fname,
56 time_t *change_time,
57 time_t *access_time,
58 time_t *write_time,
59 SMB_OFF_T *size,
60 uint16 *mode);
61NTSTATUS cli_setpathinfo_basic(struct cli_state *cli, const char *fname,
62 time_t create_time,
63 time_t access_time,
64 time_t write_time,
65 time_t change_time,
66 uint16 mode);
67struct tevent_req *cli_qpathinfo2_send(TALLOC_CTX *mem_ctx,
68 struct event_context *ev,
69 struct cli_state *cli,
70 const char *fname);
71NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
72 struct timespec *create_time,
73 struct timespec *access_time,
74 struct timespec *write_time,
75 struct timespec *change_time,
76 SMB_OFF_T *size, uint16 *mode,
77 SMB_INO_T *ino);
78NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
79 struct timespec *create_time,
80 struct timespec *access_time,
81 struct timespec *write_time,
82 struct timespec *change_time,
83 SMB_OFF_T *size, uint16 *mode,
84 SMB_INO_T *ino);
85struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx,
86 struct tevent_context *ev,
87 struct cli_state *cli,
88 const char *fname);
89NTSTATUS cli_qpathinfo_streams_recv(struct tevent_req *req,
90 TALLOC_CTX *mem_ctx,
91 unsigned int *pnum_streams,
92 struct stream_struct **pstreams);
93NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
94 TALLOC_CTX *mem_ctx,
95 unsigned int *pnum_streams,
96 struct stream_struct **pstreams);
97NTSTATUS cli_qfilename(struct cli_state *cli, uint16_t fnum, char *name,
98 size_t namelen);
99NTSTATUS cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
100 uint16 *mode, SMB_OFF_T *size,
101 struct timespec *create_time,
102 struct timespec *access_time,
103 struct timespec *write_time,
104 struct timespec *change_time,
105 SMB_INO_T *ino);
106struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
107 struct event_context *ev,
108 struct cli_state *cli,
109 const char *fname);
110NTSTATUS cli_qpathinfo_basic_recv(struct tevent_req *req,
111 SMB_STRUCT_STAT *sbuf, uint32 *attributes);
112NTSTATUS cli_qpathinfo_basic(struct cli_state *cli, const char *name,
113 SMB_STRUCT_STAT *sbuf, uint32 *attributes);
114NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
115struct tevent_req *cli_qpathinfo_send(TALLOC_CTX *mem_ctx,
116 struct tevent_context *ev,
117 struct cli_state *cli, const char *fname,
118 uint16_t level, uint32_t min_rdata,
119 uint32_t max_rdata);
120NTSTATUS cli_qpathinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
121 uint8_t **rdata, uint32_t *num_rdata);
122NTSTATUS cli_qpathinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
123 const char *fname, uint16_t level, uint32_t min_rdata,
124 uint32_t max_rdata,
125 uint8_t **rdata, uint32_t *num_rdata);
126
127struct tevent_req *cli_qfileinfo_send(TALLOC_CTX *mem_ctx,
128 struct tevent_context *ev,
129 struct cli_state *cli, uint16_t fnum,
130 uint16_t level, uint32_t min_rdata,
131 uint32_t max_rdata);
132NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
133 uint8_t **rdata, uint32_t *num_rdata);
134NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
135 uint16_t fnum, uint16_t level, uint32_t min_rdata,
136 uint32_t max_rdata,
137 uint8_t **rdata, uint32_t *num_rdata);
138
139struct tevent_req *cli_flush_send(TALLOC_CTX *mem_ctx,
140 struct event_context *ev,
141 struct cli_state *cli,
142 uint16_t fnum);
143NTSTATUS cli_flush_recv(struct tevent_req *req);
144NTSTATUS cli_flush(TALLOC_CTX *mem_ctx, struct cli_state *cli, uint16_t fnum);
145
146struct tevent_req *cli_shadow_copy_data_send(TALLOC_CTX *mem_ctx,
147 struct tevent_context *ev,
148 struct cli_state *cli,
149 uint16_t fnum,
150 bool get_names);
151NTSTATUS cli_shadow_copy_data_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
152 char ***pnames, int *pnum_names);
153NTSTATUS cli_shadow_copy_data(TALLOC_CTX *mem_ctx, struct cli_state *cli,
154 uint16_t fnum, bool get_names,
155 char ***pnames, int *pnum_names);
156
157/* The following definitions come from libsmb/clirap2.c */
158struct rap_group_info_1;
159struct rap_user_info_1;
160struct rap_share_info_2;
161
162int cli_NetGroupDelete(struct cli_state *cli, const char *group_name);
163int cli_NetGroupAdd(struct cli_state *cli, struct rap_group_info_1 *grinfo);
164int cli_RNetGroupEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
165int cli_RNetGroupEnum0(struct cli_state *cli,
166 void (*fn)(const char *, void *),
167 void *state);
168int cli_NetGroupDelUser(struct cli_state * cli, const char *group_name, const char *user_name);
169int cli_NetGroupAddUser(struct cli_state * cli, const char *group_name, const char *user_name);
170int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*fn)(const char *, void *), void *state );
171int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*fn)(const char *, void *), void *state );
172int cli_NetUserDelete(struct cli_state *cli, const char * user_name );
173int cli_NetUserAdd(struct cli_state *cli, struct rap_user_info_1 * userinfo );
174int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char *, const char *, const char *, void *), void *state);
175int cli_RNetUserEnum0(struct cli_state *cli,
176 void (*fn)(const char *, void *),
177 void *state);
178int cli_NetFileClose(struct cli_state *cli, uint32 file_id );
179int cli_NetFileGetInfo(struct cli_state *cli, uint32 file_id, void (*fn)(const char *, const char *, uint16, uint16, uint32));
180int cli_NetFileEnum(struct cli_state *cli, const char * user,
181 const char * base_path,
182 void (*fn)(const char *, const char *, uint16, uint16,
183 uint32));
184int cli_NetShareAdd(struct cli_state *cli, struct rap_share_info_2 * sinfo );
185int cli_NetShareDelete(struct cli_state *cli, const char * share_name );
186bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_name);
187bool cli_get_server_domain(struct cli_state *cli);
188bool cli_get_server_type(struct cli_state *cli, uint32 *pstype);
189bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
190 char **servername);
191bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype);
192bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char *workstation);
193int cli_NetPrintQEnum(struct cli_state *cli,
194 void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
195 void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,unsigned int,unsigned int,const char*));
196int cli_NetPrintQGetInfo(struct cli_state *cli, const char *printer,
197 void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
198 void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,unsigned int,unsigned int,const char*));
199int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
200int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, unsigned int, unsigned int, unsigned int, char *));
201int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation,
202 void (*fn)(const char *, const char *, uint16, uint16, uint16, unsigned int, unsigned int, unsigned int, const char *));
203int cli_NetSessionDel(struct cli_state *cli, const char *workstation);
204int cli_NetConnectionEnum(struct cli_state *cli, const char *qualifier,
205 void (*fn)(uint16_t conid, uint16_t contype,
206 uint16_t numopens, uint16_t numusers,
207 uint32_t contime, const char *username,
208 const char *netname));
209
210#endif /* _LIBSMB_CLIRAP_H */
Note: See TracBrowser for help on using the repository browser.