summaryrefslogtreecommitdiff
path: root/libcli/smb/smbXcli_base.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-16 11:37:05 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-24 19:02:30 +0100
commit0f194e35a65cb8a2ae8e2d0d39bc49462a6c8f93 (patch)
tree201cb36bdac2109403bbdc80e49cbfbbb53e13cc /libcli/smb/smbXcli_base.h
parentce224f4d25c70190ad127b8fdf01ebb0d6070b6c (diff)
downloadsamba-0f194e35a65cb8a2ae8e2d0d39bc49462a6c8f93.tar.gz
samba-0f194e35a65cb8a2ae8e2d0d39bc49462a6c8f93.tar.bz2
samba-0f194e35a65cb8a2ae8e2d0d39bc49462a6c8f93.zip
smbXcli: rework smb1cli_req_recv() to expose an iov with 3 elements
Each smb1cli_req has 3 iov elements [SMB HDR, SMB Parameter Block, SMB Data Block]. The 'inbuf' is still exposed if the caller requires it (until we fix all legacy callers). The can now pass an array of expected [status,wct] combinations, instead of just one expected min_wct. metze
Diffstat (limited to 'libcli/smb/smbXcli_base.h')
-rw-r--r--libcli/smb/smbXcli_base.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index fdcd3aadf2..17c889c4e5 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -66,6 +66,11 @@ void smb1cli_req_set_mid(struct tevent_req *req, uint16_t mid);
uint32_t smb1cli_req_seqnum(struct tevent_req *req);
void smb1cli_req_set_seqnum(struct tevent_req *req, uint32_t seqnum);
+struct smb1cli_req_expected_response {
+ NTSTATUS status;
+ uint8_t wct;
+};
+
struct tevent_req *smb1cli_req_create(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbXcli_conn *conn,
@@ -99,9 +104,18 @@ struct tevent_req *smb1cli_req_send(TALLOC_CTX *mem_ctx,
uint32_t num_bytes,
const uint8_t *bytes);
NTSTATUS smb1cli_req_recv(struct tevent_req *req,
- TALLOC_CTX *mem_ctx, uint8_t **pinbuf,
- uint8_t min_wct, uint8_t *pwct, uint16_t **pvwv,
- uint32_t *pnum_bytes, uint8_t **pbytes);
+ TALLOC_CTX *mem_ctx,
+ struct iovec **piov,
+ uint8_t **phdr,
+ uint8_t *pwct,
+ uint16_t **pvwv,
+ uint32_t *pvwv_offset,
+ uint32_t *pnum_bytes,
+ uint8_t **pbytes,
+ uint32_t *pbytes_offset,
+ uint8_t **pinbuf,
+ const struct smb1cli_req_expected_response *expected,
+ size_t num_expected);
struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,