r10656: BIG merge from trunk. Features not copied over
[Samba/nascimento.git] / source3 / utils / net.h
blob2df13cfb8f1248d85e0ded24ba8ac10148d23f83
1 /*
2 Samba Unix/Linux SMB client library
3 Distributed SMB/CIFS Server Management Utility
4 Copyright (C) 2001 Andrew Bartlett (abartlet@samba.org)
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /*
21 * A function of this type is passed to the '
22 * run_rpc_command' wrapper. Must go before the net_proto.h
23 * include
26 typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *,
27 const char *,
28 struct cli_state *cli,
29 struct rpc_pipe_client *,
30 TALLOC_CTX *,
31 int,
32 const char **);
34 typedef struct copy_clistate {
35 TALLOC_CTX *mem_ctx;
36 struct cli_state *cli_share_src;
37 struct cli_state *cli_share_dst;
38 char *cwd;
39 uint16 attribute;
40 }copy_clistate;
42 /* INCLUDE FILES */
44 #include "utils/net_proto.h"
46 /* MACROS & DEFINES */
48 #define NET_FLAGS_MASTER 1
49 #define NET_FLAGS_DMB 2
51 /* Would it be insane to set 'localhost' as the default
52 remote host for this operation?
54 For example, localhost is insane for a 'join' operation.
56 #define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 4
58 /* We want to find the PDC only */
59 #define NET_FLAGS_PDC 8
61 /* We want an anonymous connection */
62 #define NET_FLAGS_ANONYMOUS 16
64 /* don't open an RPC pipe */
65 #define NET_FLAGS_NO_PIPE 32
67 /* net share operation modes */
68 #define NET_MODE_SHARE_MIGRATE 1
70 extern int opt_maxusers;
71 extern const char *opt_comment;
72 extern const char *opt_container;
73 extern int opt_flags;
75 extern const char *opt_comment;
77 extern const char *opt_target_workgroup;
78 extern const char *opt_workgroup;
79 extern int opt_long_list_entries;
80 extern int opt_verbose;
81 extern int opt_reboot;
82 extern int opt_force;
83 extern int opt_machine_pass;
84 extern int opt_timeout;
85 extern const char *opt_host;
86 extern const char *opt_user_name;
87 extern const char *opt_password;
88 extern BOOL opt_user_specified;
90 extern BOOL opt_localgroup;
91 extern BOOL opt_domaingroup;
92 extern const char *opt_newntname;
93 extern int opt_rid;
94 extern int opt_acls;
95 extern int opt_attrs;
96 extern int opt_timestamps;
97 extern const char *opt_exclude;
98 extern const char *opt_destination;
100 extern BOOL opt_have_ip;
101 extern struct in_addr opt_dest_ip;
103 extern const char *share_type[];
105 /* Structure for mapping accounts to groups */
106 /* Array element is the group rid */
107 typedef struct _groupmap {
108 uint32 rid;
109 uint32 gidNumber;
110 fstring sambaSID;
111 fstring group_dn;
112 } GROUPMAP;
114 typedef struct _accountmap {
115 uint32 rid;
116 fstring cn;
117 } ACCOUNTMAP;