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/>.
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 */
36 ADS_STATUS
ads_startup(struct net_context
*c
,
39 struct ads_struct
**ads
);
40 ADS_STATUS
ads_startup_nobind(struct net_context
*c
,
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
, ADS_STRUCT
*ads
,
62 struct sockaddr_storage
*iplist
,
63 int num_addrs
, bool remove_host
);
64 void net_ads_join_dns_updates(struct net_context
*c
, TALLOC_CTX
*ctx
, struct libnet_JoinCtx
*r
);
66 /* The following definitions come from utils/net_ads_gpo.c */
68 int net_ads_gpo(struct net_context
*c
, int argc
, const char **argv
);
70 /* The following definitions come from utils/net_cache.c */
72 int net_cache(struct net_context
*c
, int argc
, const char **argv
);
74 /* The following definitions come from utils/net_conf.c */
76 int net_conf(struct net_context
*c
, int argc
, const char **argv
);
78 /* The following definitions come from utils/net_dns.c */
80 int get_my_ip_address( struct sockaddr_storage
**pp_ss
);
82 /* The following definitions come from utils/net_dom.c */
84 int net_dom_usage(struct net_context
*c
, int argc
, const char **argv
);
85 int net_dom(struct net_context
*c
, int argc
, const char **argv
);
87 /* The following definitions come from utils/net_file.c */
89 int net_file_usage(struct net_context
*c
, int argc
, const char **argv
);
90 int net_file(struct net_context
*c
, int argc
, const char **argv
);
92 /* The following definitions come from utils/net_group.c */
94 int net_group_usage(struct net_context
*c
, int argc
, const char **argv
);
95 int net_group(struct net_context
*c
, int argc
, const char **argv
);
97 /* The following definitions come from utils/net_groupmap.c */
99 int net_groupmap_usage(struct net_context
*c
, int argc
, const char **argv
);
100 int net_groupmap(struct net_context
*c
, int argc
, const char **argv
);
102 /* The following definitions come from utils/net_help.c */
104 int net_help(struct net_context
*c
, int argc
, const char **argv
);
106 /* The following definitions come from utils/net_idmap.c */
108 int net_idmap(struct net_context
*c
, int argc
, const char **argv
);
110 /* The following definitions come from utils/net_join.c */
112 int net_join_usage(struct net_context
*c
, int argc
, const char **argv
);
113 int net_join(struct net_context
*c
, int argc
, const char **argv
);
115 /* The following definitions come from source3/utils/net_offlinejoin.c */
117 int net_offlinejoin_usage(struct net_context
*c
, int argc
, const char **argv
);
118 int net_offlinejoin(struct net_context
*c
, int argc
, const char **argv
);
119 int net_offlinejoin_provision(struct net_context
*c
,
120 int argc
, const char **argv
);
121 int net_offlinejoin_requestodj(struct net_context
*c
,
122 int argc
, const char **argv
);
123 int net_offlinejoin_composeodj(struct net_context
*c
,
124 int argc
, const char **argv
);
126 /* The following definitions come from utils/net_lookup.c */
128 int net_lookup_usage(struct net_context
*c
, int argc
, const char **argv
);
129 int net_lookup(struct net_context
*c
, int argc
, const char **argv
);
131 /* The following definitions come from utils/net_rap.c */
133 int net_rap_file_usage(struct net_context
*c
, int argc
, const char **argv
);
134 int net_rap_file(struct net_context
*c
, int argc
, const char **argv
);
135 int net_rap_share_usage(struct net_context
*c
, int argc
, const char **argv
);
136 int net_rap_share(struct net_context
*c
, int argc
, const char **argv
);
137 int net_rap_session_usage(struct net_context
*c
, int argc
, const char **argv
);
138 int net_rap_session(struct net_context
*c
, int argc
, const char **argv
);
139 int net_rap_server_usage(struct net_context
*c
, int argc
, const char **argv
);
140 int net_rap_server(struct net_context
*c
, int argc
, const char **argv
);
141 int net_rap_domain_usage(struct net_context
*c
, int argc
, const char **argv
);
142 int net_rap_domain(struct net_context
*c
, int argc
, const char **argv
);
143 int net_rap_printq_usage(struct net_context
*c
, int argc
, const char **argv
);
144 int net_rap_printq(struct net_context
*c
, int argc
, const char **argv
);
145 int net_rap_user(struct net_context
*c
, int argc
, const char **argv
);
146 int net_rap_group_usage(struct net_context
*c
, int argc
, const char **argv
);
147 int net_rap_group(struct net_context
*c
, int argc
, const char **argv
);
148 int net_rap_groupmember_usage(struct net_context
*c
, int argc
, const char **argv
);
149 int net_rap_groupmember(struct net_context
*c
, int argc
, const char **argv
);
150 int net_rap_validate_usage(struct net_context
*c
, int argc
, const char **argv
);
151 int net_rap_validate(struct net_context
*c
, int argc
, const char **argv
);
152 int net_rap_service_usage(struct net_context
*c
, int argc
, const char **argv
);
153 int net_rap_service(struct net_context
*c
, int argc
, const char **argv
);
154 int net_rap_password_usage(struct net_context
*c
, int argc
, const char **argv
);
155 int net_rap_password(struct net_context
*c
, int argc
, const char **argv
);
156 int net_rap_admin_usage(struct net_context
*c
, int argc
, const char **argv
);
157 int net_rap_admin(struct net_context
*c
, int argc
, const char **argv
);
158 int net_rap(struct net_context
*c
, int argc
, const char **argv
);
160 /* The following definitions come from utils/net_registry.c */
162 int net_registry(struct net_context
*c
, int argc
, const char **argv
);
164 /* The following definitions come from utils/net_rpc.c */
166 NTSTATUS
net_get_remote_domain_sid(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
167 struct dom_sid
**domain_sid
,
168 const char **domain_name
);
169 int run_rpc_command(struct net_context
*c
,
170 struct cli_state
*cli_arg
,
171 const struct ndr_interface_table
*table
,
176 int net_rpc_changetrustpw(struct net_context
*c
, int argc
, const char **argv
);
177 int net_rpc_testjoin(struct net_context
*c
, int argc
, const char **argv
);
178 int net_rpc_join(struct net_context
*c
, int argc
, const char **argv
);
179 NTSTATUS
rpc_info_internals(struct net_context
*c
,
180 const struct dom_sid
*domain_sid
,
181 const char *domain_name
,
182 struct cli_state
*cli
,
183 struct rpc_pipe_client
*pipe_hnd
,
187 int net_rpc_info(struct net_context
*c
, int argc
, const char **argv
);
188 int net_rpc_getsid(struct net_context
*c
, int argc
, const char **argv
);
189 int net_rpc_user(struct net_context
*c
, int argc
, const char **argv
);
190 struct rpc_sh_cmd
*net_rpc_user_edit_cmds(struct net_context
*c
,
192 struct rpc_sh_ctx
*ctx
);
193 struct rpc_sh_cmd
*net_rpc_user_cmds(struct net_context
*c
,
195 struct rpc_sh_ctx
*ctx
);
196 int net_rpc_group(struct net_context
*c
, int argc
, const char **argv
);
197 bool copy_top_level_perms(struct net_context
*c
,
198 struct copy_clistate
*cp_clistate
,
199 const char *sharename
);
200 int net_usersidlist(struct net_context
*c
, int argc
, const char **argv
);
201 int net_usersidlist_usage(struct net_context
*c
, int argc
, const char **argv
);
202 int net_rpc_share(struct net_context
*c
, int argc
, const char **argv
);
203 struct rpc_sh_cmd
*net_rpc_share_cmds(struct net_context
*c
, TALLOC_CTX
*mem_ctx
,
204 struct rpc_sh_ctx
*ctx
);
205 int net_rpc_file(struct net_context
*c
, int argc
, const char **argv
);
206 NTSTATUS
rpc_init_shutdown_internals(struct net_context
*c
,
207 const struct dom_sid
*domain_sid
,
208 const char *domain_name
,
209 struct cli_state
*cli
,
210 struct rpc_pipe_client
*pipe_hnd
,
214 NTSTATUS
rpc_reg_shutdown_internals(struct net_context
*c
,
215 const struct dom_sid
*domain_sid
,
216 const char *domain_name
,
217 struct cli_state
*cli
,
218 struct rpc_pipe_client
*pipe_hnd
,
222 bool net_rpc_check(struct net_context
*c
, unsigned flags
);
223 int rpc_printer_migrate(struct net_context
*c
, int argc
, const char **argv
);
224 int rpc_printer_usage(struct net_context
*c
, int argc
, const char **argv
);
225 int net_rpc_printer(struct net_context
*c
, int argc
, const char **argv
);
226 int net_rpc(struct net_context
*c
, int argc
, const char **argv
);
228 /* The following definitions come from utils/net_rpc_audit.c */
230 int net_rpc_audit(struct net_context
*c
, int argc
, const char **argv
);
232 /* The following definitions come from utils/net_rpc_printer.c */
234 NTSTATUS
net_copy_fileattr(struct net_context
*c
,
236 struct cli_state
*cli_share_src
,
237 struct cli_state
*cli_share_dst
,
238 const char *src_name
, const char *dst_name
,
239 bool copy_acls
, bool copy_attrs
,
240 bool copy_timestamps
, bool is_file
);
241 NTSTATUS
net_copy_file(struct net_context
*c
,
243 struct cli_state
*cli_share_src
,
244 struct cli_state
*cli_share_dst
,
245 const char *src_name
, const char *dst_name
,
246 bool copy_acls
, bool copy_attrs
,
247 bool copy_timestamps
, bool is_file
);
248 NTSTATUS
rpc_printer_list_internals(struct net_context
*c
,
249 const struct dom_sid
*domain_sid
,
250 const char *domain_name
,
251 struct cli_state
*cli
,
252 struct rpc_pipe_client
*pipe_hnd
,
256 NTSTATUS
rpc_printer_driver_list_internals(struct net_context
*c
,
257 const struct dom_sid
*domain_sid
,
258 const char *domain_name
,
259 struct cli_state
*cli
,
260 struct rpc_pipe_client
*pipe_hnd
,
264 NTSTATUS
rpc_printer_publish_publish_internals(struct net_context
*c
,
265 const struct dom_sid
*domain_sid
,
266 const char *domain_name
,
267 struct cli_state
*cli
,
268 struct rpc_pipe_client
*pipe_hnd
,
272 NTSTATUS
rpc_printer_publish_unpublish_internals(struct net_context
*c
,
273 const struct dom_sid
*domain_sid
,
274 const char *domain_name
,
275 struct cli_state
*cli
,
276 struct rpc_pipe_client
*pipe_hnd
,
280 NTSTATUS
rpc_printer_publish_update_internals(struct net_context
*c
,
281 const struct dom_sid
*domain_sid
,
282 const char *domain_name
,
283 struct cli_state
*cli
,
284 struct rpc_pipe_client
*pipe_hnd
,
288 NTSTATUS
rpc_printer_publish_list_internals(struct net_context
*c
,
289 const struct dom_sid
*domain_sid
,
290 const char *domain_name
,
291 struct cli_state
*cli
,
292 struct rpc_pipe_client
*pipe_hnd
,
296 NTSTATUS
rpc_printer_migrate_security_internals(struct net_context
*c
,
297 const struct dom_sid
*domain_sid
,
298 const char *domain_name
,
299 struct cli_state
*cli
,
300 struct rpc_pipe_client
*pipe_hnd
,
304 NTSTATUS
rpc_printer_migrate_forms_internals(struct net_context
*c
,
305 const struct dom_sid
*domain_sid
,
306 const char *domain_name
,
307 struct cli_state
*cli
,
308 struct rpc_pipe_client
*pipe_hnd
,
312 NTSTATUS
rpc_printer_migrate_drivers_internals(struct net_context
*c
,
313 const struct dom_sid
*domain_sid
,
314 const char *domain_name
,
315 struct cli_state
*cli
,
316 struct rpc_pipe_client
*pipe_hnd
,
320 NTSTATUS
rpc_printer_migrate_printers_internals(struct net_context
*c
,
321 const struct dom_sid
*domain_sid
,
322 const char *domain_name
,
323 struct cli_state
*cli
,
324 struct rpc_pipe_client
*pipe_hnd
,
328 NTSTATUS
rpc_printer_migrate_settings_internals(struct net_context
*c
,
329 const struct dom_sid
*domain_sid
,
330 const char *domain_name
,
331 struct cli_state
*cli
,
332 struct rpc_pipe_client
*pipe_hnd
,
337 /* The following definitions come from utils/net_rpc_registry.c */
339 int net_rpc_registry(struct net_context
*c
, int argc
, const char **argv
);
341 /* The following definitions come from utils/net_rpc_rights.c */
343 int net_rpc_rights(struct net_context
*c
, int argc
, const char **argv
);
344 struct rpc_sh_cmd
*net_rpc_rights_cmds(struct net_context
*c
, TALLOC_CTX
*mem_ctx
,
345 struct rpc_sh_ctx
*ctx
);
347 /* The following definitions come from utils/net_rpc_samsync.c */
349 int rpc_vampire_usage(struct net_context
*c
, int argc
, const char **argv
);
350 int rpc_vampire_passdb(struct net_context
*c
, int argc
, const char **argv
);
351 int rpc_vampire_keytab(struct net_context
*c
, int argc
, const char **argv
);
353 /* The following definitions come from utils/net_rpc_service.c */
355 const char *svc_status_string( uint32_t state
);
356 int net_rpc_service(struct net_context
*c
, int argc
, const char **argv
);
358 /* The following definitions come from utils/net_rpc_sh_acct.c */
360 struct rpc_sh_cmd
*net_rpc_acct_cmds(struct net_context
*c
, TALLOC_CTX
*mem_ctx
,
361 struct rpc_sh_ctx
*ctx
);
363 /* The following definitions come from utils/net_rpc_shell.c */
365 int net_rpc_shell(struct net_context
*c
, int argc
, const char **argv
);
367 /* The following definitions come from utils/net_sam.c */
369 int net_sam(struct net_context
*c
, int argc
, const char **argv
);
371 /* The following definitions come from utils/net_share.c */
373 int net_share_usage(struct net_context
*c
, int argc
, const char **argv
);
374 int net_share(struct net_context
*c
, int argc
, const char **argv
);
376 /* The following definitions come from utils/net_status.c */
378 int net_status_usage(struct net_context
*c
, int argc
, const char **argv
);
379 int net_status(struct net_context
*c
, int argc
, const char **argv
);
381 /* The following definitions come from utils/net_time.c */
383 int net_time_usage(struct net_context
*c
, int argc
, const char **argv
);
384 int net_time(struct net_context
*c
, int argc
, const char **argv
);
386 /* The following definitions come from utils/net_user.c */
388 int net_user_usage(struct net_context
*c
, int argc
, const char **argv
);
389 int net_user(struct net_context
*c
, int argc
, const char **argv
);
391 /* The following definitions come from utils/net_usershare.c */
393 int net_usershare_usage(struct net_context
*c
, int argc
, const char **argv
);
394 int net_usershare_help(struct net_context
*c
, int argc
, const char **argv
);
395 int net_usershare(struct net_context
*c
, int argc
, const char **argv
);
397 /* The following definitions come from utils/net_eventlog.c */
399 int net_eventlog(struct net_context
*c
, int argc
, const char **argv
);
401 /* The following definitions come from utils/net_printing.c */
403 int net_printing(struct net_context
*c
, int argc
, const char **argv
);
405 /* The following definitions come from utils/net_serverid.c */
407 int net_serverid(struct net_context
*c
, int argc
, const char **argv
);
409 /* The following definitions come from utils/net_util.c */
411 NTSTATUS
net_rpc_lookup_name(struct net_context
*c
,
412 TALLOC_CTX
*mem_ctx
, struct cli_state
*cli
,
413 const char *name
, const char **ret_domain
,
414 const char **ret_name
, struct dom_sid
*ret_sid
,
415 enum lsa_SidType
*ret_type
);
416 NTSTATUS
connect_to_service(struct net_context
*c
,
417 struct cli_state
**cli_ctx
,
418 const struct sockaddr_storage
*server_ss
,
419 const char *server_name
,
420 const char *service_name
,
421 const char *service_type
);
422 NTSTATUS
connect_to_ipc(struct net_context
*c
,
423 struct cli_state
**cli_ctx
,
424 const struct sockaddr_storage
*server_ss
,
425 const char *server_name
);
426 NTSTATUS
connect_to_ipc_anonymous(struct net_context
*c
,
427 struct cli_state
**cli_ctx
,
428 const struct sockaddr_storage
*server_ss
,
429 const char *server_name
);
430 NTSTATUS
connect_dst_pipe(struct net_context
*c
, struct cli_state
**cli_dst
,
431 struct rpc_pipe_client
**pp_pipe_hnd
,
432 const struct ndr_interface_table
*table
);
433 int net_use_krb_machine_account(struct net_context
*c
);
434 bool net_find_server(struct net_context
*c
,
437 struct sockaddr_storage
*server_ss
,
439 bool net_find_pdc(struct sockaddr_storage
*server_ss
,
441 const char *domain_name
);
442 NTSTATUS
net_make_ipc_connection(struct net_context
*c
, unsigned flags
,
443 struct cli_state
**pcli
);
444 NTSTATUS
net_make_ipc_connection_ex(struct net_context
*c
,const char *domain
,
446 const struct sockaddr_storage
*pss
,
447 unsigned flags
, struct cli_state
**pcli
);
448 const char *net_prompt_pass(struct net_context
*c
, const char *user
);
449 int net_run_function(struct net_context
*c
, int argc
, const char **argv
,
450 const char *whoami
, struct functable
*table
);
451 void net_display_usage_from_functable(struct functable
*table
);
453 void net_warn_member_options(void);
455 const char *net_share_type_str(int num_type
);
457 NTSTATUS
net_scan_dc(struct net_context
*c
,
458 struct cli_state
*cli
,
459 struct net_dc_info
*dc_info
);
461 /* The following definitions come from utils/netlookup.c */
463 NTSTATUS
net_lookup_name_from_sid(struct net_context
*c
,
465 struct dom_sid
*psid
,
466 const char **ppdomain
,
467 const char **ppname
);
468 NTSTATUS
net_lookup_sid_from_name(struct net_context
*c
, TALLOC_CTX
*ctx
,
469 const char *full_name
, struct dom_sid
*pret_sid
);
471 /* The following definitions come from utils/net_g_lock.c */
472 int net_g_lock(struct net_context
*c
, int argc
, const char **argv
);
474 /* The following definitions come from utils/net_rpc_trust.c */
475 int net_rpc_trust(struct net_context
*c
, int argc
, const char **argv
);
477 /* The following definitions come from utils/net_rpc_conf.c */
478 int net_rpc_conf(struct net_context
*c
, int argc
, const char **argv
);
480 int net_notify(struct net_context
*c
, int argc
, const char **argv
);
482 int net_tdb(struct net_context
*c
, int argc
, const char **argv
);
484 int net_vfs(struct net_context
*c
, int argc
, const char **argv
);
486 int net_witness(struct net_context
*c
, int argc
, const char **argv
);
488 #endif /* _NET_PROTO_H_ */