Transaction2QueryFSInformationResponse.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_QUERY_FS_INFORMATION Response
  15. /// </summary>
  16. public class Transaction2QueryFSInformationResponse : Transaction2Subcommand
  17. {
  18. public const int ParametersLength = 0;
  19. // Data:
  20. private byte[] QueryFSInformationBytes;
  21. public Transaction2QueryFSInformationResponse() : base()
  22. {
  23. }
  24. public Transaction2QueryFSInformationResponse(byte[] parameters, byte[] data, bool isUnicode) : base()
  25. {
  26. QueryFSInformationBytes = data;
  27. }
  28. public override byte[] GetData(bool isUnicode)
  29. {
  30. return QueryFSInformationBytes;
  31. }
  32. public QueryFSInformation GetQueryFSInformation(QueryFSInformationLevel informationLevel, bool isUnicode)
  33. {
  34. return QueryFSInformation.GetQueryFSInformation(QueryFSInformationBytes, informationLevel, isUnicode);
  35. }
  36. public void SetQueryFSInformation(QueryFSInformation queryFSInformation, bool isUnicode)
  37. {
  38. QueryFSInformationBytes = queryFSInformation.GetBytes(isUnicode);
  39. }
  40. public override Transaction2SubcommandName SubcommandName
  41. {
  42. get
  43. {
  44. return Transaction2SubcommandName.TRANS2_QUERY_FS_INFORMATION;
  45. }
  46. }
  47. }
  48. }