SMBLibrary/SMBLibrary/SMB1/Commands/FlushRequest.cs
2017-01-06 11:12:47 +02:00

48 lines
1.3 KiB
C#

/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
*
* You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*/
using System;
using System.Collections.Generic;
using System.Text;
using Utilities;
namespace SMBLibrary.SMB1
{
/// <summary>
/// SMB_COM_FLUSH Request
/// </summary>
public class FlushRequest : SMBCommand
{
public const int ParametersLength = 2;
// Parameters:
public ushort FID;
public FlushRequest() : base()
{
}
public FlushRequest(byte[] buffer, int offset) : base(buffer, offset, false)
{
FID = LittleEndianConverter.ToUInt16(this.SMBParameters, 0);
}
public override byte[] GetBytes(bool isUnicode)
{
this.SMBParameters = new byte[ParametersLength];
LittleEndianWriter.WriteUInt16(this.SMBParameters, 0, FID);
return base.GetBytes(isUnicode);
}
public override CommandName CommandName
{
get
{
return CommandName.SMB_COM_FLUSH;
}
}
}
}