diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-11-11 12:37:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:12 -0500 |
commit | 2e753f851885930000eadbd4b69660d85124c716 (patch) | |
tree | 078827c8b09c6673892f5b53560875fda14f22b9 /source4/libcli/smb2/request.c | |
parent | 006da4c52add1e448eb3f72896ca37d644294a24 (diff) | |
download | samba-2e753f851885930000eadbd4b69660d85124c716.tar.gz samba-2e753f851885930000eadbd4b69660d85124c716.tar.bz2 samba-2e753f851885930000eadbd4b69660d85124c716.zip |
r11679: opening/creating files in SMB2 now works. Lots of unknown parameters
in the call tho.
(This used to be commit 548fbd86b3b114493943b50669bdcba2f4ed87f2)
Diffstat (limited to 'source4/libcli/smb2/request.c')
-rw-r--r-- | source4/libcli/smb2/request.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c index 7e25de99a8..108cf0ca55 100644 --- a/source4/libcli/smb2/request.c +++ b/source4/libcli/smb2/request.c @@ -76,6 +76,22 @@ struct smb2_request *smb2_request_init(struct smb2_transport *transport, return req; } +/* + initialise a smb2 request for tree operations +*/ +struct smb2_request *smb2_request_init_tree(struct smb2_tree *tree, + uint16_t opcode, uint32_t body_size) +{ + struct smb2_request *req = smb2_request_init(tree->session->transport, opcode, + body_size); + if (req == NULL) return NULL; + + SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); + SIVAL(req->out.hdr, SMB2_HDR_TID, tree->tid); + + return req; +} + /* destroy a request structure and return final status */ NTSTATUS smb2_request_destroy(struct smb2_request *req) { |