Browse Source

Moved iSCSI DefaultParameters class to ISCSI.Common folder

Tal Aloni 8 years ago
parent
commit
ea4514a050

+ 1 - 1
ISCSI/ISCSI.Client/DefaultParameters.cs

@@ -5,7 +5,7 @@
  * either version 3 of the License, or (at your option) any later version.
  */
 
-namespace ISCSI.Client
+namespace ISCSI
 {
     /// <summary>
     /// Default operational parameters for iSCSI session / connection, as specified in RFC 3720.

+ 0 - 73
ISCSI/ISCSI.Server/DefaultParameters.cs

@@ -1,73 +0,0 @@
-/* Copyright (C) 2016 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
- * 
- * You can redistribute this program and/or modify it under the terms of
- * the GNU Lesser Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- */
-
-namespace ISCSI.Server
-{
-    /// <summary>
-    /// Default operational parameters for iSCSI session / connection, as specified in RFC 3720.
-    /// </summary>
-    public class DefaultParameters
-    {
-        public class Session
-        {
-            /// <summary>
-            /// The maximum number of connections per session.
-            /// </summary>
-            public const int MaxConnections = 1;
-
-            /// <summary>
-            /// Allow the initiator to start sending data to a target as if it has received an initial R2T
-            /// </summary>
-            public const bool InitialR2T = true;
-
-            public const bool ImmediateData = true;
-
-            /// <summary>
-            /// The total of all the DataSegmentLength of all PDUs in a sequence MUST not exceed MaxBurstLength.
-            /// Maximum SCSI data payload in bytes in a Data-In or a solicited Data-Out iSCSI sequence (i.e. that belongs to a single command).
-            /// Irrelevant to the target in general, the initiator instructs us using ExpectedDataTransferLength.
-            /// </summary>
-            public const int MaxBurstLength = 262144;
-
-            /// <summary>
-            /// The total of all the DataSegmentLength of all PDUs in a sequence MUST not exceed FirstBurstLength for unsolicited data.
-            /// Maximum amount in bytes of unsolicited [SCSI] data an iSCSI initiator may send to the target during the execution of a single SCSI command.
-            /// Irrelevant to the target in general, irrelevant when (InitialR2T = Yes and) ImmediateData = No.
-            /// </summary>
-            public const int FirstBurstLength = 65536;
-
-            /// <summary>
-            /// Minimum time, in seconds, to wait before attempting an explicit/implicit logout after connection termination / reset.
-            /// </summary>
-            public const int DefaultTime2Wait = 2;
-
-            /// <summary>
-            /// Maximum time, in seconds after an initial wait (Time2Wait), before which an active task reassignment
-            /// is still possible after an unexpected connection termination or a connection reset.
-            /// </summary>
-            public const int DefaultTime2Retain = 20;
-
-            public const int MaxOutstandingR2T = 1;
-
-            public const bool DataPDUInOrder = true;
-
-            public const bool DataSequenceInOrder = true;
-
-            public const int ErrorRecoveryLevel = 0;
-        }
-
-        public class Connection
-        {
-            /// <summary>
-            /// Maximum data segment length that the target or initator can receive in an iSCSI PDU.
-            /// Per direction parameter that the target or initator declares.
-            /// The default MaxRecvDataSegmentLength is used during Login.
-            /// </summary>
-            public const int MaxRecvDataSegmentLength = 8192;
-        }
-    }
-}

+ 1 - 2
ISCSI/ISCSI.csproj

@@ -36,12 +36,12 @@
     <Compile Include="ISCSI.Client\ClientHelper.cs" />
     <Compile Include="ISCSI.Client\ConnectionParameters.cs" />
     <Compile Include="ISCSI.Client\ConnectionState.cs" />
-    <Compile Include="ISCSI.Client\DefaultParameters.cs" />
     <Compile Include="ISCSI.Client\ISCSIClient.cs" />
     <Compile Include="ISCSI.Client\ISCSIClient.Parameters.cs" />
     <Compile Include="ISCSI.Client\ISCSIDisk.cs" />
     <Compile Include="ISCSI.Client\ISCSISession.cs" />
     <Compile Include="ISCSI.Client\PDUHelper.cs" />
+    <Compile Include="ISCSI.Common\DefaultParameters.cs" />
     <Compile Include="ISCSI.PDU\Enums\ISCSIOpCodeName.cs" />
     <Compile Include="ISCSI.PDU\Enums\ISCSIResponseName.cs" />
     <Compile Include="ISCSI.PDU\Enums\LoginResponseStatusClassName.cs" />
@@ -66,7 +66,6 @@
     <Compile Include="ISCSI.Server\ConnectionManager.cs" />
     <Compile Include="ISCSI.Server\ConnectionParameters.cs" />
     <Compile Include="ISCSI.Server\ConnectionState.cs" />
-    <Compile Include="ISCSI.Server\DefaultParameters.cs" />
     <Compile Include="ISCSI.Server\Exceptions\InvalidTargetTransferTagException.cs" />
     <Compile Include="ISCSI.Server\ISCSIServer.cs" />
     <Compile Include="ISCSI.Server\ISCSIServer.Login.cs" />