uint8_t wct, uint16_t *vwv,
int iov_count,
struct iovec *bytes_iov);
-NTSTATUS cli_smb_req_send(struct tevent_req *req);
-size_t cli_smb_wct_ofs(struct tevent_req **reqs, int num_reqs);
-NTSTATUS cli_smb_chain_send(struct tevent_req **reqs, int num_reqs);
-uint16_t cli_smb_req_mid(struct tevent_req *req);
-void cli_smb_req_set_mid(struct tevent_req *req, uint16_t mid);
-uint32_t cli_smb_req_seqnum(struct tevent_req *req);
-void cli_smb_req_set_seqnum(struct tevent_req *req, uint32_t seqnum);
struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct cli_state *cli,
uint8_t smb_command, uint8_t additional_flags,
#include "async_smb.h"
#include "../libcli/smb/smbXcli_base.h"
-/*
- * Fetch a smb request's mid. Only valid after the request has been sent by
- * cli_smb_req_send().
- */
-uint16_t cli_smb_req_mid(struct tevent_req *req)
-{
- return smb1cli_req_mid(req);
-}
-
-void cli_smb_req_set_mid(struct tevent_req *req, uint16_t mid)
-{
- smb1cli_req_set_mid(req, mid);
-}
-
-uint32_t cli_smb_req_seqnum(struct tevent_req *req)
-{
- return smb1cli_req_seqnum(req);
-}
-
-void cli_smb_req_set_seqnum(struct tevent_req *req, uint32_t seqnum)
-{
- smb1cli_req_set_seqnum(req, seqnum);
-}
-
struct cli_smb_req_state {
struct cli_state *cli;
uint8_t smb_command;
return state->req;
}
-NTSTATUS cli_smb_req_send(struct tevent_req *req)
-{
- return smb1cli_req_chain_submit(&req, 1);
-}
-
struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
return status;
}
-
-size_t cli_smb_wct_ofs(struct tevent_req **reqs, int num_reqs)
-{
- return smb1cli_req_wct_ofs(reqs, num_reqs);
-}
-
-NTSTATUS cli_smb_chain_send(struct tevent_req **reqs, int num_reqs)
-{
- return smb1cli_req_chain_submit(reqs, num_reqs);
-}
return NULL;
}
- status = cli_smb_req_send(subreq);
+ status = smb1cli_req_chain_submit(&subreq, 1);
if (NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
if (subreq == NULL) {
return req;
}
- status = cli_smb_req_send(subreq);
+ status = smb1cli_req_chain_submit(&subreq, 1);
if (!NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);
return tevent_req_post(req, ev);
return NULL;
}
- status = cli_smb_req_send(subreq);
+ status = smb1cli_req_chain_submit(&subreq, 1);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
return NULL;
}
- status = cli_smb_req_send(subreq);
+ status = smb1cli_req_chain_submit(&subreq, 1);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
- cli_smb_req_set_mid(subreq, 0xffff);
+ smb1cli_req_set_mid(subreq, 0xffff);
if (!smbXcli_req_set_pending(subreq)) {
tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
return NULL;
}
- status = cli_smb_req_send(subreq);
+ status = smb1cli_req_chain_submit(&subreq, 1);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
SSVAL(vwv+10, 0, state->size);
SSVAL(vwv+11, 0,
- cli_smb_wct_ofs(reqs_before, num_reqs_before)
+ smb1cli_req_wct_ofs(reqs_before, num_reqs_before)
+ 1 /* the wct field */
+ wct * 2 /* vwv */
+ 2 /* num_bytes field */
return NULL;
}
- status = cli_smb_req_send(subreq);
+ status = smb1cli_req_chain_submit(&subreq, 1);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
#include "async_smb.h"
#include "lib/util/tevent_ntstatus.h"
#include "libcli/security/security.h"
+#include "libcli/smb/smbXcli_base.h"
struct chain3_andx_state {
uint16_t fnum;
}
tevent_req_set_callback(subreq, chain3_andx_close_done, req);
- status = cli_smb_chain_send(smbreqs, ARRAY_SIZE(smbreqs));
+ status = smb1cli_req_chain_submit(smbreqs, ARRAY_SIZE(smbreqs));
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
if (reqs[2] == NULL) return false;
tevent_req_set_callback(reqs[2], chain1_close_completion, &done);
- status = cli_smb_chain_send(smbreqs, ARRAY_SIZE(smbreqs));
+ status = smb1cli_req_chain_submit(smbreqs, ARRAY_SIZE(smbreqs));
if (!NT_STATUS_IS_OK(status)) {
return false;
}
if (reqs[1] == NULL) return false;
tevent_req_set_callback(reqs[1], chain2_tcon_completion, &done);
- status = cli_smb_chain_send(smbreqs, ARRAY_SIZE(smbreqs));
+ status = smb1cli_req_chain_submit(smbreqs, ARRAY_SIZE(smbreqs));
if (!NT_STATUS_IS_OK(status)) {
return false;
}