mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s3:smb2cli: pass struct smbXcli_conn directly to smb2cli_req_create/_send()
metze
This commit is contained in:
parent
9ebdee2817
commit
6ab3f8cedb
@ -1,60 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
smb2 client routines
|
||||
Copyright (C) Volker Lendecke 2011
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __SMB2CLI_BASE_H__
|
||||
#define __SMB2CLI_BASE_H__
|
||||
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
|
||||
static inline struct tevent_req *cli_state_smb2cli_req_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct cli_state *cli,
|
||||
uint16_t cmd,
|
||||
uint32_t additional_flags,
|
||||
uint32_t clear_flags,
|
||||
uint32_t timeout_msec,
|
||||
uint32_t pid,
|
||||
uint32_t tid,
|
||||
struct smbXcli_session *session,
|
||||
const uint8_t *fixed,
|
||||
uint16_t fixed_len,
|
||||
const uint8_t *dyn,
|
||||
uint32_t dyn_len)
|
||||
{
|
||||
return smb2cli_req_send(mem_ctx, ev,
|
||||
cli->conn, cmd,
|
||||
additional_flags, clear_flags,
|
||||
timeout_msec,
|
||||
pid, tid, session,
|
||||
fixed, fixed_len,
|
||||
dyn, dyn_len);
|
||||
}
|
||||
|
||||
#define smb2cli_req_send(mem_ctx, ev, cli, cmd, \
|
||||
additional_flags, clear_flags, \
|
||||
timeout_msec, \
|
||||
pid, tid, session, \
|
||||
fixed, fixed_len, dyn, dyn_len) \
|
||||
cli_state_smb2cli_req_send(mem_ctx, ev, cli, cmd, \
|
||||
additional_flags, clear_flags, \
|
||||
timeout_msec, \
|
||||
pid, tid, session, \
|
||||
fixed, fixed_len, dyn, dyn_len)
|
||||
|
||||
#endif
|
@ -20,7 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "client.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb2cli_base.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
#include "smb2cli.h"
|
||||
#include "libsmb/proto.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
@ -53,7 +53,7 @@ struct tevent_req *smb2cli_close_send(TALLOC_CTX *mem_ctx,
|
||||
SBVAL(fixed, 8, fid_persistent);
|
||||
SBVAL(fixed, 16, fid_volatile);
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CLOSE,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_CLOSE,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "client.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb2cli_base.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
#include "smb2cli.h"
|
||||
#include "libsmb/proto.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
@ -136,7 +136,7 @@ struct tevent_req *smb2cli_create_send(
|
||||
data_blob_free(&blob);
|
||||
}
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CREATE,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_CREATE,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "client.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb2cli_base.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
#include "smb2cli.h"
|
||||
#include "libsmb/proto.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
@ -51,7 +51,7 @@ struct tevent_req *smb2cli_flush_send(TALLOC_CTX *mem_ctx,
|
||||
SBVAL(fixed, 8, fid_persistent);
|
||||
SBVAL(fixed, 16, fid_volatile);
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FLUSH,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_FLUSH,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "client.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb2cli_base.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
#include "smb2cli.h"
|
||||
#include "libsmb/proto.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
@ -86,7 +86,7 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
|
||||
dyn_len = sizeof(state->dyn_pad);
|
||||
}
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FIND,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_FIND,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "client.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb2cli_base.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
#include "smb2cli.h"
|
||||
#include "libsmb/proto.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
@ -65,7 +65,7 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx,
|
||||
SBVAL(fixed, 32, minimum_count);
|
||||
SBVAL(fixed, 40, remaining_bytes);
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_READ,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_READ,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "client.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb2cli_base.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
#include "smb2cli.h"
|
||||
#include "libsmb/proto.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
@ -81,7 +81,7 @@ struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
|
||||
dyn_len = sizeof(state->dyn_pad);
|
||||
}
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TCON,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TCON,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
@ -189,7 +189,7 @@ struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
SSVAL(state->fixed, 0, 4);
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TDIS,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TDIS,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "client.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb2cli_base.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
#include "smb2cli.h"
|
||||
#include "libsmb/proto.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
@ -74,7 +74,7 @@ struct tevent_req *smb2cli_write_send(TALLOC_CTX *mem_ctx,
|
||||
dyn_len = sizeof(state->dyn_pad);
|
||||
}
|
||||
|
||||
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_WRITE,
|
||||
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_WRITE,
|
||||
0, 0, /* flags */
|
||||
cli->timeout,
|
||||
cli->smb2.pid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user