summaryrefslogtreecommitdiff
path: root/source3/libsmb/smb2cli_base.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-08-31 00:40:06 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-18 05:33:10 +0200
commit271f78a9bb814ed10bcc8883a60d6609e1eef500 (patch)
tree5a33c7c4a1971696c43e30f1986a2ecf7e43d5ac /source3/libsmb/smb2cli_base.h
parentb6b767a2c47b26c1758520212b4f09ddb934c9f3 (diff)
downloadsamba-271f78a9bb814ed10bcc8883a60d6609e1eef500.tar.gz
samba-271f78a9bb814ed10bcc8883a60d6609e1eef500.tar.bz2
samba-271f78a9bb814ed10bcc8883a60d6609e1eef500.zip
s3:smb2cli: pass an array of expected status/body_size pairs to smb2cli_req_recv()
This gives the caller more control and correctly reports unexpected errors to the caller, instead of return NT_STATUS_INVALID_NETWOR_RESPONSE metze
Diffstat (limited to 'source3/libsmb/smb2cli_base.h')
-rw-r--r--source3/libsmb/smb2cli_base.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/smb2cli_base.h b/source3/libsmb/smb2cli_base.h
index 348f842d40..595665d718 100644
--- a/source3/libsmb/smb2cli_base.h
+++ b/source3/libsmb/smb2cli_base.h
@@ -35,6 +35,12 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
uint32_t dyn_len);
NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs,
int num_reqs);
+
+struct smb2cli_req_expected_response {
+ NTSTATUS status;
+ uint16_t body_size;
+};
+
struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
@@ -49,6 +55,8 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
const uint8_t *dyn,
uint32_t dyn_len);
NTSTATUS smb2cli_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
- struct iovec **piov, int body_size);
+ struct iovec **piov,
+ const struct smb2cli_req_expected_response *expected,
+ size_t num_expected);
#endif