summaryrefslogtreecommitdiffstats
path: root/source3/include/async_smb.h
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-08-25 14:40:15 +0200
committerVolker Lendecke <vl@samba.org>2008-08-28 17:53:37 +0200
commit77d1b29e25512982a1f912adac46bb954ee3d19f (patch)
tree1c7512c46d8fc33f68aaced1dd92defbe88f683c /source3/include/async_smb.h
parent128524930d490fb5ea637d99bffb36157c80869b (diff)
downloadsamba-77d1b29e25512982a1f912adac46bb954ee3d19f.tar.gz
samba-77d1b29e25512982a1f912adac46bb954ee3d19f.tar.xz
samba-77d1b29e25512982a1f912adac46bb954ee3d19f.zip
Move "struct cli_request" from client.h to async_smb.h
Also add some comments (This used to be commit 2ecc311f785317caf5b60051147dcd085c80d64f)
Diffstat (limited to 'source3/include/async_smb.h')
-rw-r--r--source3/include/async_smb.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/source3/include/async_smb.h b/source3/include/async_smb.h
index 93d2273239c..031ab233dd4 100644
--- a/source3/include/async_smb.h
+++ b/source3/include/async_smb.h
@@ -17,8 +17,69 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef __ASYNC_SMB_H__
+#define __ASYNC_SMB_H__
+
#include "includes.h"
+struct cli_request {
+ /**
+ * "prev" and "next" form the doubly linked list in
+ * cli_state->outstanding_requests
+ */
+ struct cli_request *prev, *next;
+
+ /**
+ * "our" struct async_req;
+ */
+ struct async_req *async;
+
+ /**
+ * The client connection for this request
+ */
+ struct cli_state *cli;
+
+ /**
+ * The enc_state to decrypt the reply
+ */
+ struct smb_trans_enc_state *enc_state;
+
+ /**
+ * The mid we used for this request. Mainly used to demultiplex on
+ * receiving replies.
+ */
+ uint16_t mid;
+
+ /**
+ * The bytes we have to ship to the server
+ */
+ char *outbuf;
+
+ /**
+ * How much from "outbuf" did we already send
+ */
+ size_t sent;
+
+ /**
+ * The reply comes in here. Its intended size is implicit by
+ * smb_len(), its current size can be read via talloc_get_size()
+ */
+ char *inbuf;
+
+ /**
+ * Specific requests might add stuff here. Maybe convert this to a
+ * private_pointer at some point.
+ */
+ union {
+ struct {
+ off_t ofs;
+ size_t size;
+ ssize_t received;
+ uint8_t *rcvbuf;
+ } read;
+ } data;
+};
+
/*
* Ship a new smb request to the server
*/
@@ -52,3 +113,5 @@ NTSTATUS cli_pull_error(char *buf);
*/
void cli_set_error(struct cli_state *cli, NTSTATUS status);
+
+#endif