AceHeader.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  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
  12. {
  13. /// <summary>
  14. /// [MS-DTYP] ACE_HEADER
  15. /// </summary>
  16. public class AceHeader
  17. {
  18. public const int Length = 4;
  19. public AceType AceType;
  20. public AceFlags AceFlags;
  21. public ushort AceSize;
  22. public AceHeader()
  23. {
  24. }
  25. public AceHeader(byte[] buffer, int offset)
  26. {
  27. AceType = (AceType)ByteReader.ReadByte(buffer, offset + 0);
  28. AceFlags = (AceFlags)ByteReader.ReadByte(buffer, offset + 1);
  29. AceSize = LittleEndianConverter.ToUInt16(buffer, offset + 2);
  30. }
  31. }
  32. }