1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ISCSI.Client
- {
- internal class ISCSISession
- {
- public ulong ISID;
- public ushort TSIH;
- public int MaxConnections = DefaultParameters.Session.MaxConnections;
- public bool InitialR2T = DefaultParameters.Session.InitialR2T;
- public bool ImmediateData = DefaultParameters.Session.ImmediateData;
- public int MaxBurstLength = DefaultParameters.Session.MaxBurstLength;
- public int FirstBurstLength = DefaultParameters.Session.FirstBurstLength;
- public int DefaultTime2Wait = DefaultParameters.Session.DefaultTime2Wait;
- public int DefaultTime2Retain = DefaultParameters.Session.DefaultTime2Retain;
- public int MaxOutstandingR2T = DefaultParameters.Session.MaxOutstandingR2T;
- public bool DataPDUInOrder = DefaultParameters.Session.DataPDUInOrder;
- public bool DataSequenceInOrder = DefaultParameters.Session.DataSequenceInOrder;
- public int ErrorRecoveryLevel = DefaultParameters.Session.ErrorRecoveryLevel;
- private ushort m_nextCID = 1;
- private uint m_nextTaskTag = 1;
- private uint m_nextCmdSN = 1;
- public ushort GetNextCID()
- {
- ushort cid = m_nextCID;
- m_nextCID++;
- return cid;
- }
-
-
-
- public uint GetNextTaskTag()
- {
- uint taskTag = m_nextTaskTag;
- m_nextTaskTag++;
- return taskTag;
- }
-
- public uint GetNextCmdSN(bool increment)
- {
- uint cmdSN = m_nextCmdSN;
- if (increment)
- {
- m_nextCmdSN++;
- }
- return cmdSN;
- }
- }
- }
|