ctdb-server: Clean up connection tracking functions
[samba4-gss.git] / source3 / utils / net_proto.h
blobbaca8575585969cefb721bf05cf0fe3a580baa7f
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 NTSTATUS net_update_dns_ext(struct net_context *c,
59 TALLOC_CTX *mem_ctx,
60 ADS_STRUCT *ads,
61 struct cli_credentials *creds,
62 const char *hostname,
63 struct sockaddr_storage *iplist,
64 int num_addrs, bool remove_host);
65 void net_ads_join_dns_updates(struct net_context *c, TALLOC_CTX *ctx, struct libnet_JoinCtx *r);
67 /* The following definitions come from utils/net_ads_gpo.c */
69 int net_ads_gpo(struct net_context *c, int argc, const char **argv);
71 /* The following definitions come from utils/net_cache.c */
73 int net_cache(struct net_context *c, int argc, const char **argv);
75 /* The following definitions come from utils/net_conf.c */
77 int net_conf(struct net_context *c, int argc, const char **argv);
79 /* The following definitions come from utils/net_dns.c */
81 int get_my_ip_address( struct sockaddr_storage **pp_ss );
83 /* The following definitions come from utils/net_dom.c */
85 int net_dom_usage(struct net_context *c, int argc, const char **argv);
86 int net_dom(struct net_context *c, int argc, const char **argv);
88 /* The following definitions come from utils/net_file.c */
90 int net_file_usage(struct net_context *c, int argc, const char **argv);
91 int net_file(struct net_context *c, int argc, const char **argv);
93 /* The following definitions come from utils/net_group.c */
95 int net_group_usage(struct net_context *c, int argc, const char **argv);
96 int net_group(struct net_context *c, int argc, const char **argv);
98 /* The following definitions come from utils/net_groupmap.c */
100 int net_groupmap_usage(struct net_context *c, int argc, const char **argv);
101 int net_groupmap(struct net_context *c, int argc, const char **argv);
103 /* The following definitions come from utils/net_help.c */
105 int net_help(struct net_context *c, int argc, const char **argv);
107 /* The following definitions come from utils/net_idmap.c */
109 int net_idmap(struct net_context *c, int argc, const char **argv);
111 /* The following definitions come from utils/net_join.c */
113 int net_join_usage(struct net_context *c, int argc, const char **argv);
114 int net_join(struct net_context *c, int argc, const char **argv);
116 /* The following definitions come from source3/utils/net_offlinejoin.c */
118 int net_offlinejoin_usage(struct net_context *c, int argc, const char **argv);
119 int net_offlinejoin(struct net_context *c, int argc, const char **argv);
120 int net_offlinejoin_provision(struct net_context *c,
121 int argc, const char **argv);
122 int net_offlinejoin_requestodj(struct net_context *c,
123 int argc, const char **argv);
124 int net_offlinejoin_composeodj(struct net_context *c,
125 int argc, const char **argv);
127 /* The following definitions come from utils/net_lookup.c */
129 int net_lookup_usage(struct net_context *c, int argc, const char **argv);
130 int net_lookup(struct net_context *c, int argc, const char **argv);
132 /* The following definitions come from utils/net_rap.c */
134 int net_rap_file_usage(struct net_context *c, int argc, const char **argv);
135 int net_rap_file(struct net_context *c, int argc, const char **argv);
136 int net_rap_share_usage(struct net_context *c, int argc, const char **argv);
137 int net_rap_share(struct net_context *c, int argc, const char **argv);
138 int net_rap_session_usage(struct net_context *c, int argc, const char **argv);
139 int net_rap_session(struct net_context *c, int argc, const char **argv);
140 int net_rap_server_usage(struct net_context *c, int argc, const char **argv);
141 int net_rap_server(struct net_context *c, int argc, const char **argv);
142 int net_rap_domain_usage(struct net_context *c, int argc, const char **argv);
143 int net_rap_domain(struct net_context *c, int argc, const char **argv);
144 int net_rap_printq_usage(struct net_context *c, int argc, const char **argv);
145 int net_rap_printq(struct net_context *c, int argc, const char **argv);
146 int net_rap_user(struct net_context *c, int argc, const char **argv);
147 int net_rap_group_usage(struct net_context *c, int argc, const char **argv);
148 int net_rap_group(struct net_context *c, int argc, const char **argv);
149 int net_rap_groupmember_usage(struct net_context *c, int argc, const char **argv);
150 int net_rap_groupmember(struct net_context *c, int argc, const char **argv);
151 int net_rap_validate_usage(struct net_context *c, int argc, const char **argv);
152 int net_rap_validate(struct net_context *c, int argc, const char **argv);
153 int net_rap_service_usage(struct net_context *c, int argc, const char **argv);
154 int net_rap_service(struct net_context *c, int argc, const char **argv);
155 int net_rap_password_usage(struct net_context *c, int argc, const char **argv);
156 int net_rap_password(struct net_context *c, int argc, const char **argv);
157 int net_rap_admin_usage(struct net_context *c, int argc, const char **argv);
158 int net_rap_admin(struct net_context *c, int argc, const char **argv);
159 int net_rap(struct net_context *c, int argc, const char **argv);
161 /* The following definitions come from utils/net_registry.c */
163 int net_registry(struct net_context *c, int argc, const char **argv);
165 /* The following definitions come from utils/net_rpc.c */
167 NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
168 struct dom_sid **domain_sid,
169 const char **domain_name);
170 int run_rpc_command(struct net_context *c,
171 struct cli_state *cli_arg,
172 const struct ndr_interface_table *table,
173 int conn_flags,
174 rpc_command_fn fn,
175 int argc,
176 const char **argv);
177 int net_rpc_changetrustpw(struct net_context *c, int argc, const char **argv);
178 int net_rpc_testjoin(struct net_context *c, int argc, const char **argv);
179 int net_rpc_join(struct net_context *c, int argc, const char **argv);
180 NTSTATUS rpc_info_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 int net_rpc_info(struct net_context *c, int argc, const char **argv);
189 int net_rpc_getsid(struct net_context *c, int argc, const char **argv);
190 int net_rpc_user(struct net_context *c, int argc, const char **argv);
191 struct rpc_sh_cmd *net_rpc_user_edit_cmds(struct net_context *c,
192 TALLOC_CTX *mem_ctx,
193 struct rpc_sh_ctx *ctx);
194 struct rpc_sh_cmd *net_rpc_user_cmds(struct net_context *c,
195 TALLOC_CTX *mem_ctx,
196 struct rpc_sh_ctx *ctx);
197 int net_rpc_group(struct net_context *c, int argc, const char **argv);
198 bool copy_top_level_perms(struct net_context *c,
199 struct copy_clistate *cp_clistate,
200 const char *sharename);
201 int net_usersidlist(struct net_context *c, int argc, const char **argv);
202 int net_usersidlist_usage(struct net_context *c, int argc, const char **argv);
203 int net_rpc_share(struct net_context *c, int argc, const char **argv);
204 struct rpc_sh_cmd *net_rpc_share_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
205 struct rpc_sh_ctx *ctx);
206 int net_rpc_file(struct net_context *c, int argc, const char **argv);
207 NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
208 const struct dom_sid *domain_sid,
209 const char *domain_name,
210 struct cli_state *cli,
211 struct rpc_pipe_client *pipe_hnd,
212 TALLOC_CTX *mem_ctx,
213 int argc,
214 const char **argv);
215 NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
216 const struct dom_sid *domain_sid,
217 const char *domain_name,
218 struct cli_state *cli,
219 struct rpc_pipe_client *pipe_hnd,
220 TALLOC_CTX *mem_ctx,
221 int argc,
222 const char **argv);
223 bool net_rpc_check(struct net_context *c, unsigned flags);
224 int rpc_printer_migrate(struct net_context *c, int argc, const char **argv);
225 int rpc_printer_usage(struct net_context *c, int argc, const char **argv);
226 int net_rpc_printer(struct net_context *c, int argc, const char **argv);
227 int net_rpc(struct net_context *c, int argc, const char **argv);
229 /* The following definitions come from utils/net_rpc_audit.c */
231 int net_rpc_audit(struct net_context *c, int argc, const char **argv);
233 /* The following definitions come from utils/net_rpc_printer.c */
235 NTSTATUS net_copy_fileattr(struct net_context *c,
236 TALLOC_CTX *mem_ctx,
237 struct cli_state *cli_share_src,
238 struct cli_state *cli_share_dst,
239 const char *src_name, const char *dst_name,
240 bool copy_acls, bool copy_attrs,
241 bool copy_timestamps, bool is_file);
242 NTSTATUS net_copy_file(struct net_context *c,
243 TALLOC_CTX *mem_ctx,
244 struct cli_state *cli_share_src,
245 struct cli_state *cli_share_dst,
246 const char *src_name, const char *dst_name,
247 bool copy_acls, bool copy_attrs,
248 bool copy_timestamps, bool is_file);
249 NTSTATUS rpc_printer_list_internals(struct net_context *c,
250 const struct dom_sid *domain_sid,
251 const char *domain_name,
252 struct cli_state *cli,
253 struct rpc_pipe_client *pipe_hnd,
254 TALLOC_CTX *mem_ctx,
255 int argc,
256 const char **argv);
257 NTSTATUS rpc_printer_driver_list_internals(struct net_context *c,
258 const struct dom_sid *domain_sid,
259 const char *domain_name,
260 struct cli_state *cli,
261 struct rpc_pipe_client *pipe_hnd,
262 TALLOC_CTX *mem_ctx,
263 int argc,
264 const char **argv);
265 NTSTATUS rpc_printer_publish_publish_internals(struct net_context *c,
266 const struct dom_sid *domain_sid,
267 const char *domain_name,
268 struct cli_state *cli,
269 struct rpc_pipe_client *pipe_hnd,
270 TALLOC_CTX *mem_ctx,
271 int argc,
272 const char **argv);
273 NTSTATUS rpc_printer_publish_unpublish_internals(struct net_context *c,
274 const struct dom_sid *domain_sid,
275 const char *domain_name,
276 struct cli_state *cli,
277 struct rpc_pipe_client *pipe_hnd,
278 TALLOC_CTX *mem_ctx,
279 int argc,
280 const char **argv);
281 NTSTATUS rpc_printer_publish_update_internals(struct net_context *c,
282 const struct dom_sid *domain_sid,
283 const char *domain_name,
284 struct cli_state *cli,
285 struct rpc_pipe_client *pipe_hnd,
286 TALLOC_CTX *mem_ctx,
287 int argc,
288 const char **argv);
289 NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
290 const struct dom_sid *domain_sid,
291 const char *domain_name,
292 struct cli_state *cli,
293 struct rpc_pipe_client *pipe_hnd,
294 TALLOC_CTX *mem_ctx,
295 int argc,
296 const char **argv);
297 NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
298 const struct dom_sid *domain_sid,
299 const char *domain_name,
300 struct cli_state *cli,
301 struct rpc_pipe_client *pipe_hnd,
302 TALLOC_CTX *mem_ctx,
303 int argc,
304 const char **argv);
305 NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
306 const struct dom_sid *domain_sid,
307 const char *domain_name,
308 struct cli_state *cli,
309 struct rpc_pipe_client *pipe_hnd,
310 TALLOC_CTX *mem_ctx,
311 int argc,
312 const char **argv);
313 NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
314 const struct dom_sid *domain_sid,
315 const char *domain_name,
316 struct cli_state *cli,
317 struct rpc_pipe_client *pipe_hnd,
318 TALLOC_CTX *mem_ctx,
319 int argc,
320 const char **argv);
321 NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
322 const struct dom_sid *domain_sid,
323 const char *domain_name,
324 struct cli_state *cli,
325 struct rpc_pipe_client *pipe_hnd,
326 TALLOC_CTX *mem_ctx,
327 int argc,
328 const char **argv);
329 NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
330 const struct dom_sid *domain_sid,
331 const char *domain_name,
332 struct cli_state *cli,
333 struct rpc_pipe_client *pipe_hnd,
334 TALLOC_CTX *mem_ctx,
335 int argc,
336 const char **argv);
338 /* The following definitions come from utils/net_rpc_registry.c */
340 int net_rpc_registry(struct net_context *c, int argc, const char **argv);
342 /* The following definitions come from utils/net_rpc_rights.c */
344 int net_rpc_rights(struct net_context *c, int argc, const char **argv);
345 struct rpc_sh_cmd *net_rpc_rights_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
346 struct rpc_sh_ctx *ctx);
348 /* The following definitions come from utils/net_rpc_samsync.c */
350 int rpc_vampire_usage(struct net_context *c, int argc, const char **argv);
351 int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv);
352 int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv);
354 /* The following definitions come from utils/net_rpc_service.c */
356 const char *svc_status_string( uint32_t state );
357 int net_rpc_service(struct net_context *c, int argc, const char **argv);
359 /* The following definitions come from utils/net_rpc_sh_acct.c */
361 struct rpc_sh_cmd *net_rpc_acct_cmds(struct net_context *c, TALLOC_CTX *mem_ctx,
362 struct rpc_sh_ctx *ctx);
364 /* The following definitions come from utils/net_rpc_shell.c */
366 int net_rpc_shell(struct net_context *c, int argc, const char **argv);
368 /* The following definitions come from utils/net_sam.c */
370 int net_sam(struct net_context *c, int argc, const char **argv);
372 /* The following definitions come from utils/net_share.c */
374 int net_share_usage(struct net_context *c, int argc, const char **argv);
375 int net_share(struct net_context *c, int argc, const char **argv);
377 /* The following definitions come from utils/net_status.c */
379 int net_status_usage(struct net_context *c, int argc, const char **argv);
380 int net_status(struct net_context *c, int argc, const char **argv);
382 /* The following definitions come from utils/net_time.c */
384 int net_time_usage(struct net_context *c, int argc, const char **argv);
385 int net_time(struct net_context *c, int argc, const char **argv);
387 /* The following definitions come from utils/net_user.c */
389 int net_user_usage(struct net_context *c, int argc, const char **argv);
390 int net_user(struct net_context *c, int argc, const char **argv);
392 /* The following definitions come from utils/net_usershare.c */
394 int net_usershare_usage(struct net_context *c, int argc, const char **argv);
395 int net_usershare_help(struct net_context *c, int argc, const char **argv);
396 int net_usershare(struct net_context *c, int argc, const char **argv);
398 /* The following definitions come from utils/net_eventlog.c */
400 int net_eventlog(struct net_context *c, int argc, const char **argv);
402 /* The following definitions come from utils/net_printing.c */
404 int net_printing(struct net_context *c, int argc, const char **argv);
406 /* The following definitions come from utils/net_serverid.c */
408 int net_serverid(struct net_context *c, int argc, const char **argv);
410 /* The following definitions come from utils/net_util.c */
412 NTSTATUS net_rpc_lookup_name(struct net_context *c,
413 TALLOC_CTX *mem_ctx, struct cli_state *cli,
414 const char *name, const char **ret_domain,
415 const char **ret_name, struct dom_sid *ret_sid,
416 enum lsa_SidType *ret_type);
417 NTSTATUS connect_to_service(struct net_context *c,
418 struct cli_state **cli_ctx,
419 const struct sockaddr_storage *server_ss,
420 const char *server_name,
421 const char *service_name,
422 const char *service_type);
423 NTSTATUS connect_to_ipc(struct net_context *c,
424 struct cli_state **cli_ctx,
425 const struct sockaddr_storage *server_ss,
426 const char *server_name);
427 NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
428 struct cli_state **cli_ctx,
429 const struct sockaddr_storage *server_ss,
430 const char *server_name);
431 NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
432 struct rpc_pipe_client **pp_pipe_hnd,
433 const struct ndr_interface_table *table);
434 int net_use_krb_machine_account(struct net_context *c);
435 bool net_find_server(struct net_context *c,
436 const char *domain,
437 unsigned flags,
438 struct sockaddr_storage *server_ss,
439 char **server_name);
440 bool net_find_pdc(struct sockaddr_storage *server_ss,
441 fstring server_name,
442 const char *domain_name);
443 NTSTATUS net_make_ipc_connection(struct net_context *c, unsigned flags,
444 struct cli_state **pcli);
445 NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
446 const char *server,
447 const struct sockaddr_storage *pss,
448 unsigned flags, struct cli_state **pcli);
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,
464 TALLOC_CTX *ctx,
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_ */