2 Unix SMB/CIFS implementation.
4 SMB composite request interfaces
6 Copyright (C) Andrew Tridgell 2005
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 this defines the structures associated with "composite"
24 requests. Composite requests are libcli requests that are internally
25 implemented as multiple libcli/raw/ calls, but can be treated as a
26 single call via these composite calls. The composite calls are
27 particularly designed to be used in async applications
32 a composite open/read(s)/close request that loads a whole file
33 into memory. Used as a demo of the composite system.
35 struct smb_composite_loadfile {
45 struct smb_composite_fetchfile {
47 const char *dest_host;
49 const char *called_name;
51 const char *service_type;
52 struct cli_credentials *credentials;
53 const char *workgroup;
63 a composite open/write(s)/close request that saves a whole file from
64 memory. Used as a demo of the composite system.
66 struct smb_composite_savefile {
76 a composite request for a full connection to a remote server. Includes
78 - socket establishment
84 struct smb_composite_connect {
86 const char *dest_host;
87 const char **dest_ports;
88 const char *called_name;
90 const char *service_type;
91 struct cli_credentials *credentials;
92 bool fallback_to_anonymous;
93 const char *workgroup;
96 struct smbcli_tree *tree;
97 bool anonymous_fallback_done;
103 generic session setup interface that takes care of which
104 session setup varient to use
106 struct smb_composite_sesssetup {
109 uint32_t capabilities;
110 struct cli_credentials *credentials;
111 const char *workgroup;
119 query file system info
121 struct smb_composite_fsinfo {
123 const char *dest_host;
124 const char **dest_ports;
125 const char *called_name;
127 const char *service_type;
128 struct cli_credentials *credentials;
129 const char *workgroup;
130 enum smb_fsinfo_level level;
134 union smb_fsinfo *fsinfo;
139 composite call for appending new acl to the file's security descriptor and get
143 struct smb_composite_appendacl {
147 const struct security_descriptor *sd;
151 struct security_descriptor *sd;
156 a composite API to fire connect() calls to multiple targets, picking the
160 struct smb_composite_connectmulti {
163 const char **hostnames;
164 const char **addresses;
165 int *ports; /* Either NULL for lp_smb_ports() per
166 * destination or a list of explicit ports */
169 struct smbcli_socket *socket;
173 struct smbcli_session;
175 #include "libcli/smb_composite/proto.h"