summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-05 20:18:45 +0200
committerVolker Lendecke <vl@samba.org>2009-04-06 21:32:06 +0200
commit8bdac3615a255f65665939bda070c1b4ba93b908 (patch)
tree65db8605b74725828021c837a1c47ad513a82715 /source3/include
parentad29104d3df85faa946f10c0d8626cfc993010e5 (diff)
downloadsamba-8bdac3615a255f65665939bda070c1b4ba93b908.tar.gz
samba-8bdac3615a255f65665939bda070c1b4ba93b908.tar.bz2
samba-8bdac3615a255f65665939bda070c1b4ba93b908.zip
Add new async libsmb infrastructure
I know this is just yet another iteration, but I like this one much better than the one that exists right now :-) It will do trans and echo requests without a _recv helper and without unnecessary memcpy().
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/async_smb.h27
-rw-r--r--source3/include/client.h3
2 files changed, 30 insertions, 0 deletions
diff --git a/source3/include/async_smb.h b/source3/include/async_smb.h
index 2ac1101a1e..adbfc6e5ca 100644
--- a/source3/include/async_smb.h
+++ b/source3/include/async_smb.h
@@ -151,4 +151,31 @@ NTSTATUS cli_pull_error(char *buf);
void cli_set_error(struct cli_state *cli, NTSTATUS status);
+struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct cli_state *cli,
+ uint8_t smb_command,
+ uint8_t additional_flags,
+ uint8_t wct, uint16_t *vwv,
+ int iov_count,
+ struct iovec *bytes_iov);
+bool cli_smb_req_send(struct tevent_req *req);
+size_t cli_smb_wct_ofs(struct tevent_req **reqs, int num_reqs);
+bool cli_smb_chain_send(struct tevent_req **reqs, int num_reqs);
+uint8_t *cli_smb_inbuf(struct tevent_req *req);
+bool cli_has_async_calls(struct cli_state *cli);
+void cli_smb_req_unset_pending(struct tevent_req *req);
+bool cli_smb_req_set_pending(struct tevent_req *req);
+uint16_t cli_smb_req_mid(struct tevent_req *req);
+void cli_smb_req_set_mid(struct tevent_req *req, uint16_t mid);
+struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
+ struct cli_state *cli,
+ uint8_t smb_command, uint8_t additional_flags,
+ uint8_t wct, uint16_t *vwv,
+ uint32_t num_bytes,
+ const uint8_t *bytes);
+NTSTATUS cli_smb_recv(struct tevent_req *req, uint8_t min_wct,
+ uint8_t *pwct, uint16_t **pvwv,
+ uint32_t *pnum_bytes, uint8_t **pbytes);
+
#endif
diff --git a/source3/include/client.h b/source3/include/client.h
index 73a1d7b554..c10d2109d8 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -291,6 +291,9 @@ struct cli_state {
/* Where (if anywhere) this is mounted under DFS. */
char *dfs_mountpoint;
+
+ struct tevent_queue *outgoing;
+ struct tevent_req **pending;
};
typedef struct file_info {