Пример #1
0
        public NTCreateAndXResponse(byte[] buffer, int offset) : base(buffer, offset)
        {
            int parametersOffset = 4;

            OpLockLevel       = (OpLockLevel)ByteReader.ReadByte(SMBParameters, ref parametersOffset);
            FID               = LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            CreateDisposition = (CreateDisposition)LittleEndianReader.ReadUInt32(SMBParameters, ref parametersOffset);
            CreateTime        = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            LastAccessTime    = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            LastWriteTime     = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            LastChangeTime    = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            ExtFileAttributes = (ExtendedFileAttributes)LittleEndianReader.ReadUInt32(SMBParameters, ref parametersOffset);
            AllocationSize    = LittleEndianReader.ReadInt64(SMBParameters, ref parametersOffset);
            EndOfFile         = LittleEndianReader.ReadInt64(SMBParameters, ref parametersOffset);
            ResourceType      = (ResourceType)LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            NMPipeStatus      = NamedPipeStatus.Read(SMBParameters, ref parametersOffset);
            Directory         = (ByteReader.ReadByte(SMBParameters, ref parametersOffset) > 0);
        }