Added SMB_COM_NT_CANCEL request implementation

This commit is contained in:
Tal Aloni 2017-07-21 18:14:22 +03:00
parent 25d1714fe7
commit 8aad4adb9c
4 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,35 @@
/* Copyright (C) 2017 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_NT_CANCEL Request
/// </summary>
public class NTCancelRequest : SMB1Command
{
public NTCancelRequest()
{
}
public NTCancelRequest(byte[] buffer, int offset) : base(buffer, offset, false)
{
}
public override CommandName CommandName
{
get
{
return CommandName.SMB_COM_NT_CANCEL;
}
}
}
}

View file

@ -155,6 +155,8 @@ namespace SMBLibrary.SMB1
return new NTTransactSecondaryRequest(buffer, offset);
case CommandName.SMB_COM_NT_CREATE_ANDX:
return new NTCreateAndXRequest(buffer, offset, isUnicode);
case CommandName.SMB_COM_NT_CANCEL:
return new NTCancelRequest(buffer, offset);
default:
throw new NotImplementedException("SMB Command 0x" + commandName.ToString("X"));
}

View file

@ -35,6 +35,7 @@ namespace SMBLibrary.SMB1
SMB_COM_NT_TRANSACT = 0xA0,
SMB_COM_NT_TRANSACT_SECONDARY = 0xA1,
SMB_COM_NT_CREATE_ANDX = 0xA2,
SMB_COM_NT_CANCEL = 0xA4,
SMB_COM_NO_ANDX_COMMAND = 0xFF,
}
}

View file

@ -289,6 +289,7 @@
<Compile Include="SMB1\Commands\NegotiateResponse.cs" />
<Compile Include="SMB1\Commands\NegotiateResponseExtended.cs" />
<Compile Include="SMB1\Commands\NegotiateResponseNotSupported.cs" />
<Compile Include="SMB1\Commands\NTCancelRequest.cs" />
<Compile Include="SMB1\Commands\NTCreateAndXRequest.cs" />
<Compile Include="SMB1\Commands\NTCreateAndXResponse.cs" />
<Compile Include="SMB1\Commands\NTCreateAndXResponseExtended.cs" />