net: Move includes to net.h
authorKai Blin <kai@samba.org>
Wed, 21 May 2008 08:47:59 +0000 (10:47 +0200)
committerKai Blin <kai@samba.org>
Tue, 10 Jun 2008 07:45:09 +0000 (09:45 +0200)
(This used to be commit 1943e2752d4dcb5bbbd4e40cf854efba4aed8f45)

source3/include/includes.h
source3/utils/net.h

index d9c699a4391d57a93832bdd89d4a73a32f825784..adbf8f791df81aa17feb5895fd626f7528ab74eb 100644 (file)
@@ -726,20 +726,6 @@ typedef char fstring[FSTRING_LEN];
 
 #include "lib/smbconf/smbconf.h"
 
-/* used in net.c */
-struct net_context;
-
-struct functable {
-       const char *funcname;
-       int (*fn)(struct net_context *c, int argc, const char **argv);
-};
-
-struct functable2 {
-       const char *funcname;
-       int (*fn)(struct net_context *c, int argc, const char **argv);
-       const char *helptext;
-};
-
 /* Defines for wisXXX functions. */
 #define UNI_UPPER    0x1
 #define UNI_LOWER    0x2
index 80024bd958a7c4f2fe205539ebe60bf66d2e8ab1..a5078d026644cec9ab8202a9ec5b80029762e83e 100644 (file)
 
 #include "lib/netapi/netapi.h"
 
+struct net_context {
+       const char *opt_requester_name;
+       const char *opt_host;
+       const char *opt_password;
+       const char *opt_user_name;
+       bool opt_user_specified;
+       const char *opt_workgroup;
+       int opt_long_list_entries;
+       int opt_reboot;
+       int opt_force;
+       int opt_stdin;
+       int opt_port;
+       int opt_verbose;
+       int opt_maxusers;
+       const char *opt_comment;
+       const char *opt_container;
+       int opt_flags;
+       int opt_timeout;
+       const char *opt_target_workgroup;
+       int opt_machine_pass;
+       int opt_localgroup;
+       int opt_domaingroup;
+       int do_talloc_report;
+       const char *opt_newntname;
+       int opt_rid;
+       int opt_acls;
+       int opt_attrs;
+       int opt_timestamps;
+       const char *opt_exclude;
+       const char *opt_destination;
+       int opt_testmode;
+
+       int opt_have_ip;
+       struct sockaddr_storage opt_dest_ip;
+       bool smb_encrypt;
+       struct libnetapi_ctx *netapi_ctx;
+
+       const char *share_type[];
+};
+
+#define NET_TRANSPORT_LOCAL 0x01
+#define NET_TRANSPORT_RAP   0x02
+#define NET_TRANSPORT_RPC   0x04
+#define NET_TRANSPROT_ADS   0x08
+
+struct functable {
+       const char *funcname;
+       int (*fn)(struct net_context *c, int argc, const char **argv);
+};
+
+struct functable2 {
+       const char *funcname;
+       int (*fn)(struct net_context *c, int argc, const char **argv);
+       const char *helptext;
+};
+
+struct functable3 {
+       const char *funcname;
+       int (*fn)(struct net_context *c, int argc, const char **argv);
+       int valid_transports;
+       const char *description;
+       const char *usage;
+};
+
 typedef NTSTATUS (*rpc_command_fn)(struct net_context *c,
                                const DOM_SID *,
                                const char *,
@@ -69,46 +133,6 @@ struct rpc_sh_cmd {
 
 enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD };
 
-struct net_context {
-       const char *opt_requester_name;
-       const char *opt_host;
-       const char *opt_password;
-       const char *opt_user_name;
-       bool opt_user_specified;
-       const char *opt_workgroup;
-       int opt_long_list_entries;
-       int opt_reboot;
-       int opt_force;
-       int opt_stdin;
-       int opt_port;
-       int opt_verbose;
-       int opt_maxusers;
-       const char *opt_comment;
-       const char *opt_container;
-       int opt_flags;
-       int opt_timeout;
-       const char *opt_target_workgroup;
-       int opt_machine_pass;
-       int opt_localgroup;
-       int opt_domaingroup;
-       int do_talloc_report;
-       const char *opt_newntname;
-       int opt_rid;
-       int opt_acls;
-       int opt_attrs;
-       int opt_timestamps;
-       const char *opt_exclude;
-       const char *opt_destination;
-       int opt_testmode;
-
-       int opt_have_ip;
-       struct sockaddr_storage opt_dest_ip;
-       bool smb_encrypt;
-       struct libnetapi_ctx *netapi_ctx;
-
-       const char *share_type[];
-};
-
 /* INCLUDE FILES */
 
 #include "utils/net_proto.h"