docs: fix the stdarg.configfile entity to print a "=" sign after the long option
[Samba/gebeck_regimport.git] / source3 / utils / net_proto.h
blob3f99e14e6e8be3707fe2cb67b0a81c8ed4f6b4c8
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 "libads/ads_status.h"
28 /* The following definitions come from utils/net.c */
30 enum netr_SchannelType get_sec_channel_type(const char *param);
32 /* The following definitions come from utils/net_ads.c */
33 struct ads_struct;
34 ADS_STATUS ads_startup(struct net_context *c, bool only_own_domain, struct ads_struct **ads);
35 ADS_STATUS ads_startup_nobind(struct net_context *c, bool only_own_domain, struct ads_struct **ads);
36 int net_ads_check_our_domain(struct net_context *c);
37 int net_ads_check(struct net_context *c);
38 int net_ads_user(struct net_context *c, int argc, const char **argv);
39 int net_ads_group(struct net_context *c, int argc, const char **argv);
40 int net_ads_testjoin(struct net_context *c, int argc, const char **argv);
41 int net_ads_join(struct net_context *c, int argc, const char **argv);
42 int net_ads_printer_usage(struct net_context *c, int argc, const char **argv);
43 int net_ads_changetrustpw(struct net_context *c, int argc, const char **argv);
44 int net_ads_keytab(struct net_context *c, int argc, const char **argv);
45 int net_ads_kerberos(struct net_context *c, int argc, const char **argv);
46 int net_ads(struct net_context *c, int argc, const char **argv);
48 /* The following definitions come from utils/net_ads_gpo.c */
50 int net_ads_gpo(struct net_context *c, int argc, const char **argv);
52 /* The following definitions come from utils/net_cache.c */
54 int net_cache(struct net_context *c, int argc, const char **argv);
56 /* The following definitions come from utils/net_conf.c */
58 int net_conf(struct net_context *c, int argc, const char **argv);
60 /* The following definitions come from utils/net_dns.c */
62 int get_my_ip_address( struct sockaddr_storage **pp_ss );
64 /* The following definitions come from utils/net_dom.c */
66 int net_dom_usage(struct net_context *c, int argc, const char **argv);
67 int net_dom(struct net_context *c, int argc, const char **argv);
69 /* The following definitions come from utils/net_file.c */
71 int net_file_usage(struct net_context *c, int argc, const char **argv);
72 int net_file(struct net_context *c, int argc, const char **argv);
74 /* The following definitions come from utils/net_group.c */
76 int net_group_usage(struct net_context *c, int argc, const char **argv);
77 int net_group(struct net_context *c, int argc, const char **argv);
79 /* The following definitions come from utils/net_groupmap.c */
81 int net_groupmap_usage(struct net_context *c, int argc, const char **argv);
82 int net_groupmap(struct net_context *c, int argc, const char **argv);
84 /* The following definitions come from utils/net_help.c */
86 int net_help(struct net_context *c, int argc, const char **argv);
88 /* The following definitions come from utils/net_idmap.c */
90 int net_idmap(struct net_context *c, int argc, const char **argv);
92 /* The following definitions come from utils/net_join.c */
94 int net_join_usage(struct net_context *c, int argc, const char **argv);
95 int net_join(struct net_context *c, int argc, const char **argv);
97 /* The following definitions come from utils/net_lookup.c */
99 int net_lookup_usage(struct net_context *c, int argc, const char **argv);
100 int net_lookup(struct net_context *c, int argc, const char **argv);
102 /* The following definitions come from utils/net_rap.c */
104 int net_rap_file_usage(struct net_context *c, int argc, const char **argv);
105 int net_rap_file(struct net_context *c, int argc, const char **argv);
106 int net_rap_share_usage(struct net_context *c, int argc, const char **argv);
107 int net_rap_share(struct net_context *c, int argc, const char **argv);
108 int net_rap_session_usage(struct net_context *c, int argc, const char **argv);
109 int net_rap_session(struct net_context *c, int argc, const char **argv);
110 int net_rap_server_usage(struct net_context *c, int argc, const char **argv);
111 int net_rap_server(struct net_context *c, int argc, const char **argv);
112 int net_rap_domain_usage(struct net_context *c, int argc, const char **argv);
113 int net_rap_domain(struct net_context *c, int argc, const char **argv);
114 int net_rap_printq_usage(struct net_context *c, int argc, const char **argv);
115 int net_rap_printq(struct net_context *c, int argc, const char **argv);
116 int net_rap_user(struct net_context *c, int argc, const char **argv);
117 int net_rap_group_usage(struct net_context *c, int argc, const char **argv);
118 int net_rap_group(struct net_context *c, int argc, const char **argv);
119 int net_rap_groupmember_usage(struct net_context *c, int argc, const char **argv);
120 int net_rap_groupmember(struct net_context *c, int argc, const char **argv);
121 int net_rap_validate_usage(struct net_context *c, int argc, const char **argv);
122 int net_rap_validate(struct net_context *c, int argc, const char **argv);
123 int net_rap_service_usage(struct net_context *c, int argc, const char **argv);
124 int net_rap_service(struct net_context *c, int argc, const char **argv);
125 int net_rap_password_usage(struct net_context *c, int argc, const char **argv);
126 int net_rap_password(struct net_context *c, int argc, const char **argv);
127 int net_rap_admin_usage(struct net_context *c, int argc, const char **argv);
128 int net_rap_admin(struct net_context *c, int argc, const char **argv);
129 int net_rap(struct net_context *c, int argc, const char **argv);
131 /* The following definitions come from utils/net_registry.c */
133 int net_registry(struct net_context *c, int argc, const char **argv);
135 /* The following definitions come from utils/net_rpc.c */
137 NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
138 struct dom_sid **domain_sid,
139 const char **domain_name);
140 int run_rpc_command(struct net_context *c,
141 struct cli_state *cli_arg,
142 const struct ndr_interface_table *table,
143 int conn_flags,
144 rpc_command_fn fn,
145 int argc,
146 const char **argv);
147 int net_rpc_changetrustpw(struct net_context *c, int argc, const char **argv);
148 int net_rpc_join(struct net_context *c, int argc, const char **argv);
149 NTSTATUS rpc_info_internals(struct net_context *c,
150 const struct dom_sid *domain_sid,
151 const char *domain_name,
152 struct cli_state *cli,
153 struct rpc_pipe_client *pipe_hnd,
154 TALLOC_CTX *mem_ctx,
155 int argc,
156 const char **argv);
157 int net_rpc_info(struct net_context *c, int argc, const char **argv);
158 int net_rpc_getsid(struct net_context *c, int argc, const char **argv);
159 int net_rpc_user(struct net_context *c, int argc, const char **argv);
160 struct rpc_sh_cmd *net_rpc_user_edit_cmds(struct net_context *c,
161 TALLOC_CTX *mem_ctx,
162 struct rpc_sh_ctx *ctx);
163 struct rpc_sh_cmd *net_rpc_user_cmds(struct net_context *c,
164 TALLOC_CTX *mem_ctx,
165 struct rpc_sh_ctx *ctx);
166 int net_rpc_group(struct net_context *c, int argc, const char **argv);
167 bool copy_top_level_perms(struct net_context *c,
168 struct copy_clistate *cp_clistate,
169 const char *sharename);
170 int net_usersidlist(struct net_context *c, int argc, const char **argv);
171 int net_usersidlist_usage(struct net_context *c, int argc, const char **argv);
172 int net_rpc_share(struct net_context *c, int argc, const char **argv);
173 struct rpc_sh_cmd *net_rpc_share_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
174 struct rpc_sh_ctx *ctx);
175 int net_rpc_file(struct net_context *c, int argc, const char **argv);
176 NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
177 const struct dom_sid *domain_sid,
178 const char *domain_name,
179 struct cli_state *cli,
180 struct rpc_pipe_client *pipe_hnd,
181 TALLOC_CTX *mem_ctx,
182 int argc,
183 const char **argv);
184 NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
185 const struct dom_sid *domain_sid,
186 const char *domain_name,
187 struct cli_state *cli,
188 struct rpc_pipe_client *pipe_hnd,
189 TALLOC_CTX *mem_ctx,
190 int argc,
191 const char **argv);
192 bool net_rpc_check(struct net_context *c, unsigned flags);
193 int rpc_printer_migrate(struct net_context *c, int argc, const char **argv);
194 int rpc_printer_usage(struct net_context *c, int argc, const char **argv);
195 int net_rpc_printer(struct net_context *c, int argc, const char **argv);
196 int net_rpc(struct net_context *c, int argc, const char **argv);
198 /* The following definitions come from utils/net_rpc_audit.c */
200 int net_rpc_audit(struct net_context *c, int argc, const char **argv);
202 /* The following definitions come from utils/net_rpc_join.c */
204 NTSTATUS net_rpc_join_ok(struct net_context *c, const char *domain,
205 const char *server,
206 const struct sockaddr_storage *server_ss);
207 int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv);
208 int net_rpc_testjoin(struct net_context *c, int argc, const char **argv);
210 /* The following definitions come from utils/net_rpc_printer.c */
212 NTSTATUS net_copy_fileattr(struct net_context *c,
213 TALLOC_CTX *mem_ctx,
214 struct cli_state *cli_share_src,
215 struct cli_state *cli_share_dst,
216 const char *src_name, const char *dst_name,
217 bool copy_acls, bool copy_attrs,
218 bool copy_timestamps, bool is_file);
219 NTSTATUS net_copy_file(struct net_context *c,
220 TALLOC_CTX *mem_ctx,
221 struct cli_state *cli_share_src,
222 struct cli_state *cli_share_dst,
223 const char *src_name, const char *dst_name,
224 bool copy_acls, bool copy_attrs,
225 bool copy_timestamps, bool is_file);
226 NTSTATUS rpc_printer_list_internals(struct net_context *c,
227 const struct dom_sid *domain_sid,
228 const char *domain_name,
229 struct cli_state *cli,
230 struct rpc_pipe_client *pipe_hnd,
231 TALLOC_CTX *mem_ctx,
232 int argc,
233 const char **argv);
234 NTSTATUS rpc_printer_driver_list_internals(struct net_context *c,
235 const struct dom_sid *domain_sid,
236 const char *domain_name,
237 struct cli_state *cli,
238 struct rpc_pipe_client *pipe_hnd,
239 TALLOC_CTX *mem_ctx,
240 int argc,
241 const char **argv);
242 NTSTATUS rpc_printer_publish_publish_internals(struct net_context *c,
243 const struct dom_sid *domain_sid,
244 const char *domain_name,
245 struct cli_state *cli,
246 struct rpc_pipe_client *pipe_hnd,
247 TALLOC_CTX *mem_ctx,
248 int argc,
249 const char **argv);
250 NTSTATUS rpc_printer_publish_unpublish_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_publish_update_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_list_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_migrate_security_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_migrate_forms_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_migrate_drivers_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_printers_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_settings_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);
315 /* The following definitions come from utils/net_rpc_registry.c */
317 int net_rpc_registry(struct net_context *c, int argc, const char **argv);
319 /* The following definitions come from utils/net_rpc_rights.c */
321 int net_rpc_rights(struct net_context *c, int argc, const char **argv);
322 struct rpc_sh_cmd *net_rpc_rights_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
323 struct rpc_sh_ctx *ctx);
325 /* The following definitions come from utils/net_rpc_samsync.c */
327 NTSTATUS rpc_samdump_internals(struct net_context *c,
328 const struct dom_sid *domain_sid,
329 const char *domain_name,
330 struct cli_state *cli,
331 struct rpc_pipe_client *pipe_hnd,
332 TALLOC_CTX *mem_ctx,
333 int argc,
334 const char **argv);
335 int rpc_vampire_usage(struct net_context *c, int argc, const char **argv);
336 int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv);
337 int rpc_vampire_ldif(struct net_context *c, int argc, const char **argv);
338 int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv);
340 /* The following definitions come from utils/net_rpc_service.c */
342 const char *svc_status_string( uint32 state );
343 int net_rpc_service(struct net_context *c, int argc, const char **argv);
345 /* The following definitions come from utils/net_rpc_sh_acct.c */
347 struct rpc_sh_cmd *net_rpc_acct_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
348 struct rpc_sh_ctx *ctx);
350 /* The following definitions come from utils/net_rpc_shell.c */
352 int net_rpc_shell(struct net_context *c, int argc, const char **argv);
354 /* The following definitions come from utils/net_sam.c */
356 int net_sam(struct net_context *c, int argc, const char **argv);
358 /* The following definitions come from utils/net_share.c */
360 int net_share_usage(struct net_context *c, int argc, const char **argv);
361 int net_share(struct net_context *c, int argc, const char **argv);
363 /* The following definitions come from utils/net_status.c */
365 int net_status_usage(struct net_context *c, int argc, const char **argv);
366 int net_status(struct net_context *c, int argc, const char **argv);
368 /* The following definitions come from utils/net_time.c */
370 int net_time_usage(struct net_context *c, int argc, const char **argv);
371 int net_time(struct net_context *c, int argc, const char **argv);
373 /* The following definitions come from utils/net_user.c */
375 int net_user_usage(struct net_context *c, int argc, const char **argv);
376 int net_user(struct net_context *c, int argc, const char **argv);
378 /* The following definitions come from utils/net_usershare.c */
380 int net_usershare_usage(struct net_context *c, int argc, const char **argv);
381 int net_usershare_help(struct net_context *c, int argc, const char **argv);
382 int net_usershare(struct net_context *c, int argc, const char **argv);
384 /* The following definitions come from utils/net_eventlog.c */
386 int net_eventlog(struct net_context *c, int argc, const char **argv);
388 /* The following definitions come from utils/net_printing.c */
390 int net_printing(struct net_context *c, int argc, const char **argv);
392 /* The following definitions come from utils/net_serverid.c */
394 int net_serverid(struct net_context *c, int argc, const char **argv);
396 /* The following definitions come from utils/net_util.c */
398 NTSTATUS net_rpc_lookup_name(struct net_context *c,
399 TALLOC_CTX *mem_ctx, struct cli_state *cli,
400 const char *name, const char **ret_domain,
401 const char **ret_name, struct dom_sid *ret_sid,
402 enum lsa_SidType *ret_type);
403 NTSTATUS connect_to_service(struct net_context *c,
404 struct cli_state **cli_ctx,
405 const struct sockaddr_storage *server_ss,
406 const char *server_name,
407 const char *service_name,
408 const char *service_type);
409 NTSTATUS connect_to_ipc(struct net_context *c,
410 struct cli_state **cli_ctx,
411 const struct sockaddr_storage *server_ss,
412 const char *server_name);
413 NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
414 struct cli_state **cli_ctx,
415 const struct sockaddr_storage *server_ss,
416 const char *server_name);
417 NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
418 struct rpc_pipe_client **pp_pipe_hnd,
419 const struct ndr_syntax_id *interface);
420 int net_use_krb_machine_account(struct net_context *c);
421 int net_use_machine_account(struct net_context *c);
422 bool net_find_server(struct net_context *c,
423 const char *domain,
424 unsigned flags,
425 struct sockaddr_storage *server_ss,
426 char **server_name);
427 bool net_find_pdc(struct sockaddr_storage *server_ss,
428 fstring server_name,
429 const char *domain_name);
430 NTSTATUS net_make_ipc_connection(struct net_context *c, unsigned flags,
431 struct cli_state **pcli);
432 NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
433 const char *server,
434 const struct sockaddr_storage *pss,
435 unsigned flags, struct cli_state **pcli);
436 const char *net_prompt_pass(struct net_context *c, const char *user);
437 int net_run_function(struct net_context *c, int argc, const char **argv,
438 const char *whoami, struct functable *table);
439 void net_display_usage_from_functable(struct functable *table);
441 const char *net_share_type_str(int num_type);
443 NTSTATUS net_scan_dc(struct net_context *c,
444 struct cli_state *cli,
445 struct net_dc_info *dc_info);
447 /* The following definitions come from utils/netlookup.c */
449 NTSTATUS net_lookup_name_from_sid(struct net_context *c,
450 TALLOC_CTX *ctx,
451 struct dom_sid *psid,
452 const char **ppdomain,
453 const char **ppname);
454 NTSTATUS net_lookup_sid_from_name(struct net_context *c, TALLOC_CTX *ctx,
455 const char *full_name, struct dom_sid *pret_sid);
457 /* The following definitions come from utils/passwd_util.c */
459 char *stdin_new_passwd( void);
460 char *get_pass( const char *prompt, bool stdin_get);
462 /* The following definitions come from utils/net_g_lock.c */
463 int net_g_lock(struct net_context *c, int argc, const char **argv);
465 /* The following definitions come from utils/net_rpc_trust.c */
466 int net_rpc_trust(struct net_context *c, int argc, const char **argv);
468 /* The following definitions come from utils/net_rpc_conf.c */
469 int net_rpc_conf(struct net_context *c, int argc, const char **argv);
471 #endif /* _NET_PROTO_H_ */