s3:net: use dcerpc_spoolss_X() functions
[samba.git] / source3 / utils / net.h
index 4f59ff995ce052ff585bee6a1cb219612bdaa50c..d09d9905d7f64d959f2d69ea56fdcfa708a7ace7 100644 (file)
  * include
  */
 
-#include "lib/netapi/netapi.h"
-#include "libnet/libnet.h"
+#include "localedir.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;
@@ -43,6 +54,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,16 +68,30 @@ 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;
 
        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;
-       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
@@ -82,7 +108,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 *,
@@ -102,7 +128,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;
@@ -144,6 +170,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