12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using SCSI;
- using Utilities;
- namespace ISCSI
- {
-
- public class NOPOutPDU : ISCSIPDU
- {
- public LUNStructure LUN;
- public uint TargetTransferTag;
- public uint CmdSN;
- public uint ExpStatSN;
-
- public NOPOutPDU()
- {
- OpCode = ISCSIOpCodeName.NOPOut;
- Final = true;
- }
- public NOPOutPDU(byte[] buffer) : base(buffer)
- {
- LUN = new LUNStructure(LUNOrOpCodeSpecific, 0);
- TargetTransferTag = BigEndianConverter.ToUInt32(OpCodeSpecific, 0);
- CmdSN = BigEndianConverter.ToUInt32(OpCodeSpecific, 4);
- ExpStatSN = BigEndianConverter.ToUInt32(OpCodeSpecific, 8);
- }
- public override byte[] GetBytes()
- {
- LUNOrOpCodeSpecific = LUN.GetBytes();
- Array.Copy(BigEndianConverter.GetBytes(TargetTransferTag), 0, OpCodeSpecific, 0, 4);
- Array.Copy(BigEndianConverter.GetBytes(CmdSN), 0, OpCodeSpecific, 4, 4);
- Array.Copy(BigEndianConverter.GetBytes(ExpStatSN), 0, OpCodeSpecific, 8, 4);
- return base.GetBytes();
- }
- }
- }
|