docs: Add very basic samba manpage.
[Samba/gebeck_regimport.git] / source3 / utils / net_proto.h
bloba683abb67e7e3b8786c602909314f46e4cbecda1
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_connections.c */
137 int net_connections(struct net_context *c, int argc, const char **argv);
139 /* The following definitions come from utils/net_rpc.c */
141 NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
142 struct dom_sid **domain_sid,
143 const char **domain_name);
144 int run_rpc_command(struct net_context *c,
145 struct cli_state *cli_arg,
146 const struct ndr_interface_table *table,
147 int conn_flags,
148 rpc_command_fn fn,
149 int argc,
150 const char **argv);
151 int net_rpc_changetrustpw(struct net_context *c, int argc, const char **argv);
152 int net_rpc_join(struct net_context *c, int argc, const char **argv);
153 NTSTATUS rpc_info_internals(struct net_context *c,
154 const struct dom_sid *domain_sid,
155 const char *domain_name,
156 struct cli_state *cli,
157 struct rpc_pipe_client *pipe_hnd,
158 TALLOC_CTX *mem_ctx,
159 int argc,
160 const char **argv);
161 int net_rpc_info(struct net_context *c, int argc, const char **argv);
162 int net_rpc_getsid(struct net_context *c, int argc, const char **argv);
163 int net_rpc_user(struct net_context *c, int argc, const char **argv);
164 struct rpc_sh_cmd *net_rpc_user_edit_cmds(struct net_context *c,
165 TALLOC_CTX *mem_ctx,
166 struct rpc_sh_ctx *ctx);
167 struct rpc_sh_cmd *net_rpc_user_cmds(struct net_context *c,
168 TALLOC_CTX *mem_ctx,
169 struct rpc_sh_ctx *ctx);
170 int net_rpc_group(struct net_context *c, int argc, const char **argv);
171 bool copy_top_level_perms(struct net_context *c,
172 struct copy_clistate *cp_clistate,
173 const char *sharename);
174 int net_usersidlist(struct net_context *c, int argc, const char **argv);
175 int net_usersidlist_usage(struct net_context *c, int argc, const char **argv);
176 int net_rpc_share(struct net_context *c, int argc, const char **argv);
177 struct rpc_sh_cmd *net_rpc_share_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
178 struct rpc_sh_ctx *ctx);
179 int net_rpc_file(struct net_context *c, int argc, const char **argv);
180 NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
181 const struct dom_sid *domain_sid,
182 const char *domain_name,
183 struct cli_state *cli,
184 struct rpc_pipe_client *pipe_hnd,
185 TALLOC_CTX *mem_ctx,
186 int argc,
187 const char **argv);
188 NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
189 const struct dom_sid *domain_sid,
190 const char *domain_name,
191 struct cli_state *cli,
192 struct rpc_pipe_client *pipe_hnd,
193 TALLOC_CTX *mem_ctx,
194 int argc,
195 const char **argv);
196 bool net_rpc_check(struct net_context *c, unsigned flags);
197 int rpc_printer_migrate(struct net_context *c, int argc, const char **argv);
198 int rpc_printer_usage(struct net_context *c, int argc, const char **argv);
199 int net_rpc_printer(struct net_context *c, int argc, const char **argv);
200 int net_rpc(struct net_context *c, int argc, const char **argv);
202 /* The following definitions come from utils/net_rpc_audit.c */
204 int net_rpc_audit(struct net_context *c, int argc, const char **argv);
206 /* The following definitions come from utils/net_rpc_join.c */
208 NTSTATUS net_rpc_join_ok(struct net_context *c, const char *domain,
209 const char *server,
210 const struct sockaddr_storage *server_ss);
211 int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv);
212 int net_rpc_testjoin(struct net_context *c, int argc, const char **argv);
214 /* The following definitions come from utils/net_rpc_printer.c */
216 NTSTATUS net_copy_fileattr(struct net_context *c,
217 TALLOC_CTX *mem_ctx,
218 struct cli_state *cli_share_src,
219 struct cli_state *cli_share_dst,
220 const char *src_name, const char *dst_name,
221 bool copy_acls, bool copy_attrs,
222 bool copy_timestamps, bool is_file);
223 NTSTATUS net_copy_file(struct net_context *c,
224 TALLOC_CTX *mem_ctx,
225 struct cli_state *cli_share_src,
226 struct cli_state *cli_share_dst,
227 const char *src_name, const char *dst_name,
228 bool copy_acls, bool copy_attrs,
229 bool copy_timestamps, bool is_file);
230 NTSTATUS rpc_printer_list_internals(struct net_context *c,
231 const struct dom_sid *domain_sid,
232 const char *domain_name,
233 struct cli_state *cli,
234 struct rpc_pipe_client *pipe_hnd,
235 TALLOC_CTX *mem_ctx,
236 int argc,
237 const char **argv);
238 NTSTATUS rpc_printer_driver_list_internals(struct net_context *c,
239 const struct dom_sid *domain_sid,
240 const char *domain_name,
241 struct cli_state *cli,
242 struct rpc_pipe_client *pipe_hnd,
243 TALLOC_CTX *mem_ctx,
244 int argc,
245 const char **argv);
246 NTSTATUS rpc_printer_publish_publish_internals(struct net_context *c,
247 const struct dom_sid *domain_sid,
248 const char *domain_name,
249 struct cli_state *cli,
250 struct rpc_pipe_client *pipe_hnd,
251 TALLOC_CTX *mem_ctx,
252 int argc,
253 const char **argv);
254 NTSTATUS rpc_printer_publish_unpublish_internals(struct net_context *c,
255 const struct dom_sid *domain_sid,
256 const char *domain_name,
257 struct cli_state *cli,
258 struct rpc_pipe_client *pipe_hnd,
259 TALLOC_CTX *mem_ctx,
260 int argc,
261 const char **argv);
262 NTSTATUS rpc_printer_publish_update_internals(struct net_context *c,
263 const struct dom_sid *domain_sid,
264 const char *domain_name,
265 struct cli_state *cli,
266 struct rpc_pipe_client *pipe_hnd,
267 TALLOC_CTX *mem_ctx,
268 int argc,
269 const char **argv);
270 NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
271 const struct dom_sid *domain_sid,
272 const char *domain_name,
273 struct cli_state *cli,
274 struct rpc_pipe_client *pipe_hnd,
275 TALLOC_CTX *mem_ctx,
276 int argc,
277 const char **argv);
278 NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
279 const struct dom_sid *domain_sid,
280 const char *domain_name,
281 struct cli_state *cli,
282 struct rpc_pipe_client *pipe_hnd,
283 TALLOC_CTX *mem_ctx,
284 int argc,
285 const char **argv);
286 NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
287 const struct dom_sid *domain_sid,
288 const char *domain_name,
289 struct cli_state *cli,
290 struct rpc_pipe_client *pipe_hnd,
291 TALLOC_CTX *mem_ctx,
292 int argc,
293 const char **argv);
294 NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
295 const struct dom_sid *domain_sid,
296 const char *domain_name,
297 struct cli_state *cli,
298 struct rpc_pipe_client *pipe_hnd,
299 TALLOC_CTX *mem_ctx,
300 int argc,
301 const char **argv);
302 NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
303 const struct dom_sid *domain_sid,
304 const char *domain_name,
305 struct cli_state *cli,
306 struct rpc_pipe_client *pipe_hnd,
307 TALLOC_CTX *mem_ctx,
308 int argc,
309 const char **argv);
310 NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
311 const struct dom_sid *domain_sid,
312 const char *domain_name,
313 struct cli_state *cli,
314 struct rpc_pipe_client *pipe_hnd,
315 TALLOC_CTX *mem_ctx,
316 int argc,
317 const char **argv);
319 /* The following definitions come from utils/net_rpc_registry.c */
321 int net_rpc_registry(struct net_context *c, int argc, const char **argv);
323 /* The following definitions come from utils/net_rpc_rights.c */
325 int net_rpc_rights(struct net_context *c, int argc, const char **argv);
326 struct rpc_sh_cmd *net_rpc_rights_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
327 struct rpc_sh_ctx *ctx);
329 /* The following definitions come from utils/net_rpc_samsync.c */
331 NTSTATUS rpc_samdump_internals(struct net_context *c,
332 const struct dom_sid *domain_sid,
333 const char *domain_name,
334 struct cli_state *cli,
335 struct rpc_pipe_client *pipe_hnd,
336 TALLOC_CTX *mem_ctx,
337 int argc,
338 const char **argv);
339 int rpc_vampire_usage(struct net_context *c, int argc, const char **argv);
340 int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv);
341 int rpc_vampire_ldif(struct net_context *c, int argc, const char **argv);
342 int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv);
344 /* The following definitions come from utils/net_rpc_service.c */
346 const char *svc_status_string( uint32 state );
347 int net_rpc_service(struct net_context *c, int argc, const char **argv);
349 /* The following definitions come from utils/net_rpc_sh_acct.c */
351 struct rpc_sh_cmd *net_rpc_acct_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
352 struct rpc_sh_ctx *ctx);
354 /* The following definitions come from utils/net_rpc_shell.c */
356 int net_rpc_shell(struct net_context *c, int argc, const char **argv);
358 /* The following definitions come from utils/net_sam.c */
360 int net_sam(struct net_context *c, int argc, const char **argv);
362 /* The following definitions come from utils/net_share.c */
364 int net_share_usage(struct net_context *c, int argc, const char **argv);
365 int net_share(struct net_context *c, int argc, const char **argv);
367 /* The following definitions come from utils/net_status.c */
369 int net_status_usage(struct net_context *c, int argc, const char **argv);
370 int net_status(struct net_context *c, int argc, const char **argv);
372 /* The following definitions come from utils/net_time.c */
374 int net_time_usage(struct net_context *c, int argc, const char **argv);
375 int net_time(struct net_context *c, int argc, const char **argv);
377 /* The following definitions come from utils/net_user.c */
379 int net_user_usage(struct net_context *c, int argc, const char **argv);
380 int net_user(struct net_context *c, int argc, const char **argv);
382 /* The following definitions come from utils/net_usershare.c */
384 int net_usershare_usage(struct net_context *c, int argc, const char **argv);
385 int net_usershare_help(struct net_context *c, int argc, const char **argv);
386 int net_usershare(struct net_context *c, int argc, const char **argv);
388 /* The following definitions come from utils/net_eventlog.c */
390 int net_eventlog(struct net_context *c, int argc, const char **argv);
392 /* The following definitions come from utils/net_printing.c */
394 int net_printing(struct net_context *c, int argc, const char **argv);
396 /* The following definitions come from utils/net_serverid.c */
398 int net_serverid(struct net_context *c, int argc, const char **argv);
400 /* The following definitions come from utils/net_util.c */
402 NTSTATUS net_rpc_lookup_name(struct net_context *c,
403 TALLOC_CTX *mem_ctx, struct cli_state *cli,
404 const char *name, const char **ret_domain,
405 const char **ret_name, struct dom_sid *ret_sid,
406 enum lsa_SidType *ret_type);
407 NTSTATUS connect_to_service(struct net_context *c,
408 struct cli_state **cli_ctx,
409 const struct sockaddr_storage *server_ss,
410 const char *server_name,
411 const char *service_name,
412 const char *service_type);
413 NTSTATUS connect_to_ipc(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_to_ipc_anonymous(struct net_context *c,
418 struct cli_state **cli_ctx,
419 const struct sockaddr_storage *server_ss,
420 const char *server_name);
421 NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
422 struct rpc_pipe_client **pp_pipe_hnd,
423 const struct ndr_syntax_id *interface);
424 int net_use_krb_machine_account(struct net_context *c);
425 int net_use_machine_account(struct net_context *c);
426 bool net_find_server(struct net_context *c,
427 const char *domain,
428 unsigned flags,
429 struct sockaddr_storage *server_ss,
430 char **server_name);
431 bool net_find_pdc(struct sockaddr_storage *server_ss,
432 fstring server_name,
433 const char *domain_name);
434 NTSTATUS net_make_ipc_connection(struct net_context *c, unsigned flags,
435 struct cli_state **pcli);
436 NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
437 const char *server,
438 const struct sockaddr_storage *pss,
439 unsigned flags, struct cli_state **pcli);
440 const char *net_prompt_pass(struct net_context *c, const char *user);
441 int net_run_function(struct net_context *c, int argc, const char **argv,
442 const char *whoami, struct functable *table);
443 void net_display_usage_from_functable(struct functable *table);
445 const char *net_share_type_str(int num_type);
447 NTSTATUS net_scan_dc(struct net_context *c,
448 struct cli_state *cli,
449 struct net_dc_info *dc_info);
451 /* The following definitions come from utils/netlookup.c */
453 NTSTATUS net_lookup_name_from_sid(struct net_context *c,
454 TALLOC_CTX *ctx,
455 struct dom_sid *psid,
456 const char **ppdomain,
457 const char **ppname);
458 NTSTATUS net_lookup_sid_from_name(struct net_context *c, TALLOC_CTX *ctx,
459 const char *full_name, struct dom_sid *pret_sid);
461 /* The following definitions come from utils/passwd_util.c */
463 char *stdin_new_passwd( void);
464 char *get_pass( const char *prompt, bool stdin_get);
466 /* The following definitions come from utils/net_g_lock.c */
467 int net_g_lock(struct net_context *c, int argc, const char **argv);
469 /* The following definitions come from utils/net_rpc_trust.c */
470 int net_rpc_trust(struct net_context *c, int argc, const char **argv);
472 /* The following definitions come from utils/net_rpc_conf.c */
473 int net_rpc_conf(struct net_context *c, int argc, const char **argv);
475 #endif /* _NET_PROTO_H_ */