The caller should take care of the global cli_state values.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 19:38:27 CEST 2011 on sn-devel-104
struct tevent_context *ev,
struct cli_state *cli,
uint16_t cmd,
- uint32_t flags,
+ uint32_t additional_flags,
+ uint32_t clear_flags,
+ uint32_t pid,
+ uint32_t tid,
+ uint64_t uid,
const uint8_t *fixed,
uint16_t fixed_len,
const uint8_t *dyn,
{
struct tevent_req *req;
struct smb2cli_req_state *state;
+ uint32_t flags = 0;
req = tevent_req_create(mem_ctx, &state,
struct smb2cli_req_state);
return NULL;
}
+ flags |= additional_flags;
+ flags &= ~clear_flags;
+
state->fixed = fixed;
state->fixed_len = fixed_len;
state->dyn = dyn;
struct tevent_context *ev,
struct cli_state *cli,
uint16_t cmd,
- uint32_t flags,
+ uint32_t additional_flags,
+ uint32_t clear_flags,
+ uint32_t pid,
+ uint32_t tid,
+ uint64_t uid,
const uint8_t *fixed,
uint16_t fixed_len,
const uint8_t *dyn,
struct tevent_req *req;
NTSTATUS status;
- req = smb2cli_req_create(mem_ctx, ev, cli, cmd, flags,
+ req = smb2cli_req_create(mem_ctx, ev, cli, cmd,
+ additional_flags, clear_flags,
+ pid, tid, uid,
fixed, fixed_len, dyn, dyn_len);
if (req == NULL) {
return NULL;
struct tevent_context *ev,
struct cli_state *cli,
uint16_t cmd,
- uint32_t flags,
+ uint32_t additional_flags,
+ uint32_t clear_flags,
+ uint32_t pid,
+ uint32_t tid,
+ uint64_t uid,
const uint8_t *fixed,
uint16_t fixed_len,
const uint8_t *dyn,
struct tevent_context *ev,
struct cli_state *cli,
uint16_t cmd,
- uint32_t flags,
+ uint32_t additional_flags,
+ uint32_t clear_flags,
+ uint32_t pid,
+ uint32_t tid,
+ uint64_t uid,
const uint8_t *fixed,
uint16_t fixed_len,
const uint8_t *dyn,
SBVAL(fixed, 8, fid_persistent);
SBVAL(fixed, 16, fid_volatile);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CLOSE, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CLOSE,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ cli->smb2.tid,
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
NULL, 0);
if (tevent_req_nomem(subreq, req)) {
data_blob_free(&blob);
}
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CREATE, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CREATE,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ cli->smb2.tid,
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
dyn, dyn_len);
if (tevent_req_nomem(subreq, req)) {
SBVAL(fixed, 8, fid_persistent);
SBVAL(fixed, 16, fid_volatile);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FLUSH, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FLUSH,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ cli->smb2.tid,
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
NULL, 0);
if (tevent_req_nomem(subreq, req)) {
SSVAL(buf, 0, 0x202); /* SMB2.002 */
SSVAL(buf, 2, 0x210); /* SMB2.1 */
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_NEGPROT, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_NEGPROT,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ 0, 0, /* tid, uid */
state->fixed, sizeof(state->fixed),
state->dyn, sizeof(state->dyn));
if (tevent_req_nomem(subreq, req)) {
SSVAL(fixed, 26, dyn_len);
SSVAL(fixed, 28, outbuf_len);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FIND, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FIND,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ cli->smb2.tid,
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
dyn, dyn_len);
if (tevent_req_nomem(subreq, req)) {
SBVAL(fixed, 32, minimum_count);
SBVAL(fixed, 40, remaining_bytes);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_READ, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_READ,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ cli->smb2.tid,
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
NULL, 0);
if (tevent_req_nomem(subreq, req)) {
SSVAL(buf, 14, blob->length);
SBVAL(buf, 16, 0); /* PreviousSessionId */
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_SESSSETUP, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_SESSSETUP,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ 0, 0, /* tid, uid */
state->fixed, sizeof(state->fixed),
blob->data, blob->length);
if (tevent_req_nomem(subreq, req)) {
}
SSVAL(state->fixed, 0, 4);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_LOGOFF, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_LOGOFF,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ 0, /* tid */
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
NULL, 0);
if (tevent_req_nomem(subreq, req)) {
SSVAL(fixed, 4, SMB2_HDR_BODY + 8);
SSVAL(fixed, 6, dyn_len);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TCON, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TCON,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ 0, /* tid */
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
dyn, dyn_len);
if (tevent_req_nomem(subreq, req)) {
}
SSVAL(state->fixed, 0, 4);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TDIS, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TDIS,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ cli->smb2.tid,
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
NULL, 0);
if (tevent_req_nomem(subreq, req)) {
SIVAL(fixed, 36, remaining_bytes);
SIVAL(fixed, 44, flags);
- subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_WRITE, 0,
+ subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_WRITE,
+ 0, 0, /* flags */
+ cli->smb2.pid,
+ cli->smb2.tid,
+ cli->smb2.uid,
state->fixed, sizeof(state->fixed),
data, length);
if (tevent_req_nomem(subreq, req)) {