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
30 #include "libcli/raw/signing.h"
31 #include "libcli/raw/libcliraw.h"
32 #include "libcli/smb2/smb2.h"
36 a composite open/read(s)/close request that loads a whole file
37 into memory. Used as a demo of the composite system.
39 struct smb_composite_loadfile {
49 struct smb_composite_fetchfile {
51 const char *dest_host;
53 const char *called_name;
55 const char *service_type;
56 struct cli_credentials *credentials;
57 const char *workgroup;
59 struct smbcli_options options;
60 struct smbcli_session_options session_options;
61 struct resolve_context *resolve_ctx;
70 a composite open/write(s)/close request that saves a whole file from
71 memory. Used as a demo of the composite system.
73 struct smb_composite_savefile {
83 a composite request for a full connection to a remote server. Includes
85 - socket establishment
88 - session setup (if credentials are not NULL)
89 - tree connect (if service is not NULL)
91 struct smb_composite_connect {
93 const char *dest_host;
94 const char **dest_ports;
95 const char *called_name;
97 const char *service_type;
98 struct cli_credentials *credentials;
99 bool fallback_to_anonymous;
100 const char *workgroup;
101 struct smbcli_options options;
102 struct smbcli_session_options session_options;
105 struct smbcli_tree *tree;
106 bool anonymous_fallback_done;
112 generic session setup interface that takes care of which
113 session setup varient to use
115 struct smb_composite_sesssetup {
118 uint32_t capabilities;
119 struct cli_credentials *credentials;
120 const char *workgroup;
128 query file system info
130 struct smb_composite_fsinfo {
132 const char *dest_host;
133 const char **dest_ports;
134 const char *called_name;
136 const char *service_type;
137 struct cli_credentials *credentials;
138 const char *workgroup;
139 enum smb_fsinfo_level level;
143 union smb_fsinfo *fsinfo;
148 composite call for appending new acl to the file's security descriptor and get
152 struct smb_composite_appendacl {
156 const struct security_descriptor *sd;
160 struct security_descriptor *sd;
165 a composite API to fire connect() calls to multiple targets, picking the
169 struct smb_composite_connectmulti {
172 const char **hostnames;
173 const char **addresses;
174 int *ports; /* Either NULL for lp_smb_ports() per
175 * destination or a list of explicit ports */
178 struct smbcli_socket *socket;
182 struct smbcli_session;
183 struct resolve_context;
185 #include "libcli/smb_composite/proto.h"