Transaction2SetPathInformationResponse.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Copyright (C) 2014 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. using Utilities;
  11. namespace SMBLibrary.SMB1
  12. {
  13. /// <summary>
  14. /// TRANS2_SET_PATH_INFORMATION Response
  15. /// </summary>
  16. public class Transaction2SetPathInformationResponse : Transaction2Subcommand
  17. {
  18. public const int ParametersLength = 2;
  19. // Parameters:
  20. public ushort EaErrorOffset; // Meaningful only when the request's InformationLevel is set to SMB_INFO_SET_EAS
  21. public Transaction2SetPathInformationResponse() : base()
  22. {
  23. }
  24. public Transaction2SetPathInformationResponse(byte[] parameters, byte[] data, bool isUnicode) : base()
  25. {
  26. EaErrorOffset = LittleEndianConverter.ToUInt16(parameters, 0);
  27. }
  28. public override byte[] GetParameters(bool isUnicode)
  29. {
  30. byte[] parameters = new byte[2];
  31. LittleEndianWriter.WriteUInt16(parameters, 0, EaErrorOffset);
  32. return parameters;
  33. }
  34. public override Transaction2SubcommandName SubcommandName
  35. {
  36. get
  37. {
  38. return Transaction2SubcommandName.TRANS2_SET_PATH_INFORMATION;
  39. }
  40. }
  41. }
  42. }