X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=source3%2Futils%2Fnet.h;h=5e70fd3aafadfedb1cf1557434d49847d43cc0c7;hb=d881f0c8a0ce2fc7cabf1966c5724e72c70d6694;hp=5dd5a3501dc0789aa4f43734284c9621a025ed5d;hpb=5330164ec4f40d7b9731a2d60643432c226ffc03;p=bbaumbach%2Fsamba-autobuild%2F.git diff --git a/source3/utils/net.h b/source3/utils/net.h index 5dd5a3501dc..5e70fd3aafa 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -22,8 +22,22 @@ * include */ -#include "lib/netapi/netapi.h" -#include "libnet/libnet.h" +struct cli_state; + +#include "../librpc/gen_ndr/lsa.h" + +#include "intl.h" +#ifdef HAVE_LIBINTL_H +#include +#endif + +#if defined(HAVE_GETTEXT) && !defined(__LCLINT__) +#define _(foo) gettext(foo) +#else +#define _(foo) foo +#endif + +#define MODULE_NAME "net" struct net_context { const char *opt_requester_name; @@ -43,6 +57,7 @@ struct net_context { const char *opt_container; int opt_flags; int opt_timeout; + int opt_request_timeout; const char *opt_target_workgroup; int opt_machine_pass; int opt_localgroup; @@ -56,17 +71,41 @@ struct net_context { const char *opt_exclude; const char *opt_destination; int opt_testmode; - bool opt_kerberos; + int opt_kerberos; int opt_force_full_repl; + int opt_ccache; + int opt_single_obj_repl; + int opt_clean_old_entries; + const char *opt_db; + int opt_lock; + int opt_auto; + int opt_repair; + int opt_reg_version; + const char *opt_output; + int opt_wipe; + const char *opt_precheck; + int opt_no_dns_updates; + int opt_keep_account; int opt_have_ip; struct sockaddr_storage opt_dest_ip; bool smb_encrypt; struct libnetapi_ctx *netapi_ctx; + struct messaging_context *msg_ctx; + struct netlogon_creds_cli_context *netlogon_creds; bool display_usage; void *private_data; - const char *share_type[]; +}; + +struct net_dc_info { + bool is_dc; + bool is_pdc; + bool is_ad; + bool is_mixed_mode; + const char *netbios_domain_name; + const char *dns_domain_name; + const char *forest_name; }; #define NET_TRANSPORT_LOCAL 0x01 @@ -83,7 +122,7 @@ struct functable { }; typedef NTSTATUS (*rpc_command_fn)(struct net_context *c, - const DOM_SID *, + const struct dom_sid *, const char *, struct cli_state *cli, struct rpc_pipe_client *, @@ -96,14 +135,14 @@ typedef struct copy_clistate { struct cli_state *cli_share_src; struct cli_state *cli_share_dst; char *cwd; - uint16 attribute; + uint16_t attribute; struct net_context *c; }copy_clistate; struct rpc_sh_ctx { struct cli_state *cli; - DOM_SID *domain_sid; + struct dom_sid *domain_sid; const char *domain_name; const char *whoami; @@ -117,7 +156,7 @@ struct rpc_sh_cmd { struct rpc_sh_cmd *(*sub)(struct net_context *c, TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx); - const struct ndr_syntax_id *interface; + const struct ndr_interface_table *table; NTSTATUS (*fn)(struct net_context *c, TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx, struct rpc_pipe_client *pipe_hnd, @@ -145,6 +184,8 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD }; #define NET_FLAGS_NO_PIPE 0x00000020 /* don't open an RPC pipe */ #define NET_FLAGS_SIGN 0x00000040 /* sign RPC connection */ #define NET_FLAGS_SEAL 0x00000080 /* seal RPC connection */ +#define NET_FLAGS_TCP 0x00000100 /* use ncacn_ip_tcp */ +#define NET_FLAGS_EXPECT_FALLBACK 0x00000200 /* the caller will fallback */ /* net share operation modes */ #define NET_MODE_SHARE_MIGRATE 1