SMB2: Improved CHANGE_NOTIFY request and response implementation

This commit is contained in:
Tal Aloni 2017-02-22 20:45:29 +02:00
parent 4cb219f61f
commit 72c2d05402
2 changed files with 29 additions and 0 deletions

View file

@ -49,6 +49,25 @@ namespace SMBLibrary.SMB2
LittleEndianWriter.WriteUInt32(buffer, offset + 28, Reserved);
}
public bool WatchTree
{
get
{
return ((Flags & ChangeNotifyFlags.WatchTree) > 0);
}
set
{
if (value)
{
Flags |= ChangeNotifyFlags.WatchTree;
}
else
{
Flags &= ~ChangeNotifyFlags.WatchTree;
}
}
}
public override int CommandLength
{
get

View file

@ -51,6 +51,16 @@ namespace SMBLibrary.SMB2
ByteWriter.WriteBytes(buffer, offset + FixedSize, OutputBuffer);
}
public List<FileNotifyInformation> GetFileNotifyInformation()
{
return FileNotifyInformation.ReadList(OutputBuffer, 0);
}
public void SetFileNotifyInformation(List<FileNotifyInformation> notifyInformationList)
{
OutputBuffer = FileNotifyInformation.GetBytes(notifyInformationList);
}
public override int CommandLength
{
get