tests/krb5: Don't create PAC request or options manually in fast_tests
[Samba.git] / source3 / utils / net_proto.h
blobeea7cc9426f08e86301fba1859cdeaf9aca63419
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_setspn(struct net_context *c, int argc, const char **argv);
47 int net_ads(struct net_context *c, int argc, const char **argv);
49 /* The following definitions come from utils/net_ads_gpo.c */
51 int net_ads_gpo(struct net_context *c, int argc, const char **argv);
53 /* The following definitions come from utils/net_cache.c */
55 int net_cache(struct net_context *c, int argc, const char **argv);
57 /* The following definitions come from utils/net_conf.c */
59 int net_conf(struct net_context *c, int argc, const char **argv);
61 /* The following definitions come from utils/net_dns.c */
63 int get_my_ip_address( struct sockaddr_storage **pp_ss );
65 /* The following definitions come from utils/net_dom.c */
67 int net_dom_usage(struct net_context *c, int argc, const char **argv);
68 int net_dom(struct net_context *c, int argc, const char **argv);
70 /* The following definitions come from utils/net_file.c */
72 int net_file_usage(struct net_context *c, int argc, const char **argv);
73 int net_file(struct net_context *c, int argc, const char **argv);
75 /* The following definitions come from utils/net_group.c */
77 int net_group_usage(struct net_context *c, int argc, const char **argv);
78 int net_group(struct net_context *c, int argc, const char **argv);
80 /* The following definitions come from utils/net_groupmap.c */
82 int net_groupmap_usage(struct net_context *c, int argc, const char **argv);
83 int net_groupmap(struct net_context *c, int argc, const char **argv);
85 /* The following definitions come from utils/net_help.c */
87 int net_help(struct net_context *c, int argc, const char **argv);
89 /* The following definitions come from utils/net_idmap.c */
91 int net_idmap(struct net_context *c, int argc, const char **argv);
93 /* The following definitions come from utils/net_join.c */
95 int net_join_usage(struct net_context *c, int argc, const char **argv);
96 int net_join(struct net_context *c, int argc, const char **argv);
98 /* The following definitions come from source3/utils/net_offlinejoin.c */
100 int net_offlinejoin_usage(struct net_context *c, int argc, const char **argv);
101 int net_offlinejoin(struct net_context *c, int argc, const char **argv);
102 int net_offlinejoin_provision(struct net_context *c,
103 int argc, const char **argv);
104 int net_offlinejoin_requestodj(struct net_context *c,
105 int argc, const char **argv);
107 /* The following definitions come from utils/net_lookup.c */
109 int net_lookup_usage(struct net_context *c, int argc, const char **argv);
110 int net_lookup(struct net_context *c, int argc, const char **argv);
112 /* The following definitions come from utils/net_rap.c */
114 int net_rap_file_usage(struct net_context *c, int argc, const char **argv);
115 int net_rap_file(struct net_context *c, int argc, const char **argv);
116 int net_rap_share_usage(struct net_context *c, int argc, const char **argv);
117 int net_rap_share(struct net_context *c, int argc, const char **argv);
118 int net_rap_session_usage(struct net_context *c, int argc, const char **argv);
119 int net_rap_session(struct net_context *c, int argc, const char **argv);
120 int net_rap_server_usage(struct net_context *c, int argc, const char **argv);
121 int net_rap_server(struct net_context *c, int argc, const char **argv);
122 int net_rap_domain_usage(struct net_context *c, int argc, const char **argv);
123 int net_rap_domain(struct net_context *c, int argc, const char **argv);
124 int net_rap_printq_usage(struct net_context *c, int argc, const char **argv);
125 int net_rap_printq(struct net_context *c, int argc, const char **argv);
126 int net_rap_user(struct net_context *c, int argc, const char **argv);
127 int net_rap_group_usage(struct net_context *c, int argc, const char **argv);
128 int net_rap_group(struct net_context *c, int argc, const char **argv);
129 int net_rap_groupmember_usage(struct net_context *c, int argc, const char **argv);
130 int net_rap_groupmember(struct net_context *c, int argc, const char **argv);
131 int net_rap_validate_usage(struct net_context *c, int argc, const char **argv);
132 int net_rap_validate(struct net_context *c, int argc, const char **argv);
133 int net_rap_service_usage(struct net_context *c, int argc, const char **argv);
134 int net_rap_service(struct net_context *c, int argc, const char **argv);
135 int net_rap_password_usage(struct net_context *c, int argc, const char **argv);
136 int net_rap_password(struct net_context *c, int argc, const char **argv);
137 int net_rap_admin_usage(struct net_context *c, int argc, const char **argv);
138 int net_rap_admin(struct net_context *c, int argc, const char **argv);
139 int net_rap(struct net_context *c, int argc, const char **argv);
141 /* The following definitions come from utils/net_registry.c */
143 int net_registry(struct net_context *c, int argc, const char **argv);
145 /* The following definitions come from utils/net_rpc.c */
147 NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
148 struct dom_sid **domain_sid,
149 const char **domain_name);
150 int run_rpc_command(struct net_context *c,
151 struct cli_state *cli_arg,
152 const struct ndr_interface_table *table,
153 int conn_flags,
154 rpc_command_fn fn,
155 int argc,
156 const char **argv);
157 int net_rpc_changetrustpw(struct net_context *c, int argc, const char **argv);
158 int net_rpc_testjoin(struct net_context *c, int argc, const char **argv);
159 int net_rpc_join(struct net_context *c, int argc, const char **argv);
160 NTSTATUS rpc_info_internals(struct net_context *c,
161 const struct dom_sid *domain_sid,
162 const char *domain_name,
163 struct cli_state *cli,
164 struct rpc_pipe_client *pipe_hnd,
165 TALLOC_CTX *mem_ctx,
166 int argc,
167 const char **argv);
168 int net_rpc_info(struct net_context *c, int argc, const char **argv);
169 int net_rpc_getsid(struct net_context *c, int argc, const char **argv);
170 int net_rpc_user(struct net_context *c, int argc, const char **argv);
171 struct rpc_sh_cmd *net_rpc_user_edit_cmds(struct net_context *c,
172 TALLOC_CTX *mem_ctx,
173 struct rpc_sh_ctx *ctx);
174 struct rpc_sh_cmd *net_rpc_user_cmds(struct net_context *c,
175 TALLOC_CTX *mem_ctx,
176 struct rpc_sh_ctx *ctx);
177 int net_rpc_group(struct net_context *c, int argc, const char **argv);
178 bool copy_top_level_perms(struct net_context *c,
179 struct copy_clistate *cp_clistate,
180 const char *sharename);
181 int net_usersidlist(struct net_context *c, int argc, const char **argv);
182 int net_usersidlist_usage(struct net_context *c, int argc, const char **argv);
183 int net_rpc_share(struct net_context *c, int argc, const char **argv);
184 struct rpc_sh_cmd *net_rpc_share_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
185 struct rpc_sh_ctx *ctx);
186 int net_rpc_file(struct net_context *c, int argc, const char **argv);
187 NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
188 const struct dom_sid *domain_sid,
189 const char *domain_name,
190 struct cli_state *cli,
191 struct rpc_pipe_client *pipe_hnd,
192 TALLOC_CTX *mem_ctx,
193 int argc,
194 const char **argv);
195 NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
196 const struct dom_sid *domain_sid,
197 const char *domain_name,
198 struct cli_state *cli,
199 struct rpc_pipe_client *pipe_hnd,
200 TALLOC_CTX *mem_ctx,
201 int argc,
202 const char **argv);
203 bool net_rpc_check(struct net_context *c, unsigned flags);
204 int rpc_printer_migrate(struct net_context *c, int argc, const char **argv);
205 int rpc_printer_usage(struct net_context *c, int argc, const char **argv);
206 int net_rpc_printer(struct net_context *c, int argc, const char **argv);
207 int net_rpc(struct net_context *c, int argc, const char **argv);
209 /* The following definitions come from utils/net_rpc_audit.c */
211 int net_rpc_audit(struct net_context *c, int argc, const char **argv);
213 /* The following definitions come from utils/net_rpc_printer.c */
215 NTSTATUS net_copy_fileattr(struct net_context *c,
216 TALLOC_CTX *mem_ctx,
217 struct cli_state *cli_share_src,
218 struct cli_state *cli_share_dst,
219 const char *src_name, const char *dst_name,
220 bool copy_acls, bool copy_attrs,
221 bool copy_timestamps, bool is_file);
222 NTSTATUS net_copy_file(struct net_context *c,
223 TALLOC_CTX *mem_ctx,
224 struct cli_state *cli_share_src,
225 struct cli_state *cli_share_dst,
226 const char *src_name, const char *dst_name,
227 bool copy_acls, bool copy_attrs,
228 bool copy_timestamps, bool is_file);
229 NTSTATUS rpc_printer_list_internals(struct net_context *c,
230 const struct dom_sid *domain_sid,
231 const char *domain_name,
232 struct cli_state *cli,
233 struct rpc_pipe_client *pipe_hnd,
234 TALLOC_CTX *mem_ctx,
235 int argc,
236 const char **argv);
237 NTSTATUS rpc_printer_driver_list_internals(struct net_context *c,
238 const struct dom_sid *domain_sid,
239 const char *domain_name,
240 struct cli_state *cli,
241 struct rpc_pipe_client *pipe_hnd,
242 TALLOC_CTX *mem_ctx,
243 int argc,
244 const char **argv);
245 NTSTATUS rpc_printer_publish_publish_internals(struct net_context *c,
246 const struct dom_sid *domain_sid,
247 const char *domain_name,
248 struct cli_state *cli,
249 struct rpc_pipe_client *pipe_hnd,
250 TALLOC_CTX *mem_ctx,
251 int argc,
252 const char **argv);
253 NTSTATUS rpc_printer_publish_unpublish_internals(struct net_context *c,
254 const struct dom_sid *domain_sid,
255 const char *domain_name,
256 struct cli_state *cli,
257 struct rpc_pipe_client *pipe_hnd,
258 TALLOC_CTX *mem_ctx,
259 int argc,
260 const char **argv);
261 NTSTATUS rpc_printer_publish_update_internals(struct net_context *c,
262 const struct dom_sid *domain_sid,
263 const char *domain_name,
264 struct cli_state *cli,
265 struct rpc_pipe_client *pipe_hnd,
266 TALLOC_CTX *mem_ctx,
267 int argc,
268 const char **argv);
269 NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
270 const struct dom_sid *domain_sid,
271 const char *domain_name,
272 struct cli_state *cli,
273 struct rpc_pipe_client *pipe_hnd,
274 TALLOC_CTX *mem_ctx,
275 int argc,
276 const char **argv);
277 NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
278 const struct dom_sid *domain_sid,
279 const char *domain_name,
280 struct cli_state *cli,
281 struct rpc_pipe_client *pipe_hnd,
282 TALLOC_CTX *mem_ctx,
283 int argc,
284 const char **argv);
285 NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
286 const struct dom_sid *domain_sid,
287 const char *domain_name,
288 struct cli_state *cli,
289 struct rpc_pipe_client *pipe_hnd,
290 TALLOC_CTX *mem_ctx,
291 int argc,
292 const char **argv);
293 NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
294 const struct dom_sid *domain_sid,
295 const char *domain_name,
296 struct cli_state *cli,
297 struct rpc_pipe_client *pipe_hnd,
298 TALLOC_CTX *mem_ctx,
299 int argc,
300 const char **argv);
301 NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
302 const struct dom_sid *domain_sid,
303 const char *domain_name,
304 struct cli_state *cli,
305 struct rpc_pipe_client *pipe_hnd,
306 TALLOC_CTX *mem_ctx,
307 int argc,
308 const char **argv);
309 NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
310 const struct dom_sid *domain_sid,
311 const char *domain_name,
312 struct cli_state *cli,
313 struct rpc_pipe_client *pipe_hnd,
314 TALLOC_CTX *mem_ctx,
315 int argc,
316 const char **argv);
318 /* The following definitions come from utils/net_rpc_registry.c */
320 int net_rpc_registry(struct net_context *c, int argc, const char **argv);
322 /* The following definitions come from utils/net_rpc_rights.c */
324 int net_rpc_rights(struct net_context *c, int argc, const char **argv);
325 struct rpc_sh_cmd *net_rpc_rights_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
326 struct rpc_sh_ctx *ctx);
328 /* The following definitions come from utils/net_rpc_samsync.c */
330 int rpc_vampire_usage(struct net_context *c, int argc, const char **argv);
331 int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv);
332 int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv);
334 /* The following definitions come from utils/net_rpc_service.c */
336 const char *svc_status_string( uint32_t state );
337 int net_rpc_service(struct net_context *c, int argc, const char **argv);
339 /* The following definitions come from utils/net_rpc_sh_acct.c */
341 struct rpc_sh_cmd *net_rpc_acct_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
342 struct rpc_sh_ctx *ctx);
344 /* The following definitions come from utils/net_rpc_shell.c */
346 int net_rpc_shell(struct net_context *c, int argc, const char **argv);
348 /* The following definitions come from utils/net_sam.c */
350 int net_sam(struct net_context *c, int argc, const char **argv);
352 /* The following definitions come from utils/net_share.c */
354 int net_share_usage(struct net_context *c, int argc, const char **argv);
355 int net_share(struct net_context *c, int argc, const char **argv);
357 /* The following definitions come from utils/net_status.c */
359 int net_status_usage(struct net_context *c, int argc, const char **argv);
360 int net_status(struct net_context *c, int argc, const char **argv);
362 /* The following definitions come from utils/net_time.c */
364 int net_time_usage(struct net_context *c, int argc, const char **argv);
365 int net_time(struct net_context *c, int argc, const char **argv);
367 /* The following definitions come from utils/net_user.c */
369 int net_user_usage(struct net_context *c, int argc, const char **argv);
370 int net_user(struct net_context *c, int argc, const char **argv);
372 /* The following definitions come from utils/net_usershare.c */
374 int net_usershare_usage(struct net_context *c, int argc, const char **argv);
375 int net_usershare_help(struct net_context *c, int argc, const char **argv);
376 int net_usershare(struct net_context *c, int argc, const char **argv);
378 /* The following definitions come from utils/net_eventlog.c */
380 int net_eventlog(struct net_context *c, int argc, const char **argv);
382 /* The following definitions come from utils/net_printing.c */
384 int net_printing(struct net_context *c, int argc, const char **argv);
386 /* The following definitions come from utils/net_serverid.c */
388 int net_serverid(struct net_context *c, int argc, const char **argv);
390 /* The following definitions come from utils/net_util.c */
392 NTSTATUS net_rpc_lookup_name(struct net_context *c,
393 TALLOC_CTX *mem_ctx, struct cli_state *cli,
394 const char *name, const char **ret_domain,
395 const char **ret_name, struct dom_sid *ret_sid,
396 enum lsa_SidType *ret_type);
397 NTSTATUS connect_to_service(struct net_context *c,
398 struct cli_state **cli_ctx,
399 const struct sockaddr_storage *server_ss,
400 const char *server_name,
401 const char *service_name,
402 const char *service_type);
403 NTSTATUS connect_to_ipc(struct net_context *c,
404 struct cli_state **cli_ctx,
405 const struct sockaddr_storage *server_ss,
406 const char *server_name);
407 NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
408 struct cli_state **cli_ctx,
409 const struct sockaddr_storage *server_ss,
410 const char *server_name);
411 NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
412 struct rpc_pipe_client **pp_pipe_hnd,
413 const struct ndr_interface_table *table);
414 int net_use_krb_machine_account(struct net_context *c);
415 bool net_find_server(struct net_context *c,
416 const char *domain,
417 unsigned flags,
418 struct sockaddr_storage *server_ss,
419 char **server_name);
420 bool net_find_pdc(struct sockaddr_storage *server_ss,
421 fstring server_name,
422 const char *domain_name);
423 NTSTATUS net_make_ipc_connection(struct net_context *c, unsigned flags,
424 struct cli_state **pcli);
425 NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
426 const char *server,
427 const struct sockaddr_storage *pss,
428 unsigned flags, struct cli_state **pcli);
429 const char *net_prompt_pass(struct net_context *c, const char *user);
430 int net_run_function(struct net_context *c, int argc, const char **argv,
431 const char *whoami, struct functable *table);
432 void net_display_usage_from_functable(struct functable *table);
434 const char *net_share_type_str(int num_type);
436 NTSTATUS net_scan_dc(struct net_context *c,
437 struct cli_state *cli,
438 struct net_dc_info *dc_info);
440 /* The following definitions come from utils/netlookup.c */
442 NTSTATUS net_lookup_name_from_sid(struct net_context *c,
443 TALLOC_CTX *ctx,
444 struct dom_sid *psid,
445 const char **ppdomain,
446 const char **ppname);
447 NTSTATUS net_lookup_sid_from_name(struct net_context *c, TALLOC_CTX *ctx,
448 const char *full_name, struct dom_sid *pret_sid);
450 /* The following definitions come from utils/net_g_lock.c */
451 int net_g_lock(struct net_context *c, int argc, const char **argv);
453 /* The following definitions come from utils/net_rpc_trust.c */
454 int net_rpc_trust(struct net_context *c, int argc, const char **argv);
456 /* The following definitions come from utils/net_rpc_conf.c */
457 int net_rpc_conf(struct net_context *c, int argc, const char **argv);
459 int net_notify(struct net_context *c, int argc, const char **argv);
461 int net_tdb(struct net_context *c, int argc, const char **argv);
463 int net_vfs(struct net_context *c, int argc, const char **argv);
465 #endif /* _NET_PROTO_H_ */