ShareInfo0Entry.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 SMBLibrary.RPC;
  11. using Utilities;
  12. namespace SMBLibrary.Services
  13. {
  14. /// <summary>
  15. /// [MS-SRVS] SHARE_INFO_0
  16. /// </summary>
  17. public class ShareInfo0Entry : IShareInfoEntry
  18. {
  19. public NDRUnicodeString NetName;
  20. public ShareInfo0Entry()
  21. {
  22. }
  23. public ShareInfo0Entry(string shareName)
  24. {
  25. NetName = new NDRUnicodeString(shareName);
  26. }
  27. public ShareInfo0Entry(NDRParser parser)
  28. {
  29. Read(parser);
  30. }
  31. public void Read(NDRParser parser)
  32. {
  33. parser.BeginStructure();
  34. parser.ReadEmbeddedStructureFullPointer(ref NetName);
  35. parser.EndStructure();
  36. }
  37. public void Write(NDRWriter writer)
  38. {
  39. writer.BeginStructure();
  40. writer.WriteEmbeddedStructureFullPointer(NetName);
  41. writer.EndStructure();
  42. }
  43. public uint Level
  44. {
  45. get
  46. {
  47. return 0;
  48. }
  49. }
  50. }
  51. }