/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Dispatch function for SMB2_IOCTL
* [MS-SMB2] 3.3.5.15
*/
#include <smbsrv/smb2_kproto.h>
#include <smbsrv/winioctl.h>
struct smb2_ioctbl_ent {
};
/* te_flags */
{
int rc = 0;
/*
* SMB2 Ioctl request
*/
&StructSize, /* w */
/* reserved .. */
&InputOffset, /* l */
&MaxInputResp, /* l */
&OutputOffset, /* l */
&Flags); /* l */
/* reserved2 4. */
return (SDRC_ERROR);
if (Flags != SMB2_0_IOCTL_IS_FSCTL) {
goto errout;
}
break;
}
#ifdef DEBUG
#endif
goto errout;
}
/*
* Some requests are only valid on IPC$
*/
goto errout;
}
/*
* Note: some ioctl commands don't need a FID.
*/
goto errout;
}
} else {
if (status) {
goto errout;
}
}
/*
* Note: some ioctls require a "disk" fid.
*/
goto errout;
}
}
/*
* If there's an input buffer, setup a shadow.
*/
if (fsctl.InputCount) {
goto errout;
}
if (rc) {
goto errout;
}
}
/*
* If output is possible, setup the output mbuf_chain
*/
/*
* Dispatch to the handler for CtlCode
*/
if (status != 0) {
goto errout;
/* Warnings like NT_STATUS_BUFFER_OVERFLOW are OK. */
}
fsctl.InputCount = 0;
/*
* SMB2 Ioctl reply
*/
StructSize = 49;
StructSize, /* w */
/* reserved .. */
InputOffset, /* l */
OutputOffset, /* l */
Flags, /* l */
/* reserved2 4. */
return (SDRC_SUCCESS);
}
/* ARGSUSED */
static uint32_t
{
return (NT_STATUS_NOT_SUPPORTED);
}
static struct smb2_ioctbl_ent
smb2_ioc_tbl[] = {
/*
* FILE_DEVICE_DFS (6)
*/
/*
* FILE_DEVICE_FILE_SYSTEM (9)
*/
{ FSCTL_SET_REPARSE_POINT, 0, smb2_fsctl_notsup },
{ FSCTL_FILE_LEVEL_TRIM, 0, smb2_fsctl_notsup },
/*
* FILE_DEVICE_NAMED_PIPE (17)
*/
/*
* FILE_DEVICE_NETWORK_FILE_SYSTEM (20)
*/
{ FSCTL_SRV_COPYCHUNK, 0, smb2_fsctl_notsup },
{ FSCTL_SRV_READ_HASH, 0, smb2_fsctl_notsup },
/*
* End marker
*/
{ 0, 0, 0 }
};