/// <summary> /// server response the IO control request from client. /// </summary> /// <param name="open">the file open between server and client</param> /// <param name="controlCode">The file system control code</param> /// <param name="data">The information about this IO control</param> public override void SendIoControlResponse(IFileServiceServerOpen open, FsCtlCode controlCode, byte[] data) { CifsServerPerConnection connection = open.TreeConnect.Session.Connection as CifsServerPerConnection; foreach (SmbIoctlRequestPacket request in connection.PendingRequestTable) { if (request != null && request.SmbHeader.Uid == open.TreeConnect.Session.SessionId && request.SmbHeader.Tid == open.TreeConnect.TreeConnectId && request.SmbParameters.FID == open.FileId) { SmbIoctlResponsePacket response = this.cifsServer.CreateIoctlResponse(connection, request, null, data); this.cifsServer.SendPacket(response, connection); return; } } }
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="inputResponse">The input data in the response of this control operation</param> /// <param name="outputResponse">The output data in the response of this control operation</param> /// <param name="maxInputResponse">The maximum number of bytes that the server can return for the input data</param> /// <param name="maxOutputResponse">The maximum number of bytes that the server can return for the output data</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public abstract uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] inputResponse, out byte[] outputResponse, uint maxInputResponse, uint maxOutputResponse);
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="output">The output data of this control operation</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public abstract uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] output);
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="inputResponse">The input data in the response of this control operation</param> /// <param name="outputResponse">The output data in the response of this control operation</param> /// <param name="maxInputResponse">The maximum number of bytes that the server can return for the input data</param> /// <param name="maxOutputResponse">The maximum number of bytes that the server can return for the output data</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] inputResponse, out byte[] outputResponse, uint maxInputResponse, uint maxOutputResponse) { return InternalIoControl(timeout, (uint)controlCode, true, input, out inputResponse, out outputResponse, maxInputResponse, maxOutputResponse); }
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="output">The output data of this control operation</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] output) { return InternalIoControl(timeout, (uint)controlCode, true, input, out output); }
/// <summary> /// server response the IO control request from client. /// </summary> /// <param name="open">the file open between server and client</param> /// <param name="controlCode">The file system control code</param> /// <param name="data">The information about this IO control</param> public override void SendIoControlResponse(IFileServiceServerOpen open, FsCtlCode controlCode, byte[] data) { CifsServerPerConnection connection = open.TreeConnect.Session.Connection as CifsServerPerConnection; foreach (SmbIoctlRequestPacket request in connection.PendingRequestTable) { if (request != null && request.SmbHeader.Uid == open.TreeConnect.Session.SessionId && request.SmbHeader.Tid == open.TreeConnect.TreeConnectId && request.SmbParameters.FID == open.FileId) { SmbIoctlResponsePacket response = this.cifsServer.CreateIoctlResponse(connection, request, null, data); this.cifsServer.SendPacket(response, connection); return; } } }
/// <summary> /// server response the IO control request from client. /// </summary> /// <param name="open">the file open between server and client</param> /// <param name="controlCode">The file system control code</param> /// <param name="data">The information about this IO control</param> public abstract void SendIoControlResponse(IFileServiceServerOpen open, FsCtlCode controlCode, byte[] data);
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The waiting time of this operation</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="output">The output data of this control operation</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] output) { throw new NotImplementedException(); }
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="inputResponse">The input data in the response of this control operation</param> /// <param name="outputResponse">The output data in the response of this control operation</param> /// <param name="maxInputResponse">The maximum number of bytes that the server can return for the input data</param> /// <param name="maxOutputResponse">The maximum number of bytes that the server can return for the output data</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] inputResponse, out byte[] outputResponse, uint maxInputResponse, uint maxOutputResponse) { throw new NotSupportedException(); }
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The waiting time of this operation</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="output">The output data of this control operation</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] output) { throw new NotImplementedException(); }
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="inputResponse">The input data in the response of this control operation</param> /// <param name="outputResponse">The output data in the response of this control operation</param> /// <param name="maxInputResponse">The maximum number of bytes that the server can return for the input data</param> /// <param name="maxOutputResponse">The maximum number of bytes that the server can return for the output data</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] inputResponse, out byte[] outputResponse, uint maxInputResponse, uint maxOutputResponse) { throw new NotSupportedException(); }
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="inputResponse">The input data in the response of this control operation</param> /// <param name="outputResponse">The output data in the response of this control operation</param> /// <param name="maxInputResponse">The maximum number of bytes that the server can return for the input data</param> /// <param name="maxOutputResponse">The maximum number of bytes that the server can return for the output data</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public abstract uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] inputResponse, out byte[] outputResponse, uint maxInputResponse, uint maxOutputResponse);
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="controlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="output">The output data of this control operation</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public abstract uint IoControl(TimeSpan timeout, FsCtlCode controlCode, byte[] input, out byte[] output);
/// <summary> /// server response the IO control request from client. /// </summary> /// <param name="open">the file open between server and client</param> /// <param name="controlCode">The file system control code</param> /// <param name="data">The information about this IO control</param> public abstract void SendIoControlResponse(IFileServiceServerOpen open, FsCtlCode controlCode, byte[] data);
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="fsControlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="output">The output data of this control operation</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode fsControlCode, byte[] input, out byte[] output) { this.internalTimeout = timeout; return InternalIoControl((uint)fsControlCode, true, input, out output); }
/// <summary> /// Do File system control on server /// </summary> /// <param name="timeout">The pending time to get server's response</param> /// <param name="fsControlCode">The file system control code</param> /// <param name="input">The input data of this control operation</param> /// <param name="output">The output data of this control operation</param> /// <returns> /// a uint value that specifies the status of response packet. /// </returns> /// <exception cref="System.InvalidOperationException">Thrown if there is any error occurred</exception> public override uint IoControl(TimeSpan timeout, FsCtlCode fsControlCode, byte[] input, out byte[] output) { this.internalTimeout = timeout; return(InternalIoControl((uint)fsControlCode, true, input, out output)); }