ConnectionParameters.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /* Copyright (C) 2012-2016 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Text;
  10. namespace ISCSI.Client
  11. {
  12. internal class ConnectionParameters
  13. {
  14. public ISCSISession Session;
  15. public ushort CID; // connection ID, generated by the initiator
  16. public int InitiatorMaxRecvDataSegmentLength = ISCSIClient.DeclaredParameters.MaxRecvDataSegmentLength;
  17. public int TargetMaxRecvDataSegmentLength = DefaultParameters.Connection.MaxRecvDataSegmentLength;
  18. public bool StatusNumberingStarted;
  19. public uint ExpStatSN;
  20. public string ConnectionIdentifier
  21. {
  22. get
  23. {
  24. return String.Format("ISID={0},TSIH={1},CID={2}", Session == null ? "0" : Session.ISID.ToString("x"), Session == null ? "0" : Session.TSIH.ToString("x"), this.CID.ToString("x"));
  25. }
  26. }
  27. }
  28. }