2011-02-24 18:07:19 +00:00
|
|
|
/*
|
|
|
|
* SMB2 version specific operations
|
|
|
|
*
|
|
|
|
* Copyright (c) 2012, Jeff Layton <jlayton@redhat.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License v2 as published
|
|
|
|
* by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library 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 Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "cifsglob.h"
|
2011-12-26 18:53:34 +00:00
|
|
|
#include "smb2pdu.h"
|
|
|
|
#include "smb2proto.h"
|
|
|
|
|
|
|
|
static __u64
|
|
|
|
smb2_get_next_mid(struct TCP_Server_Info *server)
|
|
|
|
{
|
|
|
|
__u64 mid;
|
|
|
|
/* for SMB2 we need the current value */
|
|
|
|
spin_lock(&GlobalMid_Lock);
|
|
|
|
mid = server->CurrentMid++;
|
|
|
|
spin_unlock(&GlobalMid_Lock);
|
|
|
|
return mid;
|
|
|
|
}
|
2011-02-24 18:07:19 +00:00
|
|
|
|
|
|
|
struct smb_version_operations smb21_operations = {
|
2011-12-26 18:53:34 +00:00
|
|
|
.setup_request = smb2_setup_request,
|
|
|
|
.check_receive = smb2_check_receive,
|
|
|
|
.get_next_mid = smb2_get_next_mid,
|
2011-02-24 18:07:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct smb_version_values smb21_values = {
|
|
|
|
.version_string = SMB21_VERSION_STRING,
|
2011-12-26 18:53:34 +00:00
|
|
|
.lock_cmd = SMB2_LOCK,
|
2011-02-24 18:07:19 +00:00
|
|
|
};
|