12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Utilities;
- namespace SMBLibrary.SMB1
- {
-
-
-
- public class OpenAndXResponseExtended : SMBAndXCommand
- {
- public const int ParametersLength = 38;
-
-
-
-
- public ushort FID;
- public SMBFileAttributes FileAttrs;
- public DateTime? LastWriteTime;
- public uint FileDataSize;
- public AccessRights AccessRights;
- public ResourceType ResourceType;
- public NamedPipeStatus NMPipeStatus;
- public OpenResults OpenResults;
- public uint ServerFID;
- public ushort Reserved;
- public AccessMask MaximalAccessRights;
- public AccessMask GuestMaximalAccessRights;
- public OpenAndXResponseExtended() : base()
- {
- }
- public OpenAndXResponseExtended(byte[] buffer, int offset) : base(buffer, offset, false)
- {
- throw new NotImplementedException();
- }
- public override byte[] GetBytes(bool isUnicode)
- {
- this.SMBParameters = new byte[ParametersLength];
- int parametersOffset = 4;
- LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, FID);
- LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, (ushort)FileAttrs);
- UTimeHelper.WriteUTime(this.SMBParameters, ref parametersOffset, LastWriteTime);
- LittleEndianWriter.WriteUInt32(this.SMBParameters, ref parametersOffset, FileDataSize);
- LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, (ushort)AccessRights);
- LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, (ushort)ResourceType);
- NMPipeStatus.WriteBytes(this.SMBParameters, ref parametersOffset);
- OpenResults.WriteBytes(this.SMBParameters, ref parametersOffset);
- LittleEndianWriter.WriteUInt32(this.SMBParameters, ref parametersOffset, ServerFID);
- LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, Reserved);
- LittleEndianWriter.WriteUInt32(this.SMBParameters, ref parametersOffset, (uint)MaximalAccessRights);
- LittleEndianWriter.WriteUInt32(this.SMBParameters, ref parametersOffset, (uint)GuestMaximalAccessRights);
- return base.GetBytes(isUnicode);
- }
- public override CommandName CommandName
- {
- get
- {
- return CommandName.SMB_COM_OPEN_ANDX;
- }
- }
- }
- }
|