Transaction2GetDfsReferralRequest.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Copyright (C) 2014-2017 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 Utilities;
  10. namespace SMBLibrary.SMB1
  11. {
  12. /// <summary>
  13. /// TRANS2_GET_DFS_REFERRAL Request
  14. /// </summary>
  15. public class Transaction2GetDfsReferralRequest : Transaction2Subcommand
  16. {
  17. // Parameters:
  18. public RequestGetDfsReferral ReferralRequest;
  19. public Transaction2GetDfsReferralRequest() : base()
  20. {
  21. }
  22. public Transaction2GetDfsReferralRequest(byte[] parameters, byte[] data) : base()
  23. {
  24. ReferralRequest = new RequestGetDfsReferral(parameters);
  25. }
  26. public override byte[] GetSetup()
  27. {
  28. return LittleEndianConverter.GetBytes((ushort)SubcommandName);
  29. }
  30. public override byte[] GetParameters(bool isUnicode)
  31. {
  32. return ReferralRequest.GetBytes();
  33. }
  34. public override Transaction2SubcommandName SubcommandName
  35. {
  36. get
  37. {
  38. return Transaction2SubcommandName.TRANS2_GET_DFS_REFERRAL;
  39. }
  40. }
  41. }
  42. }