mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-22 01:05:54 +02:00
SMB2: Improved CHANGE_NOTIFY request and response implementation
This commit is contained in:
parent
4cb219f61f
commit
72c2d05402
2 changed files with 29 additions and 0 deletions
|
@ -49,6 +49,25 @@ namespace SMBLibrary.SMB2
|
||||||
LittleEndianWriter.WriteUInt32(buffer, offset + 28, Reserved);
|
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
|
public override int CommandLength
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
@ -51,6 +51,16 @@ namespace SMBLibrary.SMB2
|
||||||
ByteWriter.WriteBytes(buffer, offset + FixedSize, OutputBuffer);
|
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
|
public override int CommandLength
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue