s3:net: remove useless net_prompt_pass() wrapper
[Samba.git] / source3 / utils / net_proto.h
blob1678affd30caddfbe1e4bab59effb5ddd0a6f43f
1 /*
2 * Unix SMB/CIFS implementation.
3 * collected prototypes header
5 * frozen from "make proto" in May 2008
7 * Copyright (C) Michael Adam 2008
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifndef _NET_PROTO_H_
24 #define _NET_PROTO_H_
26 #include "ads.h"
27 #include "libads/ads_status.h"
28 #include "librpc/gen_ndr/libnet_join.h"
30 /* The following definitions come from utils/net.c */
32 enum netr_SchannelType get_sec_channel_type(const char *param);
34 /* The following definitions come from utils/net_ads.c */
35 struct ads_struct;
36 ADS_STATUS ads_startup(struct net_context *c,
37 bool only_own_domain,
38 TALLOC_CTX *mem_ctx,
39 struct ads_struct **ads);
40 ADS_STATUS ads_startup_nobind(struct net_context *c,
41 bool only_own_domain,
42 TALLOC_CTX *mem_ctx,
43 struct ads_struct **ads);
44 int net_ads_check_our_domain(struct net_context *c);
45 int net_ads_check(struct net_context *c);
46 int net_ads_user(struct net_context *c, int argc, const char **argv);
47 int net_ads_group(struct net_context *c, int argc, const char **argv);
48 int net_ads_testjoin(struct net_context *c, int argc, const char **argv);
49 int net_ads_join(struct net_context *c, int argc, const char **argv);
50 int net_ads_printer_usage(struct net_context *c, int argc, const char **argv);
51 int net_ads_changetrustpw(struct net_context *c, int argc, const char **argv);
52 int net_ads_keytab(struct net_context *c, int argc, const char **argv);
53 int net_ads_kerberos(struct net_context *c, int argc, const char **argv);
54 int net_ads_setspn(struct net_context *c, int argc, const char **argv);
55 int net_ads(struct net_context *c, int argc, const char **argv);
57 /* The following definitions come from utils/net_ads_join_dns.c */
58 void use_in_memory_ccache(void);
59 NTSTATUS net_update_dns_ext(struct net_context *c,
60 TALLOC_CTX *mem_ctx,
61 ADS_STRUCT *ads,
62 struct cli_credentials *creds,
63 const char *hostname,
64 struct sockaddr_storage *iplist,
65 int num_addrs, bool remove_host);
66 void net_ads_join_dns_updates(struct net_context *c, TALLOC_CTX *ctx, struct libnet_JoinCtx *r);
68 /* The following definitions come from utils/net_ads_gpo.c */
70 int net_ads_gpo(struct net_context *c, int argc, const char **argv);
72 /* The following definitions come from utils/net_cache.c */
74 int net_cache(struct net_context *c, int argc, const char **argv);
76 /* The following definitions come from utils/net_conf.c */
78 int net_conf(struct net_context *c, int argc, const char **argv);
80 /* The following definitions come from utils/net_dns.c */
82 int get_my_ip_address( struct sockaddr_storage **pp_ss );
84 /* The following definitions come from utils/net_dom.c */
86 int net_dom_usage(struct net_context *c, int argc, const char **argv);
87 int net_dom(struct net_context *c, int argc, const char **argv);
89 /* The following definitions come from utils/net_file.c */
91 int net_file_usage(struct net_context *c, int argc, const char **argv);
92 int net_file(struct net_context *c, int argc, const char **argv);
94 /* The following definitions come from utils/net_group.c */
96 int net_group_usage(struct net_context *c, int argc, const char **argv);
97 int net_group(struct net_context *c, int argc, const char **argv);
99 /* The following definitions come from utils/net_groupmap.c */
101 int net_groupmap_usage(struct net_context *c, int argc, const char **argv);
102 int net_groupmap(struct net_context *c, int argc, const char **argv);
104 /* The following definitions come from utils/net_help.c */
106 int net_help(struct net_context *c, int argc, const char **argv);
108 /* The following definitions come from utils/net_idmap.c */
110 int net_idmap(struct net_context *c, int argc, const char **argv);
112 /* The following definitions come from utils/net_join.c */
114 int net_join_usage(struct net_context *c, int argc, const char **argv);
115 int net_join(struct net_context *c, int argc, const char **argv);
117 /* The following definitions come from source3/utils/net_offlinejoin.c */
119 int net_offlinejoin_usage(struct net_context *c, int argc, const char **argv);
120 int net_offlinejoin(struct net_context *c, int argc, const char **argv);
121 int net_offlinejoin_provision(struct net_context *c,
122 int argc, const char **argv);
123 int net_offlinejoin_requestodj(struct net_context *c,
124 int argc, const char **argv);
125 int net_offlinejoin_composeodj(struct net_context *c,
126 int argc, const char **argv);
128 /* The following definitions come from utils/net_lookup.c */
130 int net_lookup_usage(struct net_context *c, int argc, const char **argv);
131 int net_lookup(struct net_context *c, int argc, const char **argv);
133 /* The following definitions come from utils/net_rap.c */
135 int net_rap_file_usage(struct net_context *c, int argc, const char **argv);
136 int net_rap_file(struct net_context *c, int argc, const char **argv);
137 int net_rap_share_usage(struct net_context *c, int argc, const char **argv);
138 int net_rap_share(struct net_context *c, int argc, const char **argv);
139 int net_rap_session_usage(struct net_context *c, int argc, const char **argv);
140 int net_rap_session(struct net_context *c, int argc, const char **argv);
141 int net_rap_server_usage(struct net_context *c, int argc, const char **argv);
142 int net_rap_server(struct net_context *c, int argc, const char **argv);
143 int net_rap_domain_usage(struct net_context *c, int argc, const char **argv);
144 int net_rap_domain(struct net_context *c, int argc, const char **argv);
145 int net_rap_printq_usage(struct net_context *c, int argc, const char **argv);
146 int net_rap_printq(struct net_context *c, int argc, const char **argv);
147 int net_rap_user(struct net_context *c, int argc, const char **argv);
148 int net_rap_group_usage(struct net_context *c, int argc, const char **argv);
149 int net_rap_group(struct net_context *c, int argc, const char **argv);
150 int net_rap_groupmember_usage(struct net_context *c, int argc, const char **argv);
151 int net_rap_groupmember(struct net_context *c, int argc, const char **argv);
152 int net_rap_validate_usage(struct net_context *c, int argc, const char **argv);
153 int net_rap_validate(struct net_context *c, int argc, const char **argv);
154 int net_rap_service_usage(struct net_context *c, int argc, const char **argv);
155 int net_rap_service(struct net_context *c, int argc, const char **argv);
156 int net_rap_password_usage(struct net_context *c, int argc, const char **argv);
157 int net_rap_password(struct net_context *c, int argc, const char **argv);
158 int net_rap_admin_usage(struct net_context *c, int argc, const char **argv);
159 int net_rap_admin(struct net_context *c, int argc, const char **argv);
160 int net_rap(struct net_context *c, int argc, const char **argv);
162 /* The following definitions come from utils/net_registry.c */
164 int net_registry(struct net_context *c, int argc, const char **argv);
166 /* The following definitions come from utils/net_rpc.c */
168 NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
169 struct dom_sid **domain_sid,
170 const char **domain_name);
171 int run_rpc_command(struct net_context *c,
172 struct cli_state *cli_arg,
173 const struct ndr_interface_table *table,
174 int conn_flags,
175 rpc_command_fn fn,
176 int argc,
177 const char **argv);
178 int net_rpc_changetrustpw(struct net_context *c, int argc, const char **argv);
179 int net_rpc_testjoin(struct net_context *c, int argc, const char **argv);
180 int net_rpc_join(struct net_context *c, int argc, const char **argv);
181 NTSTATUS rpc_info_internals(struct net_context *c,
182 const struct dom_sid *domain_sid,
183 const char *domain_name,
184 struct cli_state *cli,
185 struct rpc_pipe_client *pipe_hnd,
186 TALLOC_CTX *mem_ctx,
187 int argc,
188 const char **argv);
189 int net_rpc_info(struct net_context *c, int argc, const char **argv);
190 int net_rpc_getsid(struct net_context *c, int argc, const char **argv);
191 int net_rpc_user(struct net_context *c, int argc, const char **argv);
192 struct rpc_sh_cmd *net_rpc_user_edit_cmds(struct net_context *c,
193 TALLOC_CTX *mem_ctx,
194 struct rpc_sh_ctx *ctx);
195 struct rpc_sh_cmd *net_rpc_user_cmds(struct net_context *c,
196 TALLOC_CTX *mem_ctx,
197 struct rpc_sh_ctx *ctx);
198 int net_rpc_group(struct net_context *c, int argc, const char **argv);
199 bool copy_top_level_perms(struct net_context *c,
200 struct copy_clistate *cp_clistate,
201 const char *sharename);
202 int net_usersidlist(struct net_context *c, int argc, const char **argv);
203 int net_usersidlist_usage(struct net_context *c, int argc, const char **argv);
204 int net_rpc_share(struct net_context *c, int argc, const char **argv);
205 struct rpc_sh_cmd *net_rpc_share_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
206 struct rpc_sh_ctx *ctx);
207 int net_rpc_file(struct net_context *c, int argc, const char **argv);
208 NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
209 const struct dom_sid *domain_sid,
210 const char *domain_name,
211 struct cli_state *cli,
212 struct rpc_pipe_client *pipe_hnd,
213 TALLOC_CTX *mem_ctx,
214 int argc,
215 const char **argv);
216 NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
217 const struct dom_sid *domain_sid,
218 const char *domain_name,
219 struct cli_state *cli,
220 struct rpc_pipe_client *pipe_hnd,
221 TALLOC_CTX *mem_ctx,
222 int argc,
223 const char **argv);
224 bool net_rpc_check(struct net_context *c, unsigned flags);
225 int rpc_printer_migrate(struct net_context *c, int argc, const char **argv);
226 int rpc_printer_usage(struct net_context *c, int argc, const char **argv);
227 int net_rpc_printer(struct net_context *c, int argc, const char **argv);
228 int net_rpc(struct net_context *c, int argc, const char **argv);
230 /* The following definitions come from utils/net_rpc_audit.c */
232 int net_rpc_audit(struct net_context *c, int argc, const char **argv);
234 /* The following definitions come from utils/net_rpc_printer.c */
236 NTSTATUS net_copy_fileattr(struct net_context *c,
237 TALLOC_CTX *mem_ctx,
238 struct cli_state *cli_share_src,
239 struct cli_state *cli_share_dst,
240 const char *src_name, const char *dst_name,
241 bool copy_acls, bool copy_attrs,
242 bool copy_timestamps, bool is_file);
243 NTSTATUS net_copy_file(struct net_context *c,
244 TALLOC_CTX *mem_ctx,
245 struct cli_state *cli_share_src,
246 struct cli_state *cli_share_dst,
247 const char *src_name, const char *dst_name,
248 bool copy_acls, bool copy_attrs,
249 bool copy_timestamps, bool is_file);
250 NTSTATUS rpc_printer_list_internals(struct net_context *c,
251 const struct dom_sid *domain_sid,
252 const char *domain_name,
253 struct cli_state *cli,
254 struct rpc_pipe_client *pipe_hnd,
255 TALLOC_CTX *mem_ctx,
256 int argc,
257 const char **argv);
258 NTSTATUS rpc_printer_driver_list_internals(struct net_context *c,
259 const struct dom_sid *domain_sid,
260 const char *domain_name,
261 struct cli_state *cli,
262 struct rpc_pipe_client *pipe_hnd,
263 TALLOC_CTX *mem_ctx,
264 int argc,
265 const char **argv);
266 NTSTATUS rpc_printer_publish_publish_internals(struct net_context *c,
267 const struct dom_sid *domain_sid,
268 const char *domain_name,
269 struct cli_state *cli,
270 struct rpc_pipe_client *pipe_hnd,
271 TALLOC_CTX *mem_ctx,
272 int argc,
273 const char **argv);
274 NTSTATUS rpc_printer_publish_unpublish_internals(struct net_context *c,
275 const struct dom_sid *domain_sid,
276 const char *domain_name,
277 struct cli_state *cli,
278 struct rpc_pipe_client *pipe_hnd,
279 TALLOC_CTX *mem_ctx,
280 int argc,
281 const char **argv);
282 NTSTATUS rpc_printer_publish_update_internals(struct net_context *c,
283 const struct dom_sid *domain_sid,
284 const char *domain_name,
285 struct cli_state *cli,
286 struct rpc_pipe_client *pipe_hnd,
287 TALLOC_CTX *mem_ctx,
288 int argc,
289 const char **argv);
290 NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
291 const struct dom_sid *domain_sid,
292 const char *domain_name,
293 struct cli_state *cli,
294 struct rpc_pipe_client *pipe_hnd,
295 TALLOC_CTX *mem_ctx,
296 int argc,
297 const char **argv);
298 NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
299 const struct dom_sid *domain_sid,
300 const char *domain_name,
301 struct cli_state *cli,
302 struct rpc_pipe_client *pipe_hnd,
303 TALLOC_CTX *mem_ctx,
304 int argc,
305 const char **argv);
306 NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
307 const struct dom_sid *domain_sid,
308 const char *domain_name,
309 struct cli_state *cli,
310 struct rpc_pipe_client *pipe_hnd,
311 TALLOC_CTX *mem_ctx,
312 int argc,
313 const char **argv);
314 NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
315 const struct dom_sid *domain_sid,
316 const char *domain_name,
317 struct cli_state *cli,
318 struct rpc_pipe_client *pipe_hnd,
319 TALLOC_CTX *mem_ctx,
320 int argc,
321 const char **argv);
322 NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
323 const struct dom_sid *domain_sid,
324 const char *domain_name,
325 struct cli_state *cli,
326 struct rpc_pipe_client *pipe_hnd,
327 TALLOC_CTX *mem_ctx,
328 int argc,
329 const char **argv);
330 NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
331 const struct dom_sid *domain_sid,
332 const char *domain_name,
333 struct cli_state *cli,
334 struct rpc_pipe_client *pipe_hnd,
335 TALLOC_CTX *mem_ctx,
336 int argc,
337 const char **argv);
339 /* The following definitions come from utils/net_rpc_registry.c */
341 int net_rpc_registry(struct net_context *c, int argc, const char **argv);
343 /* The following definitions come from utils/net_rpc_rights.c */
345 int net_rpc_rights(struct net_context *c, int argc, const char **argv);
346 struct rpc_sh_cmd *net_rpc_rights_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
347 struct rpc_sh_ctx *ctx);
349 /* The following definitions come from utils/net_rpc_samsync.c */
351 int rpc_vampire_usage(struct net_context *c, int argc, const char **argv);
352 int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv);
353 int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv);
355 /* The following definitions come from utils/net_rpc_service.c */
357 const char *svc_status_string( uint32_t state );
358 int net_rpc_service(struct net_context *c, int argc, const char **argv);
360 /* The following definitions come from utils/net_rpc_sh_acct.c */
362 struct rpc_sh_cmd *net_rpc_acct_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
363 struct rpc_sh_ctx *ctx);
365 /* The following definitions come from utils/net_rpc_shell.c */
367 int net_rpc_shell(struct net_context *c, int argc, const char **argv);
369 /* The following definitions come from utils/net_sam.c */
371 int net_sam(struct net_context *c, int argc, const char **argv);
373 /* The following definitions come from utils/net_share.c */
375 int net_share_usage(struct net_context *c, int argc, const char **argv);
376 int net_share(struct net_context *c, int argc, const char **argv);
378 /* The following definitions come from utils/net_status.c */
380 int net_status_usage(struct net_context *c, int argc, const char **argv);
381 int net_status(struct net_context *c, int argc, const char **argv);
383 /* The following definitions come from utils/net_time.c */
385 int net_time_usage(struct net_context *c, int argc, const char **argv);
386 int net_time(struct net_context *c, int argc, const char **argv);
388 /* The following definitions come from utils/net_user.c */
390 int net_user_usage(struct net_context *c, int argc, const char **argv);
391 int net_user(struct net_context *c, int argc, const char **argv);
393 /* The following definitions come from utils/net_usershare.c */
395 int net_usershare_usage(struct net_context *c, int argc, const char **argv);
396 int net_usershare_help(struct net_context *c, int argc, const char **argv);
397 int net_usershare(struct net_context *c, int argc, const char **argv);
399 /* The following definitions come from utils/net_eventlog.c */
401 int net_eventlog(struct net_context *c, int argc, const char **argv);
403 /* The following definitions come from utils/net_printing.c */
405 int net_printing(struct net_context *c, int argc, const char **argv);
407 /* The following definitions come from utils/net_serverid.c */
409 int net_serverid(struct net_context *c, int argc, const char **argv);
411 /* The following definitions come from utils/net_util.c */
413 NTSTATUS net_rpc_lookup_name(struct net_context *c,
414 TALLOC_CTX *mem_ctx, struct cli_state *cli,
415 const char *name, const char **ret_domain,
416 const char **ret_name, struct dom_sid *ret_sid,
417 enum lsa_SidType *ret_type);
418 NTSTATUS connect_to_service(struct net_context *c,
419 struct cli_state **cli_ctx,
420 const struct sockaddr_storage *server_ss,
421 const char *server_name,
422 const char *service_name,
423 const char *service_type);
424 NTSTATUS connect_to_ipc(struct net_context *c,
425 struct cli_state **cli_ctx,
426 const struct sockaddr_storage *server_ss,
427 const char *server_name);
428 NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
429 struct cli_state **cli_ctx,
430 const struct sockaddr_storage *server_ss,
431 const char *server_name);
432 NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
433 struct rpc_pipe_client **pp_pipe_hnd,
434 const struct ndr_interface_table *table);
435 int net_use_krb_machine_account(struct net_context *c);
436 bool net_find_server(struct net_context *c,
437 const char *domain,
438 unsigned flags,
439 struct sockaddr_storage *server_ss,
440 char **server_name);
441 bool net_find_pdc(struct sockaddr_storage *server_ss,
442 fstring server_name,
443 const char *domain_name);
444 NTSTATUS net_make_ipc_connection(struct net_context *c, unsigned flags,
445 struct cli_state **pcli);
446 NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
447 const char *server,
448 const struct sockaddr_storage *pss,
449 unsigned flags, struct cli_state **pcli);
450 int net_run_function(struct net_context *c, int argc, const char **argv,
451 const char *whoami, struct functable *table);
452 void net_display_usage_from_functable(struct functable *table);
454 void net_warn_member_options(void);
456 const char *net_share_type_str(int num_type);
458 NTSTATUS net_scan_dc(struct net_context *c,
459 struct cli_state *cli,
460 struct net_dc_info *dc_info);
462 /* The following definitions come from utils/netlookup.c */
464 NTSTATUS net_lookup_name_from_sid(struct net_context *c,
465 TALLOC_CTX *ctx,
466 struct dom_sid *psid,
467 const char **ppdomain,
468 const char **ppname);
469 NTSTATUS net_lookup_sid_from_name(struct net_context *c, TALLOC_CTX *ctx,
470 const char *full_name, struct dom_sid *pret_sid);
472 /* The following definitions come from utils/net_g_lock.c */
473 int net_g_lock(struct net_context *c, int argc, const char **argv);
475 /* The following definitions come from utils/net_rpc_trust.c */
476 int net_rpc_trust(struct net_context *c, int argc, const char **argv);
478 /* The following definitions come from utils/net_rpc_conf.c */
479 int net_rpc_conf(struct net_context *c, int argc, const char **argv);
481 int net_notify(struct net_context *c, int argc, const char **argv);
483 int net_tdb(struct net_context *c, int argc, const char **argv);
485 int net_vfs(struct net_context *c, int argc, const char **argv);
487 int net_witness(struct net_context *c, int argc, const char **argv);
489 #endif /* _NET_PROTO_H_ */