summaryrefslogtreecommitdiff
path: root/source4/libcli/composite/composite.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-16 01:28:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:52 -0500
commit1e776edfc546f01341f153daa80e4155e5ff9855 (patch)
treee2763985c78dfa6e5aa3d6f0805f07588aa44ba9 /source4/libcli/composite/composite.h
parent4da8abcf0d48f4e6ec14dc9fecab780e826df4ed (diff)
downloadsamba-1e776edfc546f01341f153daa80e4155e5ff9855.tar.gz
samba-1e776edfc546f01341f153daa80e4155e5ff9855.tar.bz2
samba-1e776edfc546f01341f153daa80e4155e5ff9855.zip
r4769: added a smb_composite_connect() function that provides a simple async
interface to a complete SMB connection setup. Internally it does: - socket connection - session request (if needed) - negprot - session setup - tcon This is the first example of a composite function that builds on other composite components (the socket connection is a composite function, which is used as a building block for this function). I think this will be quite common in composite functions in the future, building up ever more complex composite functions from smaller building blocks, while hiding the details from the caller. There are two things missing from this now. The first is async name resolution routines (wins, bcast, DNS etc), and the second is that this code currently only does a NT1 style session setup. I'll work on adding spnego and old style session setup support next. (This used to be commit 6bc9e17f5c5236f662c7c8f308d03e6d97379b23)
Diffstat (limited to 'source4/libcli/composite/composite.h')
-rw-r--r--source4/libcli/composite/composite.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/source4/libcli/composite/composite.h b/source4/libcli/composite/composite.h
index 6bffc63211..dce4e4e109 100644
--- a/source4/libcli/composite/composite.h
+++ b/source4/libcli/composite/composite.h
@@ -87,3 +87,31 @@ struct smb_composite_savefile {
uint32_t size;
} in;
};
+
+
+/*
+ a composite request for a full connection to a remote server. Includes
+
+ - socket establishment
+ - session request
+ - negprot
+ - session setup
+ - tree connect
+*/
+struct smb_composite_connect {
+ struct {
+ const char *dest_host;
+ int port;
+ const char *called_name;
+ const char *calling_name;
+ const char *service;
+ const char *service_type;
+ const char *user;
+ const char *domain;
+ const char *password;
+ } in;
+ struct {
+ struct smbcli_tree *tree;
+ } out;
+};
+