s3-rpc_client: support AES encryption in netr_ServerPasswordSet2 client.
[kai/samba.git] / source3 / utils / net.h
index d88f962d41e6d8b1c5e7d6d325695c149e455cd4..2056d894d596e4ef012a9d04ef35ddf16cf32249 100644 (file)
  * 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 <libintl.h>
+#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;
@@ -57,15 +71,25 @@ 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_have_ip;
        struct sockaddr_storage opt_dest_ip;
        bool smb_encrypt;
        struct libnetapi_ctx *netapi_ctx;
+       struct messaging_context *msg_ctx;
 
        bool display_usage;
        void *private_data;
@@ -95,7 +119,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 *,
@@ -115,7 +139,7 @@ typedef struct 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;
@@ -129,7 +153,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,
@@ -157,6 +181,7 @@ 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 */
 
 /* net share operation modes */
 #define NET_MODE_SHARE_MIGRATE 1